Lec 9
Lec 9
Computer and
Information
Sciences
Information
Technology
Department
Principles of Information &
Technology Systems
IT 201T
hardware by users.
Operating System Introduction
Operating System
An operating system: is an interface between the
hardware of a computer and the user (programs or
humans) that facilitates the execution of other
programs and the access to hardware and software
resources.
Operating System Components
A modern operating system has at least four
duties: memory manager, process manager,
device manager and file manager.
OS Components- User interface
Each operating system has a :
user interface: a program that accepts requests
from users (processes) and interprets them for the
rest of the operating system.
programs
Multiprogramming
Nonswapping category:
This
means that the program remains in
memory for the duration of execution
Two techniques belong to the this category:
Partitioning
paging
Multiprogramming (Cont.)
Swapping category:
This
means that, during execution, the
program can be swapped between memory
and disk one or more times.
Two techniques belong to the this category:
Demand paging
Demand segmentation
Partitioning
An example of demand
segmentation is shown in figure
Demand paging and segmentation
Demand paging and segmentation can be
combined to further improve the efficiency of the
system
A segment may be too large to fit any available
free space in memory
Memory can be divided into frames, and module
can be divided into pages
The pages of a module can then be loaded into
memory one by one and executed
OS Components- Process manager
A second function of an operating system is process management,
but before discussing this concept, we need to define some terms.
Figure shows a State diagram with boundaries between program, job and process
State diagrams (Cont.)
A program becomes a job when selected by the operating system
and brought to the hold state
It remains in this state until it can be loaded into memory
When there is memory space available to load the program totally
or partially, the job moves to the ready state. It now becomes a
process
It remains in memory and in this state until the CPU can execute it,
moving it to the running state at this time
When in the running state, one of three things can happen:
The process executes until it needs I/O resources, it goes into the waiting
state
The process exhausts its allocated time slot, it goes into the ready state
The process terminates, it goes into the terminated state
Schedulers
To move a job or process from one state to
another,
The process manager uses two schedulers
The job scheduler
The process scheduler
Schedulers (Cont.)
Job scheduler:
Moves a job from the hold state to the ready state or
from the running state to the terminated state
(Figure shows job scheduler)
Schedulers (Cont.)
Process scheduler:
Moves a process between the running, waiting, and
ready states many times before it goes to the
terminated state and is no longer a process
As shown in the figure below
OS Components- Device manager
The device manager, or input/output manager,
is responsible for access to input/ output
devices.
There are limitations on the number and speed
of input/output devices in a computer system.
The device manager is responsible for the
efficient use of input/output devices
Device manager responsibilities
The device manager monitors every input/output
device constantly to ensure that the device is
functioning properly.
The device manager maintains a queue for each
input/output device or one or more queues for
similar input/output devices.
The device manager controls the different policies
for accessing input/output devices. i.e. it may use
FIFO for one device and shortest length first for
another
OS Components- File manager
Operating systems today use a file manager to
control access to files. The responsibilities of a file
manager:
Controls access to files. The type of access can vary
(read, write, execute)
Supervises the creation, deletion, and modification of
files.
Controls the naming of files.
Supervises the storage of files. ( how, where,.. etc)
is responsible for archiving and backups.
Any Questions ?
References
Behrouz Forouzan and Firouz Mosharraf,
“Foundations of computer science”, Second edition,
chapter7, pp. 187- 212
THANK
YOU