Professional Documents
Culture Documents
OS & UNIX of Computer Program
OS & UNIX of Computer Program
OS & UNIX of Computer Program
&
UNIX
What is Operating System..??
• The operating system (OS) is the program which starts up when you turn on your
computer and runs underneath all other programs - without it nothing would
happen at all.
Operating System Concepts – 10th Edition 1.3 Silberschatz, Galvin and Gagne ©2018
OS Model
Operating System Concepts – 10th Edition 1.4 Silberschatz, Galvin and Gagne ©2018
Computer System Structure
Operating System Concepts – 10th Edition 1.5 Silberschatz, Galvin and Gagne ©2018
Abstract View of Components of Computer
Operating System Concepts – 10th Edition 1.6 Silberschatz, Galvin and Gagne ©2018
Different Operating
•
System…
Windows
• Mac
• Unix
• Linux
• Android
UNIX
•
History…
The UNIX operating system was born in the late 1960s. It originally began
as a one man project led by Ken Thompson of Bell Labs, and has since
grown to become the most widely used operating system.
• In the time since UNIX was first developed, it has gone through many
different generations and even mutations.
– Some differ substantially from the original version, like Berkeley Software
Distribution (BSD) or Linux.
– Others, still contain major portions that are based on the original source
code.
Structure of Unix
General Characteristics of UNIX as an
Operating System (OS)
• Multi-user & Multi-tasking - most versions of UNIX are capable of
allowing multiple users to log onto the system, and have each run multiple
tasks. This is standard for most modern OSs.
• Over 30 Years Old - UNIX is over 30 years old and it's popularity and use is
still high. Over these years, many variations have spawned off and many
have died off, but most modern UNIX systems can be traced back to the
original versions. It has endured the test of time. For reference, Windows
at best is half as old (Windows 1.0 was released in the mid 80s, but it was
not stable or very complete until the 3.x family, which was released in the
early 90s).
General Characteristics of UNIX as an
Operating System (OS)
• Large Number of Applications – there are an enormous amount of
applications available for UNIX operating systems. They range from
commercial applications such as CAD, Maya, WordPerfect, to many free
applications.
• You start at a graphical login screen. You must enter your username and
password. You also the have the option to choose from a couple session
types. Mainly you have the choice between Gnome and KDE.
• Once you enter in your username and password, you are then presented
with a graphical environment that looks like one of the following...
UNIX Interfaces
Command Line Interface
• You also have access to some UNIX servers as well.
– You can logon from virtually any computer that has internet access
whether it is Windows, Mac, or UNIX itself.
• In this case you are communicating through a local terminal to one of
these remote servers.
– All of the commands actually execute on the remote server.
– It is also possible to open up graphical applications through this
window, but that requires a good bit more setup and software.
Process Management
• Operating system functions executes within user process.
• 2 modes of execution
– User mode
– Kernel mode
• Zombie
process no longer exists, but it leaves a
record from its parent process to collect.
Process Scheduling Queues
• Job queue
• Ready queue
• Device queues.
Types of Processes in UNIX
Mainly 3 types
– User process
– Daemon process
– Kernel process
Daemon process
• Performs the function in a system wide basis. The function can be of any auxiliary
kind but they are vital in controlling the computational environment of the system.
• Example Print spooling, Network Management.
• Once created Daemon process can exist throughout the life time of the Operating
System.
System calls in UNIX
• Fork(): -This system call create new process.
• Exec(): -This system call used after a fork to replace the process memory
space with a new program.
• Wait():-This system call moves a process off the ready queue until the
termination of the child.
Interesting signals in UNIX
SIGCHLD Child process died or suspended
SIGFPE Arithmetic fault
SIGILL Illegal instruction
SIGINT tty interrupt (Control C) Kill
SIGKILL process Segmentation fault
SIGSEGV Invalid System call Exceeds
SIGSYS CPU limit Exceeds file size
SIGXCPU limit
SIGXFSZ
Memory
• Primary memory is a precious resource that frequently cannot
contain all active processes in the system
• At a later time, the kernel reads the data from swap device
back to main memory
UNIX Memory Management Policies
• Swapping
– Easy to implement
– Less system overhead
• Demand Paging
– Greater flexibility
Swapping
• The swap device is a block device in a configurable section of a disk
• The kernel treats each unit of the swap map as group of disk blocks
• The mapping between physical memory and swap device is kept in page
table entry
Demand Paging
• Not all page of process resides in memory Locality
• When a process accesses a page that is not part of its working set, it incurs
a page fault.
• The kernel suspends the execution of the process until it reads the page
into memory and makes it accessible to the process
Data Structure for Demand Paging
• Page table entry