Case Study 25
Case Study 25
operating system
1.Introduction
For those preparing for exams like GATE , a thorough understanding of operating
systems, including Unix, is essential. Our GATE course provides an in-depth
exploration of Unix, covering its history, structure, and key concepts that are crucial
for the exam
Page 1 of 13
The basic design philosophy of UNIX is to provide simple, powerful tools that can
be combined to perform complex tasks. It features a command line interface that
allows users to interact with the system through a series of commands, rather than
through a graphical user interface (GUI).
Types of UNIX
There are many different versions of UNIX, although they share
common similarities. The most popular varieties of UNIX are Sun
Solaris, GNU/Linux, and MacOS X Here in the School, we use Solaris
on our servers and workstations, and Fedora Core Linux on the servers
and desktop PCs.
History of UNIX
Page 2 of 13
1973: OS rewritten in C
Page 3 of 13
Some of the Key Features of UNIX
4. Security: UNIX has a robust security model that includes file permissions,
user accounts, and network security features.
7. Process Tracking: UNIX maintains a record of the jobs that the user
creates. This function improves system performance by monitoring CPU
Page 4 of 13
usage. It also allows you to keep track of how much disk space each user
uses, and the use that information to regulate disk space.
8. Multiuser support: UNIX allows multiple users to simultaneously access
the same system and share resources.
9. Multitasking: UNIX is capable of running multiple processes at the same
time.
10. Shell scripting: UNIX provides a powerful scripting language that allows
users to automate tasks.
11. Security: UNIX has a robust security model that includes file permissions,
user accounts, and network security features.
12. Portability: UNIX can run on a wide variety of hardware platforms, from
small embedded systems to large mainframe computers.
13. Communication: UNIX supports communication methods using the write
command, mail command, etc.
14. Process Tracking: UNIX maintains a record of the jobs that the user
creates. This function improves system performance by monitoring CPU
usage. It also allows you to keep track of how much disk space each user
uses, and the use that information to regulate disk space.
Page 5 of 13
System structure
Page 6 of 13
Kernel and its Block Diagram
• The system call and library interface represent the border between user
programs and the kernel. System calls look like ordinary function calls in
C programs. Assembly language programs may invoke system calls
directly without a system call library. The libraries are linked with the
programs at compile time.
• The set of system calls into those that interact with the ile subsystem and
some system calls interact with the process control subsystem. The ile
Page 7 of 13
subsystem manages iles, allocating ile space, administering free space,
controlling access to iles, and retrieving data for users.
• Processes interact with the ile subsystem via a speci ic set of system calls,
such as open (to open a ile for reading or writing), close, read, write, stat
(query the attributes of a ile), chown (change the record of who owns the
ile), and chmod (change the access permissions of a ile).
• The ile subsystem accesses ile data using a buffering mechanism that
regulates data low between the kernel and secondary storage devices. The
buffering mechanism interacts with block I/O device drivers to initiate
data transfer to and from the kernel.
• Device drivers are the kernel modules that control the operator of
peripheral devices. The ile subsystem also interacts directly with “raw”
I/O device drivers without the intervention of the buffering mechanism.
Finally, the hardware control is responsible for handling interrupts and for
communicating with the machine. Devices such as disks or terminals may
interrupt the CPU while a process is executing. If so, the kernel may
resume execution of the interrupted process after servicing the interrupt.
Linux Unix
The source code of Linux is freely The source code of Unix is not freely
available to its users available general public
It has graphical user interface along with It only has command line interface
command line interface
Page 8 of 13
Linux Unix
Different versions of Linux OS are Ubuntu, Different version of Unix are AIS, HP-UX,
Linux Mint, RedHat Enterprise Linux, BSD, Iris, etc.
Solaris, etc.
The file systems supported by Linux are as The file systems supported by Unix are as
follows: xfs, ramfs, vfat, cramfsm, ext3, follows: zfs, js, hfx, gps, xfs, vxfs
ext4, ext2, ext1, ufs, autofs, devpts, n s
The Linux kernel is monolithic, meaning The Unix kernel is modular, meaning that it
that all of its services are provided by a is made up of a collec on of independent
single kernel. modules that can be loaded and unloaded
dynamically.
Linux has much broader hardware support Unix was originally designed to run on
than Unix. large, expensive mainframe computers,
while Linux was designed to run on
commodity hardware like PCs and servers.
Command Line Interface of Linux is Bash, Command Line Interface of unix is Bourne,
Zsh, Tcsh. Korn, C, Zsh.
Page 9 of 13
Advantages of UNIX
1. Stability: UNIX is known for its stability and reliability. It can run for long
periods of time without requiring a reboot, which makes it ideal for critical
systems that need to run continuously.
2. Security: UNIX has a robust security model that includes ile permissions,
user accounts, and network security features. This makes it a popular
choice for systems that require high levels of security.
Disadvantages of UNIX
1. Complexity: UNIX can be complex and dif icult to learn for users who are
used to graphical user interfaces (GUIs).
Page 10 of 13
4. Limited software availability: Some specialized software may not be
available for UNIX systems.
Initializing a process
A process can be run in two ways:
Method 1: Foreground Process : Every process when started runs in foreground
by default, receives input from the keyboard, and sends output to the screen.
When issuing pwd command
$ ls pwd
Output:
$ /home/geeksforgeeks/root
When a command/process is running in the foreground and is taking a lot of time, no
other processes can be run or started because the prompt would not be available until
the program finishes processing and comes out.
$ pwd &
Since pwd does not want any input from the keyboard, it goes to the stop
Page 11 of 13
state until moved to the foreground and given any data input. Thus, on pressing
Enter:
Output:
[1] + Done pwd
$
That first line contains information about the background process – the job number
and the process ID. It tells you that the ls command background process finishes
successfully. The second is a prompt for another command.
Processes in Linux/Unix
A program/command when executed, a special instance is provided by the system to
the process. This instance consists of all the services/resources that may be utilized
by the process under execution.
• Whenever a command is issued in Unix/Linux, it creates/starts a new
process. For example, pwd when issued which is used to list the current
directory location the user is in, a process starts.
• Through a 5 digit ID number Unix/Linux keeps an account of the
processes, this number is called process ID or PID. Each process in the
system has a unique PID.
• Used up pid’s can be used in again for a newer process since all the
possible combinations are used.
At any point of time, no two processes with the same pid exist in the system because
it is the pid that Unix uses to track each process.
Page 12 of 13
Conclusion
The UNIX operating system continues to be a milestone in the today’s changing world
of computing due it robustness, security, and flexibility. Its influence is seen in many
and various operating systems, and its principles remain relevant as well as robust for
understanding how an opereating systems works under the hood. By learning the
UNIX , users can gain a valuable skill set including network security, cyber security ,
various file systems not only NTFS but also xfs, btrfs, ext4 etc. which is going to help
user in many it Environment including Docker, kubernetes etc.
Page 13 of 13