Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
5 views

Operating system notes

Uploaded by

Jithin Murthy
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views

Operating system notes

Uploaded by

Jithin Murthy
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 8

Note

Different Types of Operating Systems: Batch, Multiprogrammed,


Time-sharing,Real-time, Distributed, Parallel:

rodon;
Gene
2
vd Batch Processing Operating System:
batches of
The first computers used batch operating systems, in which the computer ran
jobs without stop. The job is usually in the form of punch cards. Ina batch processing
no
operating system interaction between the user and processor is limited or there is
interaction at all during the execution of work. Data and programs that need to be
processed are bundled and collected as a 'batch and executed together.

Scheduling in batch systems is also very simnple. Memory is divided into two areas. One
of them ispermanently occupied by the resident portion of the operating system , and the
other is used to load transient programs for execution. When a transient program
terminates , a new program is loaded into the same area of memory.

Batch processing operating systems are ideal in situations where: manayen the eecuttin t
- Thereare large amounts of data to be processed. fah Pray ram in the bte
- Similar data needs to be processed.
- Similar processing is involved when executing the data. The mowtr i's alw ays n the
nian me my aad aveulble
Advantages of batch systems:
move much of the work of the operator to the computer
increased performance since it was possible for job to start as soon as the
previous job finished
A u obs w e e
batehedthyethe Disadvantages:turn-around time can be large from user standpoint
z*FeRTRAN
more difficult to debug program
Co30L due to lack of protection scheme, one batch job can affect pending jobs
(read too many cards, etc)
a job could corrupt the monitor, thus affecting pending jobs
a job could enter an infinite loop
Professional operators, not the users, interacted with the machine. Users dropped jobs off,
for the
then returned to pick up the results after their jobs had run. This was inconvenient
users, but the expensive computer was kept busy with a steady stream of jobs.

Speial marker Cmls


bat Opers useo a
Yns Seuehee at Tebo withet stoP,

Operating system, CSE, CS 501 Mr. Subhash Mondal (Asst. Professor)


M.S.I.T.

6S CPU
Ceney
2
1960's
Multi Programming Operating System:
Importance of Multiprogramming Operating System:
Usually ,a CPU is much faster compared to
peripheral devices. While peripherals are
performing certain operations the CPUmay not
Tokeep CPU be doing any work. It may be lying idle.
busy for most of the time it is desirable to
process a number of programs
concurrently.When a computer processes several
or execution of programs is called programs concurrently, such processing
multiprogramming.
The term multiprogramming denotes an operating
forms of memory protection and enforces system that provides sophisticated
concurrency control when processes access
shared I/O devices and files. Multiprogramming
jobs so that the CPUalways has one to execute. increases CPU utilization by organizing
The idea is as follows- The operating system keeps several
simultaneously. This set of jobs isa subset of the jobs kept injobs
in memory
the
system picks and begins to execute one of the jobs in the memory.job pool. The operating
Eventually, the job may have to wait for sone task, such as an I/O
In anon-multiprogramming system, theoperating system switches operation,
to complete.
to, and executes,
another job. When that job needs to wait, the CPU is switched to another job, and so on.
As soon as, the first job finishes waiting and gets the CPUback.
As long as at least one job needs to execute , the CPUis never idle.

In the early days of computing, CPU time was expensive, and peripherals were very
siow. When the computer ran aprogram that needed aCcess to aperipheral, the CPU
Would have to stop executing program instructions while the peripheral processed
the data. This was deemed very inefficient. The first computer using a multitasking
system was the British Leo III owned by J. Lyons and Co.. Several different
programs in batch were loaded in the computer memory, and the first one began to
run. When the first program reached an instruction waiting for a peripheral, the
context of this program was stored away, and the second program in memory was
given a chance to run. The process continued until all programs finished running.

Multiprogramming doesn't give any guarantee that a program will run in a timely
manner. Indeed, the very first program may very well run for hours without needing
access to aperipheral. As there were no users waiting at an interactive terminal, this
was no problem: users handed on adeck of punched cards to an operator, and came
back a few hours later for printed results. Multiprogramming greatly reduced wait
times when multiple batches were being processed.

Multiprogramming is afeature of an OS which allows running multiple programs


èsimultaneously on One CPU. So, say, you may be typing in word, listening to music
while in backgroundIE is downloading are multiprogramming For eg. Windows XP,
Liunux.
3

