Unit1 - Introduction To OS
Unit1 - Introduction To OS
Manpreet Singh
[email protected]
What is an Operating System?
2. System View:
OS is a resource allocator
Manages all resources
Decides between conflicting requests for efficient and fair
resource use
OS is a control program
Controls execution of programs to prevent errors and
improper use of the computer
Who controls the execution of programs to
prevent errors and improper use of
computer?
a) Resource allocator
b) Control Program
c) Hardware
d) None of the above
Operating-System Operations
Modern OS’s are Interrupt driven.
Program or software send generate events by using system calls.
Error or request by a software creates exception or trap
Division by zero, request for operating system service
Batch Systems
“Batch operating system. The users of a batch operating system do not
interact with the computer directly. Each user prepares his job on an
off-line device like punch cards and submits it to the computer operator.
To speed up processing, jobs with similar needs are batched together
and run as a group”.*
*[https://www.tutorialspoint.com/operating_system/os_types.htm]
TYPES OF OS
Batch Systems
Early computers were Physically enormous machines run from a
console
The common input devices were card readers and tape drives.
The common output devices were line printers, tape drives, and
card punches.
The user did not interact directly with the computer systems.
User prepare a job -which consisted of the program, and submitted it
to the computer operator.
after minutes, hours, or days, the output appeared.
To speed up processing, operators batched jobs with similar needs
together and ran them through the computer as a group.
Multiprogrammed OS
Needed for efficiency
Single user cannot keep CPU and I/O devices busy at
all times
Multiprogramming organizes jobs (code and data) so
CPU always has one to execute
A subset of total jobs in system is kept in memory
One job selected and run via job scheduling
When it has to wait (for I/O for example), OS switches
to another job
Timesharing OS
Timesharing (multitasking) is logical extension in
which CPU switches jobs so frequently that users can
interact with each job while it is running, creating
interactive computing
Each user has at least one program executing in
memory process
If several jobs ready to run at the same time CPU
scheduling
If processes don’t fit in memory, swapping moves
them in and out to run
Virtual memory allows execution of processes not
completely in memory
Timesharing OS
Multitasking Systems
Types of Multitasking:
1. Preemptive: the operating system parcels CPU time
slices to each program.
2. Cooperative: each program can control the CPU for as
long as it needs it.
If a program is not using the CPU, however, it can
allow another program to use it temporarily.
Multiprocessing OS
Multi-processor systems; that is, they have multiple CPU.
Exp: dual core processor has 2 process cycles
Also known as parallel systems or tightly coupled
systems
Such systems have more than one processor in close
communication, sharing the computer bus, the clock, and
sometimes memory and peripheral devices.
Distributed Systems
Time Driven
Task specific
MS-DOS – written to
provide the most
functionality in the least
space
Not divided into modules
Non Simple Structure -- UNIX
UNIX – limited by hardware functionality
The UNIX OS consists of two separable parts:
Systems programs
The kernel
Traditional UNIX System Structure
Beyond simple but not fully layered
Layered Approach
The operating system is divided
into a number of layers (levels)
Each layer is built on top of
lower layers.
The bottom layer (layer 0), is the
hardware; the highest (layer N)
is the user interface.
With modularity, layers are
selected, each layer uses
functions (operations) and
services of only lower-level
layers
Microkernel System Structure
Communication takes place between user modules
using message passing
Example of microkernel: Mach
Mac OS X kernel (Darwin) partly based on Mach
Benefits:
Easier to extend a microkernel
Easier to port the operating system to new architectures
More reliable (less code is running in kernel mode)
More secure
Disadvantage:
Performance overhead of user space to kernel space
communication
Microkernel System Structure
messages messages
microkernel
hardware
Operating System Services
An operating system provides an environment for the programs to run.
It provides certain services to programs
Operating System Services
Operating-system services provides functions that are helpful to the
user:
• Mach
• AIX
• OS X
• MINIX
Any Query
???