Professional Documents
Culture Documents
SV Basics of OS
SV Basics of OS
THE
OPERATING SYSTEMS
V SEM ETC
NIT RAIPUR
Shrish Verma
UNIT-I
10-3
Operating System As Resource manager
A Resource Manager
Operating System is seen as a way of providing the users
of the computer with the resources they need at any
given time.
Some resource requests may not be able to be met
(memory, CPU usage etc.) but the operating system is
able to deal with scheduling problems such as these.
Other resources have a layer of abstraction placed
between them and the physical resource (e.g. a printer).
Hardware Resources of a Computer System
The Processor
10-6
Operating System Resource
Management (Sharing)
Process Management (Sharing the CPU)
Sharing IO devices
Main (Primary Memory) Management
(Shared among many programs)
Disk (Secondary Memory) Management (More
sharing)
10-7
Major OS’s
Unix
Windows
Linux
Mac OS
Embedded OS’s (Android, iOS)
Real-Time OS’s
10-8
Which is the BEST OS??
NONE are “best”
10-9
A Little History - Mainframes
Mainframes – from 1950
10-10
Mainframe
Circa 1950
10-11
Mainframe
IBM System 360 circa 1964
10-12
A Little History - Unix
Mainframes were often shared by many users
A multiuser OS was needed and Unix arose to fill
this need
Ken Thompson wrote the first version in 1969
Dennis Ritchie developed ‘C’ language in 1973
The above two developed 5th Ed Unix in 1974 written in
‘C’ language
IBM, Digital Equipment Corporation (DEC), Honeywell,
Hewlett Packard each had their own proprietary version
on Unix
10-13
A Brief Time-line of evolution of UNIX
4. 1
4. 2
4. 4
D
D
BS
BS
BS
V1
V4
V7
V3
I X
s
IX
IX
IX
IX
U
ic
D
UN
UN
UN
UN
Mu
Un
BS
II I
V
1965 1969 1970 1973 1974 1979
m
em
AT
e
&T
st
st
Sy
Sy
UN
I X
1982 1984
10-15
APC’s
Little History
and Macs – 1980’s
– PC’s n Macs
IBM PC
IBM hired MS to supply DOS (A basic
command-line OS)
MS bought DOS from another party
Apple Macintosh
Apple wrote theie own GUI OS
Apple borrowed the idea from Xerox PARC
10-16
A Little History – Windows OS
IBM PC needed a GUI
IBM hired MS to write OS2 for PS2 (not Playstation!)
MS wrote Windows at the same time
Guess who won?
10-17
Operating System Architecture/ Structure
MONOLITHIC ARCHITECTURE
Operating system software to manage the resources of the system are
contained in a single package which is called the ‘KERNEL’.
FILE
PROCESS MEMORY DEVICE CONCURR
SYSTEM
MGMT MGMT MGMT ENCY IPC
MGMT
HARDWARE
Advantages of Monolithic Architecture
Easy and Simple: Its structure is easy and simple as all the
components are in the same address space.
An operating system
interacts with different
aspects of a computer
system on one side and
with the user on the
other.
10-21
LAYERED ARCHITECTURE
OS is modularized
giving rise to
abstraction of having
different ‘LAYERS’
Better management of
services, better for
further development
of services/
components
These layers are so
designed that each
layer uses the
functions of the lower-
level layers. This
simplifies the
debugging process Layered Abstraction of the UNIX Operating
System
for each layer.
Layered Abstraction of the Operating System
USER/S
APPLICATIONS, UTILITIES,
OFFICE, MATLAB, VIDEO PLAYERS, DBMS SYS, N/W, ETC.
OPERATING SYSTEM UTILITIES
TEXT EDITORS, COMPILERS, ETC.
Kernel / Resident OS
HARDWARE
ADVANTAGES OF LAYERED OS
Modularity: This architecture promotes modularity because each layer only does its
assigned duties.
Easy debugging: It is relatively simple to debug because the layers are discrete. If a
mistake happens in the CPU scheduling layer, the developer can only debug that
layer, as opposed to a Monolithic system where all services are present at the same
time.
Easy update: A change made to one layer will have no effect on the other layers.
No direct access to hardware: The hardware layer is the design's innermost layer.
So, unlike the Simple system, where the user has direct access to the hardware, a
user can use hardware services but not directly modify or access it.
Abstraction: Every layer is focused on its own set of tasks. As a result, the other
layers’ functions and implementations are abstract.
Source: https://www.codingninjas.com/studio/library/operating-system-architecture
DISADVANTAGES OF LAYERED OS
Complex and careful implementation: Because a layer can use the services
of the levels below it, the layers must be carefully arranged. The memory
management layer, for example, is used by the backup storage layer. As a
result, it must be placed behind the memory management layer. As a result,
significant modularity leads to complicated implementation.
Source: https://www.codingninjas.com/studio/library/operating-system-architecture
MULTI-KERNEL ARCHITECTURE
CONTROL CARDS
Mouse
Keyboard
Microphone
camera
Joystick
Pen
Text on VDU
Graphics on VDU
Video on VDU and LS
Music/audio/voice on LS
Text/graphics/photos on Printer
Interactive Systems (OS)
In interactive systems the user and computer exchange information frequently and
dynamically. Norman’s evaluation/execution model is a useful way of
understanding the nature of interaction:
1. User has a goal (something to achieve)
2. User looks at system and attempts to work out how he would execute a series of
tasks to achieve the goal.
3. User carries out some actions (providing input to the system by pressing buttons,
touching a screen, speaking words etc)
4. System responds to the actions and presents results to the user. System can use
text, graphics, sounds, speech etc.
5. User looks at the results of his action and attempts to evaluate whether or not
the goals have been achieved.
A good interactive system is one where:
User can easily work out how to operate the system in an attempt to achieve his
goals.
User can easily evaluate the results of his action on the system.
Time Sharing Systems Ex. Mainframe
shared Dot Tele Typewriter
Matrix Printer Dumb Terminal
Tele Typewriter
Tele Typewriter Dumb Terminal
Dumb Terminal Central
Processing
Unit including
Memory,
Storage, etc.
Time sharing Systems
Time-sharing OS provides the following features for users:
Each user grabs dedicated time for all operations.
Multiple active users can use the same computer at the same
time.
End-users feel that they monopolize the computer system.
Better interaction between users and computers.
Each user’s job is run in a circular queue hence the Response
time is small for each one
It can make quick processing with a lot of tasks.
Source: https://www.codingninjas.com/studio/library/operating-system-architecture
Time Sharing Systems
Advantages of Time-Sharing OS
Source: https://www.codingninjas.com/studio/library/operating-system-architecture
Time Sharing Systems
MULTIPROGRAMMING
(MULTIPLE PROCESSES SCENARIO)
In multiprogramming, the process can be In this process, two or more users can use a
executed by a single processor. processor in their terminal.
Example: Mac OS, Window OS, Example: Windows NT server, Unix, Linux,
Real-Time Operating System - RTOS
The basic hardware for RTOS is the microcontroller and RTOS
is always specific to an embedded system used on an
appliance/machine
INTERRUPT
CONTROL FLASH RAM TIMER
CLOCK
CKT
PROCESSOR
Sensors
Conditioning
CLOCK CKT
PROCE
Signal
Ckt
SSOR
Actuato
BUS
POWE IO PORTS
r
CONTR
OL (Can be multiple)
R CKT
Sensors
Signal Analog to
Conditioning Digital Con. B
RTOS
Input Port
S
Actuators Signal Digital to Output Port P
Conditioning Analog Con.
Real – Time Operating System (RTOS)
RTOS is much smaller and runs of tight power and time constraint.
Applications Applications
n/w
schedulers
File System
protocol
RTOS
Facility
Debug
KERNEL Kernel
BSP Device
IO
Board Support Program Time Device
mgmt
Mgmt Drivers
BSP
Target Hardware Target Hardware
Distributed System
Internet
Client – Server System
Tightly Couples systems
Kernel/Multi-kernel Architecture
Homogeneity is required: Same type of the software on server
as well as clients.
Clients only interact with/through the server.
If the server fails all the services are stopped. Reliability issues
Peer-to-peer (P2P) System
Loosely Couples systems
Openness
Scalability
Heterogeneity
Reliability
Resource Sharing
Flexibility
OS for Mobile Devices Mac OS X
System Calls
Each system call has a procedure associated with it so
that system calls can be done in a familiar way.
The procedures places the parameters into registers
and informs the operating system
OS is informed via a TRAP instruction (sometimes
known as a kernel call or a supervisor call).
Operating System Concepts - 2