ﷲ �اﻟﺮ ٰﲪ ِﻦ �اﻟﺮﺣﲓِ
�ِﺴ ِﻢ ِ
ۑ ۷ ٥ ۶ ۹ ٥ ۷
ἐ ۸ ہ ٦ ٦ ﯧ
٦ ╖
ڮ ּĭڹڮ┤ּ ﮩڵּ �ڶ┼≡ּ ڶּﮥ ڵṟ˨ּδڶڹڮ┬ּṎڮ>ڹڰּ↑ ﮘּ┼˃δﯖּ �ڵ · ▲ ʳ ╕
Ḋ
ڴּڼѲڮ ڴּ ɢڵּڹ٪ʬδ
1
Types of Operating System
Lecture # 02
By: Muhammad Ehsan
Lecturer
Department of Computer Science
2
Types of Operating System
3
Lecture Outline
Mainframe Systems
o Simple Batch Systems
o Mufti-Programmed Systems
o Time Sharing Systems
Single-Processor Systems
Multiprocessor Systems
o Types of Multiprocessor Systems
Distributed Systems
Real-Time Systems
Embedded System
Hand-Held Systems
4
Multimedia Systems
Mainframe Systems
5
Mainframe Systems
Mainframe systems were used to solve commercial and
scientific problems.
o Simple Batch Systems
o Mufti-Programmed Systems
o Time Sharing Systems
6
Simple Batch Systems
The user did not interact directly with computer system. The user
prepared a job that consisted of program, data and some control
information (control cards). He then submitted it to the computer
operator in the form of punched cards.
The operating system was simple. Its basic job was to transfer control
automatically from one job to the next. The operating system was always
resident in memory. The operator batched similar jobs together and then
ran in the computer to speed up the processing.
7
Simple Batch Systems
First rudimentary system.
User ≠ operator
Reduce setup time by batching similar jobs
Automatic job sequencing – automatically transfers control from
one job to another.
Resident monitor (monitor program):
o initial control in monitor
o control transfers to job
o when job completes control transfers back to monitor 8
Simple Batch Systems
9
Multiprogrammed Systems
The CPU has a pool of jobs.
When the currently executing job has to wait (if it is performing
some 1/0), it is removed from the CPU. Another job is selected
and the CPU now executes it. This process ensures that CPU is
always executing a job if there is a job to execute.
In a non-multiprogrammed system, if a job had to wait for an 1/0
operation, CPU would also have to wait-until 1/0 was finished.
10
Multiprogrammed Systems
A group of jobs that are ready to be executed is
called job pool.
Since there is more than one job that can be
executed, it is possible for the operating system to
make a decision about which job to execute next. That
decision keeps CPU utilization as high as possible.
Multiprogramming allows the system to increase
CPU utilization by ensuring that the CPU always has a
job to execute. 11
Multiprogrammed Systems
Example: Two processes P1 and P2 with CPU and I/O bursts of
one time unit each
CPU I/O
Burst Burst
P1
P2
P1 …
P2 12
Time Sharing
In batch system, the user cannot interact with the job when it is being
executed.
o It means that all possible problems must be anticipated
beforehand as the user cannot make corrections during execution.
It becomes very difficult when a program has to go through many
phases such as compilation, linking etc. It may be difficult to define
what to do if a particular phase fails.
Another problem is debugging of a program.
o All debugging is static. The only information to find out is why the
13
program is giving incorrect output at various stages of execution.
Time Sharing
Time sharing was introduced to make computer systems more
interactive.
CPU is the most important resource that is shared.
Each job gets CPU for a small amount of
time.
o When the allotted time period for a job
is used, the next job in line is allocated
CPU.
14
Time Sharing Systems
Time sharing system is a multi-user, multi-tasking multi-process
and interactive system.
It allows multiple users to share computer simultaneously.
The computer first works on one user's task for a fraction of time. It
then goes to the next user's task.
o The task stops when the given time slice is finished and waits for
another time slice.
The computer operates very quickly and can distribute time slices to
various tasks. The computer rapidly switches back and forth among
15
different tasks.
Time Sharing Systems
Time sharing systems use CPU scheduling and multiprogramming
to provide each user with a small portion of time shared computer.
The CPU can be allocated to a job only if that job is currently in
memory,
It must be able to have several jobs ready in memory simultaneously.
It requires some form of memory management and protection. It may
be achieved by using virtual memory.
On-line file system must be available for users to access data and
code.
16
Single-Processors systems
Multiprocessor Systems
17
Single-Processors systems
A single-processor system has one main CPU to execute a
general-purpose instruction set including the instructions from
user processes.
They may come in the form of device-specific processors such
as disk, keyboard and graphics controllers. They may come in
the form of more general-purpose processors in mainframes
such as 1/0 processors to move data quickly among the system
components.
18
Single-Processors systems
The operating system cannot communicate with these
processors. They perform their jobs autonomously.
The use of special-purpose microprocessors is very common.
However, it is still considered a single-processor system not
multiprocessor.
19
Multiprocessor Systems
Multiprocessing is a type of processing in which two or more
processors work together to process more than one program
simultaneously.
o It allows the system to do more work in a shorter period of
time. UNIX is one of the most widely used multiprocessing
systems.
Multiprocessor system is also known as parallel system or tightly-
coupled system.
20
Multiprocessor Systems
Advantages of Multiprocessor systems
o Reduced Cost
o Increased Reliability
o Increased Throughput
Types of Multiprocessor Systems
o Symmetric Multiprocessing - A method of processing in which
multiple processors work together on the same task.
o Asymmetric Multiprocessing - A multiprocessing technique in
which each processor is dedicated to a particular task. 21
Distributed Systems
22
Distributed Systems
A distributed system is a piece of software that ensures:
o a collection of independent computers that appear to the users of the
system as a single system.
A system that distributes the computation among several physical
processors is called distributed system. It is also known as loosely-coupled
system.
o It means that the processors do not share memory, data structures' or
system clock. Each processor has its own local memory.
o A processor can only communicate with other processors through a
23
communication line usually over a network.
Distributed Systems
Two aspects:
o independent computers and
o single system middleware.
24
Distributed Systems
The processors in distributed system may vary in size, speed
and function. They may include microprocessor, workstations,
minicomputers and large general purpose computer system.
o These processors are given different names such as sites,
nodes, computers, machines and hosts etc.
Advantages of Distributed Systems
o Resource Sharing
o Computation Speedup
o Reliability
25
o Scalability
Distributed Systems
A Distributed OS provides a virtual machine
abstraction to its users and wide sharing of
resources like as computational capacity, I/O
and files etc.
26
Real-Time Systems
27
Real-Time Systems
In Real-Time Systems, each job carries a certain deadline within
which the job is supposed to be completed, otherwise, the huge
loss will be there, or even if the result is produced, it will be
completely useless.
o Industrial control systems
o Military applications
o Automobiles (brakes)
o Airplane guidance
o Medical devices
28
Types of Real-Time Systems
Hard real-time systems
A hard real time system guarantees that a job will complete within a
specified time period.
Secondary storage limited or absent, data stored in short term memory,
or read-only memory (ROM)
No virtual memory — time cannot be “wasted” on translation of logical to
physical addresses
o Plane landing systems, process control in nuclear power plants,
respirators, etc.
29
Types of Real-Time Systems
Soft real-time systems
A soft real time system is a much less restrictive version of a hard real
time system. A soft real time system does not guarantee that a job will
complete within a specified time period. However, it tries its best to finish
the job as soon as possible.
If a critical real time job enters the system, the operating system may
assign the highest priority to that task and execute it continuously until it
completes.
Useful in applications (multimedia, virtual reality) requiring advanced
operating-system features. 30
Embedded Systems
31
Embedded Systems
Embedded operating systems are designed to be used in
embedded computer systems.
They are designed to operate on small machines
o like mobile phones, PDAs, etc.
They are able to operate with a limited number of resources. They
are very compact and extremely efficient by design.
Examples
o Windows CE and Minix 3, Palm OS
32
JAZAK ALLAH!
Any Question?
33