0% found this document useful (0 votes)
7 views18 pages

Lecture10-Introduction To Linux

The document is a lecture outline for EECS2031: Software Tools, focusing on the fundamentals of operating systems, particularly Unix and Linux. It covers topics such as the kernel functionalities, memory management, process scheduling, and the history of Linux and its distributions. Additionally, it discusses the GNU General Public License and the importance of free software.

Uploaded by

celov58051
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views18 pages

Lecture10-Introduction To Linux

The document is a lecture outline for EECS2031: Software Tools, focusing on the fundamentals of operating systems, particularly Unix and Linux. It covers topics such as the kernel functionalities, memory management, process scheduling, and the history of Linux and its distributions. Additionally, it discusses the GNU General Public License and the importance of free software.

Uploaded by

celov58051
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

EECS2031 : Software Tools

UNIX C Unix UNIX

Dr. Sukhwant Kaur Sagar C


UNIX C Unix Unix

Software Tools
Lecture 10: Introduction to Linux C C
UNIX CUNIX
Unix
Unix
Unix

1
Outline

▪ Today’s Lecture
o What’s Operating System
o Kernel of Operating System
o Kernel functionalities
o Layers in Unix/Linux System
o Timeline of Unix/Linux System
o What is Linux and its distributions
o GPL License

2
What is Operating System?

▪ OS is system software that manages computer


User –level applications hardware and software resources and provides

System calls common services for computer programs.

Operating System

Physical machine interface ▪ From app. programmer’s point of view:


▪ O.S. manages hardware resources
Hardware: processor(s), ▪ O.S. provides user programs with a simpler
main memory, disks, interface, i.e. system calls
printers, keyboard, display,
network interface, etc. ▪ cnt=read(fd, buffer,nbytes)
▪ getc() etc.

3
Kernel of Operating System

• Operating system:

• The entire package consists of central software managing a computer’s


resources and the accompanying standard software tools, such as
command-line interpreters, graphical user interfaces, file utilities, and editors.

• kernel: central software that manages and allocates computer resources (i.e.,
CPU, RAM, and devices).

4
Kernel Functionalities: Process scheduling
▪ Managing one or more central processing units (CPUs)
▪ A process is essentially running software.

▪ Unix: a preemptive multitasking operating system


▪ multiple processes (i.e., running programs) can simultaneously reside in
memory and each may receive use of the CPU(s).
▪ Preemptive: scheduler can preempt (or interrupt) a process, and resume its
execution later => to support interactive responses
▪ the processors are allowed to spend finite chunks of time (quanta, or
timeslices) per process

5
Kernel Functionalities: Memory management

▪ Manage physical memory (RAM) to be shared among processes in an


equitable and efficient fashion

▪ Virtual memory management:


▪ Processes are isolated from one another and from the kernel so that one process
can’t read or modify the memory of another process or the kernel.
▪ Only part of a process needs to be kept in memory, thereby lowering the
memory requirements of each process and allowing more processes to be held in
RAM simultaneously.
▪ better CPU utilization, since it increases the likelihood that, at any moment in
time, there is at least one process that the CPU(s) can execute.

6
Other OS functionalities …

▪ The kernel provides a file system on disk, allowing files to be created, retrieved, updated, deleted,
and so on.
▪ Creation and termination of processes
▪ Peripheral device: standardizes and simplifies access to devices, arbitrates access by multiple
processes to each device
▪ Networking: transmits and receives network packets on behalf of user processes.
▪ Support system call interfaces: processes can request the kernel to perform various tasks using
kernel entry points known as system calls.
▪ Second part of this course: Unix system call API

7
What is Linux?
▪ Linux is a Unix clone written from scratch by Linus Torvalds with assistance from a loosely-
knit team of hackers across the Net.

▪ Unix is a multitasking, multi-user computer operating system originally developed in


1969 by a group of AT&T employees at Bell Labs.

▪ Linux and Unix strive to be POSIX compliant.

▪ >60% of the world’s servers run some variant of Unix or Linux. The Android phone
and the Kindle run Linux.

8
What is Linux?
Linux + GNU Utilities = Free Unix

▪ a set of small programs written by


▪ Linux is an O/S core Richard Stallman and others. They are
written by Linus Torvalds the GNU utilities.
and others AND ▪ [Link]

9
GNU history

▪ GNU: a free UNIX-like operating system


▪ Richard Matthew Stallman (author of Emacs, and many other utilities, ls,
cat, …, on linux)
▪ 1983: development of a free UNIX- like
operating system
▪ Free Software Foundation (100s of
Programmers)

▪ Free software:
▪ freedom to run the program, for any purpose.
▪ freedom to study how the program works and adapt it to your needs.
▪ freedom to redistribute copies so you can help others.
▪ freedom to improve the program and release your improvements to
the public, so that everyone benefits.

10
GPL License
▪ GNU General Public License is a free, copyleft license for software and other kinds
of works…
▪ “The licenses for most software and other practical works are designed to take away your
freedom to share and change the works. By contrast, the GNU General Public License is
intended to guarantee your freedom to share and change all versions of a program-
-to make sure it remains free software for all its users.”
▪ Manual pages for commands include copyright info
▪ COPYRIGHT
Copyright © 2011 Free Software Foundation, Inc. License GPLv3+:
GNU GPL version 3 or later <[Link]

This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

11
Linux history
▪ Linus Torvalds
▪ – 1991: “hobby” operating system for
▪ i386-based computer, while study in Univ. of Helsinki
▪ 1996: Linux becomes a GNU software component
▪ GNU/Linux: A fairer name than Linux?
▪ “Most operating system distributions based on Linux as kernel are basically
modified versions of GNU operating system. We began developing GNU in
1984, years before Linus Torvalds started to write his kernel. Our goal was
to develop a completely free operating system. Of course, we did not
develop all the parts ourselves—but we led the way. We developed most of
the central components, forming the largest single contribution to the whole
system. The basic vision was ours too. “ --- RMS
▪ [Link]

12
Layers in UNIX/Linux System

Users
library
interface Standard utility programs
(shell, editors, compilers) POSIX 1003.2
System
call interface Standard library
(open, close,read, write, fork,etc) POSIX
Unix/Linux kernel
(process management,memory management,file system,
I/O, etc)
Hardware (CPU, memory, disks, terminals, etc)

POSIX, "Portable Operating System Interface", is a family of standards


specified by IEEE for maintaining compatibility between Unix systems.

13
Linux Has Many Distributions

14
Know your Linux distribution

15
Linux kernel versions

Use “uname –a” to check system information


(including kernel version).
16
Understanding your Linux details
$ uname -a
Linux indigo1 4.18.0-553.22.1.el8_10.x86_64 #1 SMP Wed Sep 25 [Link] UTC 2024 x86_64
x86_64 x86_64 GNU/Linux

▪ Kernel name: Linux


▪ Hostname: indigo1
▪ Kernel release: 4.18.0-553.22.1.el8_10.x86_64
▪ Kernel version: #1 SMP Wed Sep 25 [Link] UTC 2024
▪ Machine hardware name:x86_64
▪ Processor:x86_64
▪ Operating system: GNU/Linux

17
18

References

▪ Unix Concepts and Applications, McGraw Hill, Sumitabha Das

▪ Unix System Programming Second Ed., Keith Haviland, Dina Gray, Ben Salama. Addison-
Wesley, 1998.

18

You might also like