The mismatch between the speeds of input / output device and CPUleaves some
However , if the computer system is
resources of the computer system under utilized.
utilization of the available equipment can
working in the multiprogramming mode, better several programs in different parts of the
be realized multi programming refers to keeping andexecuting them concurrently by
main memory are the same time as shown in figure
the CPU.
instantaneously. Since the
The CPU switches from one program to another almostoperations, the CPU can allocate
operating speed of CPUis much faster than that of I/O is busy with I/O operations.
time to several programs Instead of remaining idle when onewaiting for I/O transfer, there
Hence, in multiprogramming system, when one program is
is another progranm ready to use the CPU. Job 3
At the particular time instance shown in the figure,
program A isnot utilizing the CPUsince it is busy Job 2
in writing output data on the disk. The CPUis being Memory
used to execute program B which is also present in Job 1 partitions
the main memory. Another program C, residing in
the main memory, is waiting for the CPUto become
free. Operating
system
In case of multiprogramming the various programs
stored in the main memory, can be in one of the following three stages:

1. Running: CPU is being used by the program.


2. Ready: Waiting for CPUto be assigned to it.
3. Blocked: Performing I/O operation.

Advantages of multiprogramming:
1. Increased Throughput

Throughput isa measure of the total amount of processing that a computer system can
complete over a fixed period of time. Total through put is significantly increased in
multiprogramming because the CPU is not waiting for VO for the program it is executing.
2. Shorter Response Time

