Download as pdf or txt
Download as pdf or txt
You are on page 1of 18

INTRODUCTION TO

OPERATING SYSTEM
• Lecture-2 (22-07-2020)
Operating System Structures
Simple Batch System
Multi programmed
Timeshared (Multitasking)
Personal Computer
Parallel Systems
Distributed Systems
Real-Time Systems
Single Batch System

• Input Devices- Card


Reader, tape Drives
Operating System
• Output Devices-Line
printers, Tape Drives
User Program Area
and Punch Cards
• Batch processing was
used for the jobs which
do not want human
interaction.
Simple Batch System
Card Reader--CPU---Line Printer
In this execution environment CPU generally
remains idle, this is due to difference in speed.
Introduction of Disk Technology helps much in
this regard
Disk

Card Reader--CPU---Line Printer


Simple Batch System
Spooling (Simultaneous Peripheral Operations
On-Line)
Drawback of Simple Batch System:
A single user cannot utilize CPUs and I/O s at
the same time
Multiprogrammed System
• (Batch system) 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
Timeshared System(Multitasking)
 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
 Response time should be < 1 second
 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
 Eg.-IBM OS/390, WINDOWS 2000, LINUX etc
Personal Computers
• In 1970 s personal computers came into use as
the hardware cost reduced.
• These systems were microcomputers which
were not multitasking.
• Here the goal was not to utilize hardware
resources efficiently but to maximize user
convenience. Eg. –MS-DoS, APPLE.
Parallel Systems
Parallel operating systems are the interface
between parallel computers (or computer systems) and the
applications (parallel or not) that are executed on them.
They translate the hardware's capabilities into concepts
usable by programming languages. ... Currently, SMP
computers are the most widely used multiprocessors.
These are tightly coupled systems.
Advantage: Increased Throughput and it makes the system
fault tolerant and achieves Graceful Degradation.
Limitations: Addition of n processors does not make the
system n times faster due to contention of shared
resources, any device failure etc

UNIX, WINDOWS NT
Parallel computing is a type of computation in
which many calculations or the execution
of processes are carried out simultaneously.
Large problems can often be divided into
smaller ones, which can then be solved at the
same time. There are several different forms
of parallel computing: bit-level, instruction-
level, data, and task parallelism.
Distributed Systems

Distributed Systems
are loosely coupled
systems they have
their own local
memory and they do
not share clock and
memory. Eg.-AMOEBA,
SOLARIS, AIX, LINUX,
DYNIX
Properties of Distributed Systems
• Resource Sharing
• Computation speed-up
• Reliability
• Communication
Real Time Systems
A real-time operating system (RTOS) is an operating
system (OS) intended to serve real-time applications that
process data as it comes in, typically without buffer delays.
Processing time requirements (including any OS delay) are
measured in tenths of seconds or shorter increments of
time.
A real-time system is a time-bound system which has well-
defined, fixed time constraints. Processing must be done
within the defined constraints or the system will fail. They
either are event-driven or time-sharing.
Event-driven systems switch between tasks based on their
priorities, while time-sharing systems switch the task based
on clock interrupts. Most RTOSs use a pre-
emptive scheduling algorithm.eg- RTX, Zephyr, Linux Kernel
etc.
Computer System Organization
• Computer-system operation
– One or more CPUs, device controllers connect through
common bus providing access to shared memory
– Concurrent execution of CPUs and devices competing for
memory cycles
Computer-System Operation
• I/O devices and the CPU can execute concurrently
• Each device controller is in charge of a particular
device type
• Each device controller has a local buffer
• CPU moves data from/to main memory to/from
local buffers
• I/O does this from the device to local buffer of
controller
• Device controller informs CPU that it has finished
its operation by causing an interrupt.
Common Functions of Interrupts

• Interrupt transfers control to the interrupt service


routine generally, through the interrupt vector,
which contains the addresses of all the service
routines
• Interrupt architecture must save the address of
the interrupted instruction
• A trap or exception is a software-generated
interrupt caused either by an error or a user
request
• An operating system is interrupt driven.
Operating-System Operations
Interrupt driven (hardware and software)
– Hardware interrupt by one of the devices
– Software interrupt (exception or trap):
• Software error (e.g., division by zero)
• Request for operating system service
• Other process problems include infinite loop, processes
modifying each other or the operating system
Operating-System Operations (cont.)
• Dual-mode operation allows OS to protect itself
and other system components
– User mode and kernel mode
– Mode bit provided by hardware
• Provides ability to distinguish when system is running user
code or kernel code
• Some instructions designated as privileged, only executable
in kernel mode
• System call changes mode to kernel, return from call resets it
to user
• Increasingly CPUs support multi-mode operations

You might also like