Turn around time for short jobs can be greatly improved under multiprogramming.
priorities of jobs
3. Ability toassign
systems have schemes for setting priorities for rotating
Most multiprogramming
programs.
Storage Allocation
1. Improved Primary :
programs that primary storage can hold, the greater the
The greater the number of program while waiting for
execute at least one
probability that the CPUwill be able to
I/O for the others.
Multiprogramming Operating Systems
(Requirements or Disadvantages of

d1960's-19cs
1. Large Main Memory
accommodate many user programs along with
Large main memory is required to
operating systems.
SPOoLing 2. Proper Job Mix
bound
should contain some CPU- bound programs and some I/O -
The main memory least one of the programs which do
not need
various partitions so that at
programs in its
processing.
VO is always available to the CPUfor
3. CPUScheduling
situations which two or more programs will be in the ready statewaiting for
There will be case, the operating system just decides to
CPUto be allocated for execution. In such a
allocated.
which program CPU should be

em i9fo's Time Sharing Operating Systemn:


to
poesent; of multiprogramming. In time
Time Sharing (or multi-tasking) is a logical extension
jobs by switching among them, but the
sharing systems, the CPUexecutes multiplecan interact with each program while it is
switches occur so frequently that the users computer system, which
running. Time sharing requires an Interactive (or Hands-on)
system.
provides direct communication between the user and the
various, to use a particular
This is a technique which enables many people, located at
computer system at thesame time. Each user is actually the away fromn the computer and
scheme of Time Sharing,
other uses. Each user has it own set of programs. Under
Timne - sharing system,
specific time slice are allocated to different user in rotation. process, beginning
allocatesa very short period of CPUtime one -by - one to each user
and then again beginning
from the first user process and proceeding through the last one,
from the first one.
attentionof the CPU is
Thisshort period of time during which a user process gets the the order of 10 to 100
known as a time slice, time slot, or quantum, and is typically of
computer is working for him exclusively,
millisecond. It appears to the user that the
sharing may be
though the fact is that computer serves him periodically. Thus time
process is shown in
viewed as a multi-use multiprogramming technique. The timesharing
figure.
In case of time-sharing the various program can be in Job 1
one of the following three stages: Job 6
Job 2
1. Running: CPU is being used by the program.
Job 3
2. Ready :waiting for CPUto be assigned to it Job 5
3. Blocked: Performing /O operation. Job 4

Requirements of Timesharing system:


Requirements of timesharing system are exactly same as we have discussed in
multiprogramming system i.e.
1. Large main memory
2. Memory Protection
3. Proper job Mix
4. Program status preservation
5. CPUScheduling.

Time Sharing: in this operating system OS assigns some time slots to cach job. Here cach
job is executed according to the allotted time slots.
Jobl: 0 to 5
Job2: 5 to 10
Job3: 10 to 15
Multi-Tasking: in this operating system jobs are executed in parallel by the operating
system. But we can achieve this multi-tasking through multiple processors (or) CPUs
only.
CPU1: Jobl
CPU2: Job2
CPU3:Job3
6
GLeneYho
Late to’treser

Real-time Operating Systems:


A real-time operating system (RTOS) is an operating system (0S) intended to serve real
time application requests,Real-time systems are used when there are rigid time
requirements onthe operation of aprocessor or the flow of data and real-time systems
can be used as a controldevice in a dedicated application.
Real-time
will fail.
operating system has well-defined, fixed time constraints otherwise system
Key factors in a real-time OS are minimal interrupt latencyand minimal thread
Switching latency, but a real-time OS is valued more for how quickly or how predictably
itcan respond than for the amount of work it can perform in a given period of time.
Example: Scientific experiments, medical imaging systems, industrial control systems,
weapon systems, robots, and home-appliance controllers.
There are two types of real-time systems:
Hard real-time systems:
Hard real-time systems guarantees that critical tasks complete on time. In hard real-time
systems secondary storage is limited or missing with data stored in ROM. In these
systems virtual memory is almost never found.
Soft real-time systems:
Soft real time systems are less restrictive. Critical real-time task gets priority over other
tasks andretains the priority until it completes. Soft real-time systems have limited utility
than hard real-tinme systems.

E.g. Multimedia, virtual reality, Advanced Scientific Projects like undersea exploration
and planetary rovers.

A hard real-time operating system has less jitter than a soft real-time operating system.
The chief design goal is not high throughput, but rather a guarantee of a soft or hard
performance category. A RTOS that can usually or generally meet a deadline is a soft
real-time OS, but if it can meet a deadline deterministically it is a hard real-time OS.

Distributed Operating Systems:


Distributed systems distribute computation among several processors. In contrast to
tightly coupled systems (i.e., parallel systems), the processors do not share memory or a
clock. Instead, each processor has its own local memory.
(The processors communicate with one another through various communication lines
such as high-speed buses or telephone lines). These are referred as loosely coupled
systems or distributed systems. Processors in a distributed system may vary in size and
function. These processors are referred as sites, nodes, computers and so on.
Theadvantages of distributed systems are as follows:
Resource Sharing: With resource sharing facility user at one site may be able to use the
resources available at another.
Communication Speedup: Speedup the exchange of data with one another via electronie
mail.

Reliability:If one site fails in adistributed system, the remaining sites can potentially
continue operating.

Parallel operating SVstems:


Parallel computing is a form of computation in which many calculations are carried out
simultancously, operating on the principle that large problems can often be divided into
smaller ones, which are then solved concurrently (Cin parallel".:
Parallel operating systems are uscd to interface multiple networked computers to
complete tasks in parallel.
Paralleloperating systems are able to use software to manage all of the different
resources of the computers running in parallel, such as memory, caches, storage space,
and processing power. Paral'el operating systems also allow a user to directly interface
with all of the computers in the nctwork.
Parallel computers can be roughly classified according to the level at which the hardware
supports parallelism, with multi-core and multi-processor computers having multiple
processing elements within a single machine, while clusters, MPPs (Massively Parallel
Processor (MPP) is asingle computer with many networked processors), and grids use
muliple computers to work on the same task.

Difference between distributed and parallel processing operating


system:
1. Distributed Operating systems are also referred to as Loosely Coupled systems
whereas parallel processin gsystems are refered to as tightly coupled systems.
2A loosley coupledsy stem is onein which the processors do notshare memory and
each processor has its own local memory wheras in a tightly coupled system there is a
single systemwide primary memory shared by allthe processors.
8

distributed operating systems can be placed far away from each


3. The processors of not thecase with parallel processing
wider geographic arca which is
other tocover a
systems.
processors that can be usefully deployed is very small in a parallel
4. The number of operating system a larger number of
system whereas for aditributed
processing operating
processors can be usefully deployed.
used for controlling simd n mimd in parallel. In distributed no any
5.Globle clock is algorithms are used.
global colck present in this synchronization

operating system there is an unpredictable communication delays


6. In the distributed
parallel processing system share over
between processors whereas the processors in the
an interconnection network.

You might also like