0% found this document useful (0 votes)
9 views

Lect 1 - Introduction to Operating Systems Course

Uploaded by

kumharvivek6791
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views

Lect 1 - Introduction to Operating Systems Course

Uploaded by

kumharvivek6791
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 58

CSC 403 Operating System

Dept. of Comp. Sc. & Engg., NIT Durgapur

Introduction to OS
Subrata Nandi, Dept. of CSE

[email protected]

“My ultimate goal is to create operating systems for myself that allow me to think as little as possible about the
silly decisions you can make all day long - like what to eat or where we should meet - so I can focus on making
real decisions. Because mental energy is a finite quantity” – Alexa Von Tobel, CEO of LearnVest
Outline
• What is an Operating System (OS)
• Resources Manager
• Abstraction of bare hardware
• General view of a Computing System
• Description of Components
• Course Materials
• NPTEL videos
• Book References
• Evolution of OS
• Batch Processing OS
• Batch Multiprogramming OS
• Time-shared Multiprogramming OS
• Real-time OS
• Networking OS
• Distributed OS

Operating Systems (CSE 403) 2025, [email protected] 2


c.in
The study materials/presentations are solely meant for academic purposes and
they can be reused, reproduced, modified, and distributed by others for
academic purposes only with proper acknowledgements

Figures/Tables utilized from the standard books or other sources has been
acknowledged in the respective slides

Operating Systems (CSE 403) 2025, [email protected] 3


c.in
What is an Operating System (OS)?

Operating Systems (CSE 403) 2025, [email protected] 4


c.in
What is an Operating System (OS)?
• Operating system (OS) is a system software
• that acts as the resource manager of a computing system
• provides an abstract interface of the bare hardware to the user

Operating Systems (CSE 403) 2025, [email protected] 5


c.in
What is an Operating System (OS)?
• Operating system (OS) is a system software
• that acts as the resource manager of a computing system
• provides an abstract interface of the bare hardware to the user

• Resources in a Computing System


• Hardware resources:
CPU
Primary Memory (RAM, ROM)
Secondary Memory (Hard Disk, Flash drive, etc.
I/O devices (Keyboard, Monitor, Printer, etc.)
• Software resources:
Files

Secondary
Keyboard Printer Monitor
Memory

Schematic View of a Computing system


Operating Systems (CSE 403) 2025, [email protected] 6
c.in Classes of Interrupt (Courtsey : D. M. Dhamdhere Book (MGH))
What is an Operating System (OS)?
• Operating system (OS) is a system software
• that acts as the resource manager of a computing system
• provides an abstract interface of the bare hardware to the user

• Resources in a Computing System


• Hardware resources:
CPU
Primary Memory (RAM, ROM)
Secondary Memory (Hard Disk, Flash drive, etc.
I/O devices (Keyboard, Monitor, Printer, etc.)
• Software resources:
Files

Key design issue is to deal with


resource sharing policies Networked Computing Environments
Operating Systems (CSE 403) 2025, [email protected] 7
c.in
What is an Operating System (OS)?
• Operating system (OS) is a system software
• that acts as the resource manager of a computing system
• provides an abstract interface of the bare hardware to the user

• Resources in a Computing System


• Hardware resources:
CPU
Primary Memory (RAM, ROM)
Secondary Memory (Hard Disk, Flash drive, etc.
Input/Output (I/O) devices (Keyboard, Monitor, Printer, etc.)
• Software resources:
Files
OS course modules
• CPU management (Process management)
• Memory management (RAM management)
• File Management (includes Disk Management)
• I/O management Operating Systems (CSE 403) 2025, [email protected]
c.in
8
What is an Operating System (OS)?
• An operating system (OS) is
• the resource manager of a computing system
• which provides an abstraction (interface) of the bare hardware to the user

End User

• Abstraction Examples Programmer


• Allows a user to run a process (program in
execution) of 1TB size in a system of 8GB RAM OS Designer
Application Programs
Utilities
• Allows a user to write just a printf(“…”, , , ,)
Operating System
statement to display values no matter if the display
unit is VGA monitor, LCD monitor or a projector Computer Hardware

Layers of a Computing System (Courtesy: W. Stallings Book)


• Provides Application Programming Interface (APIs) to develop applications and
suitable User Interface (UI) to enable interaction with the system
Operating Systems (CSE 403) 2025, [email protected] 9
c.in
General view of a Computing
System

Operating Systems (CSE 403) 2025, [email protected] 10


c.in
General view of a Computing
System
A single computing system can accommodate
more than one process simultaneously…..

• Primary Memory (PM)


RAM
Resident
modules
System (kernel)
area
(holds OS
processes) Secondary
Keyboard Printer Monitor
P2 User area Memory

(holds user
X processes)
P3
Y User processes generally in user
P1 Fence Registers mode cannot access instructions in
Lower Bound Register (LBR) & the system area;
Upper Bound Register (UBR) But can do it if the process is in the
P4 for memory protection (kernel) privileged mode
Operating Systems (CSE 403) 2025, [email protected] 11
c.in
General view of a Computing
System
Modern OS enables an user to run a process of size 1 TB in
a system of RAM 8GB

• Memory Management Unit (MMU) – Address Translation Unit


RAM
Resident
modules
System (kernel)
area
an illusion of a
(holds OS memory that
processes) may be larger
User area Hard Disk that the real
memory of a
(holds user computer
processes) V
R P3 MMU/ATU translates
V Virtual address (V) to
Real address (R)
VR

Operating Systems (CSE 403) 2025, [email protected] |V| >> |R| 12


Physical memory space c.in Virtual memory space
General view of a Computing
System
A single computing system can accommodate
more than one process simultaneously…..

• Central processing Unit (CPU)


User-Visible registers – (accessible only in user mode)
GPRs, Addresses Registers (Index Reg., Stack Pointer, etc.)

Special-Purpose Registers – (accessible only in privileged mode) Secondary


Memory
Memory Buffer Reg. (MBR),
Memory Address Reg. (MAR),
I/OAR, I/OBR Program Status Word (PSW) Preemption – act of temporarily interrupting a task being carried out with the
Instruction Register (IR), intention of resuming the task at a later time
Program Counter (PC),
Control Code (CC) i.e. Flags,
Context switching – during preemption the CPU switches processing from one
running process A to another process B;
Mode Bit (M) – kernel (system) mode/user mode
Memory protection Information (MPI), State of the CPU (contents of all registers GPRs, PSW, SPRs, etc.) corresponding
Interrupt Mask (IM), to the process A need to be saved and state of the CPU corresponding to
process
Operating Systems B need
(CSE 403) to be loaded
2025, [email protected] 13
Interrupt Code (IC) c.in
Interrupts in OS
• OS is an event driven program; runs constantly and depends on events happening to execute the modules
• An event is any situation that requires the operating system’s attention.
• The OS designer associates an interrupt with each event, to report the occurrence of the event to the OS and
enable it to perform appropriate event handling actions

Software Interrupt Instruction


• Classes of Interrupts
int (INTEL x86 processors),
(Table Courtsey : D. M. Dhamdhere Book (MGH)) swi (ARM processors),
trap in MOTOROLA 68000,
syscall in MIPS R3000

(Trap or
Exception)
make requests to the kernel for resources/services that are
(Includes the System Calls) not allowed access in user mode
Operating Systems (CSE 403) 2025, [email protected] 14
c.in
Interrupts in OS
• Interrupt Code - the hardware sets an interrupt code in the IC field of the PSW; indicates which specific interrupt
within that class of interrupts has occurred; useful to know the cause
• These codes are machine specific
- For I/O interrupt, the interrupt code is typically the address of the I/O device
- Assigns distinct codes for exceptional conditions (overflow, memory protection violation, etc.)
- Reserves a set of interrupt codes (0-255) for the software interrupts

• Interrupt Masking - The interrupt mask (IM) field of


the PSW indicates the enabled interrupts (permitted to
occur at the present moment of time)
• Interrupt Action (event handling) –
Instruction exe cycle (fetch, decode, execute, check interrupt)
if an interrupt has occurred, the CPU performs the interrupt action
An interrupt vector contains the following information:
- Address of an interrupt servicing routine
- Interrupt mask
- A bit 0/1 to indicate if CPU should be in kernel
Operatingor user(CSE
Systems mode
403) 2025, [email protected] 15
c.in
(Interrupt Action; Courtsey : D. M. Dhamdhere Book (MGH))
System Calls (Software Interrupt) in
OS
• System Call - A request that a program makes to the kernel through a software interrupt
- user programs (in user mode) cannot access critical resources like I/O, memory, SPRs, etc. directly ; they must make requests to the
kernel, and the kernel (in kernel/priviledged mode) must access resources on their behalf
• The user program calls a library function which actually uses the resource invoking a method as kernel service,
generic term for such methods system call
Sample set of Linux system calls

Schematic of System Calls

Operating Systems (CSE 403) 2025, [email protected] 16


(Courtsey
c.in : D. M. Dhamdhere Book (MGH))
General view of a Computing
System
A single computing system can accommodate
more than one process simultaneously…..

• I/O Unit
Device Controllers – hardware component; intermediary between Device and OS
It is a card/microchip that handles the incoming/outgoing signals of the CPU; device is connected
to the computer via a plug and socket, and the socket is connected to a device controller
Secondary
Device driver - software code, an interface between device controller and OS Memory

Various types of I/O transfer -


Programmed I/O – CPU is responsible for to check the status of I/O transfer (poll) and transferring data from main memory to Buffer or buffer to main
memory; Drawback - data transfer is slow and the CPU is fully occupied with it (Repeated interrogation of status)

Interrupt Driven I/O – CPU issues a I/O command and go on to do some other work; I/O module interrupts the CPU when ready for data transfer, CPU
then executes data transfer; Drawback – also slow as it performs a byte-by-byte transfer of data with the CPU’s assistance(frees the CPU between byte transfers)

Direct Memory Access (DMA) – CPU issues a command to the DMA module, the DMA completes the entire (all blocks) data transfer of its own and
sends an interrupt signal to CPU. Advantage – transfer a block of data between memory and an I/O device without involving the CPU,
it achieves high data transfer rates and supports concurrent operation of the CPU and I/O devices
Operating Systems (CSE 403) 2025, [email protected] 17
c.in
Evolution of Operating System (OS)

Operating Systems (CSE 403) 2025, [email protected] 18


c.in
Evolution of Operating System:
Classes

Operating Systems (CSE 403) 2025, [email protected] 19


c.in
Evolution of Operating System:
Terminologies

Operating Systems (CSE 403) 2025, [email protected] 20


c.in
Evolution of Operating System:
Classes

Automatic job transition, Spooling, Command Interpreter, Monitor, Real memory


organization

Operating Systems (CSE 403) 2025, [email protected] 21


c.in
Batch Processing OS (1960) [1st developed by
General Motors in mid-1950s
for
• Basic IBM 701
computational machine]
Unit – Job (a sequence of programs that together achieve a common goal)
• Environment - Non-interactive; a user submits both a job and its data to the computer operator and receives the
results later in the day or the next day from operator (Ex: scientific computations, number crunching)
• Jobs submitted in form of punched cards

Primary
Memory

Batch OS
Kernel
Vaccum Tube Plug-in Unit https://www.pinterest.co.uk/pin/130111876720714361/
http://www.columbia.edu/cu/computinghistory/701.html
www.computerhistory.org
(Monitor)
• Prime Concern – minimize CPU idle time
• Functioning Single User
• The computer operator form a batch as a sequence of user jobs; each jobs are separated by special marker cards Process
indicating start/end of a job
• Execute one job at a time and within a job one program at a time
(multiple jobs don’t coexist in a computer’s memory, real memory organization)
Operating Systems (CSE 403) 2025, [email protected] 22
• The operator had to intervene only at thec.in
start and end of a batch
Batch Processing OS (1960)
• Key Concepts/Features
• Automatic transition between jobs;
• Control Statements and Command Interpreter
• Spooling - Simultaneous Peripheral Operations On-Line (SPOOL)
The temporary storage of input and output on I/Odevices,
typically magnetic disks and drums, in order to decrease CPU idle time

https://
www.slideshare.
net/
myrajendra/5-
spooling-and-
buffering

• CPU Scheduling – trivially as per job sequence formed by operator;


No algorithm required

• Memory – Real memory organization; entire process need to be in RAM;


one process present at a time, no portioning required
• Performance Metric
• Turnaround time - The time from submission of aSystems
Operating job, program,
(CSE 403) 2025, [email protected] 23
c.in
or process by a user to the time its results become available to the user
Evolution of Operating System:
Classes

Automatic job transition, Spooling, Command Interpreter, Monitor, Real memory


organization
Performance Metric: Batch Processing OS Drawback –
Turnaround time, Throughput CPU utilization is often very low (4% - 5%)

Operating Systems (CSE 403) 2025, [email protected] 24


c.in
Batch Multiprogramming OS (late
1960)
• Basic computational Unit – Job
• Environment - Non-interactive; user submits jobs to the operator and waits for the result; operator forms batch
• Prime Concern – minimize both CPU and I/O idle time; (max. resource utilization)

• Functioning
• Multiprogramming - many user programs can reside in the RAM
at a particular point of time program1

Primary Memory (portioned and shared among multiple coexisting processes) program2

Operating Systems (CSE 403) 2025, [email protected] 25


c.in
Batch Multiprogramming OS (late
• Key1960)
Concepts/Features
• DMA – Direct Memory Access; enables CPU and I/O execution happen simultaneously
• Memory Protection Registers - Bound registers or Base register & size register to stop illegal access

• Kernel and user modes of CPU


• CPU-bound program – more computation and very little I/O; CPU in long bursts (long time) before requiring an I/O operation
• I/O-bound program - involving a little computation and a lot of I/O; uses CPU in small bursts (short time) in between I/O operations
• Priority of programs - Policy - An I/O-bound program should have a higher priority than a CPU-bound program
• CPU Scheduling - Priority-based preemptive scheduling;
• Preemption condition –
• if a high-priority process becomes ready for execution
• If the running process required I/O
• Degree of Multiprogramming - number of programs that OS keeps in memory at all times, so that the CPU and I/O
devices will have sufficient work to perform

• Memory - Real memory Organization; primary memory portioned to accommodate multiple process simultaneously but
the entire process need to be in RAM (swapping system P-271 Bach)
• Performance Metric
• User’s perspective (Turnaround time)
• Systems Perspective (Throughput) - TheOperating
ratio ofSystems
the number
(CSE 403) of programs
2025, [email protected] 26
c.in
processed and the total time taken to process them; number of processes completed per unit time
Evolution of Operating System:
Classes

Automatic job transition, Spooling, Command Interpreter, Monitor, Real memory


organization
Multiprogramming, DMA, Memory Protection, kernel/user mode, I/O-bound CPU-bound
Performance Metric: programs, Priority-based preemptive scheduling, Degree of multiprogramming
Turnaround time, Throughput

Batch Multiprogramming OS Drawback –


Suitable for Non-interactive environments
Cannot be used for interactive jobs like
transaction processing

Operating Systems (CSE 403) 2025, [email protected] 27


c.in
Time-shared Multiprogramming OS (1970s)
[1st time-shared OS called CTSS developed by MIT by Project-MAC group for IBM 709 during 1961]

• Basic computational Unit – subrequest; a computational requirement submitted by the user


• Environment - Interactive; each user is equipped with a dumb terminal and one single CPU is shared by multiple users;
user repeatedly submits a subrequest using their keyboard and examines its response in monitor screen
• Prime Concern – minimize response time to a subrequest
Dumb Terminals
I/O Cable
connector

Dumb Terminal (No personal storage & CPU)


http://
www.ioconnections.com/ CPU Server
productdetail.aspx?id=497
https://worldcomputerinfo.blogspot.com/2013/02/ https://www.interaction-design.org/literature/book/the-
description-about-terminals-input.html encyclopedia-of-human-computer-interaction-2nd-ed/human-
• Functioning computer-interaction-brief-intro

• sharing the CPU time among processes in such a way


that each process to which a subrequest has been made would
get a turn on the CPU without much delay

Operating Systems (CSE 403) 2025, [email protected] 28


c.in
Time-shared Multiprogramming OS (1970s)
[1st time-shared OS called CTSS developed by MIT by Project-MAC group for IBM 709 during 1961]

• Additional Key Concepts/Features


• Dumb Terminal, Terminal connector hardware and cables
• Time-slice – time quantum (few ns/ms) any process can consume when scheduled to execute on the CPU
• Timer Interrupt – triggered when the time quantum elapses
• Address Translation unit (ATU) – need for implementation
• of virtual memory organization

• CPU Scheduling - round-robin scheduling with time-slicing


• Preemption condition
• If timer interrupt occurs
• If current process requires I/O

Operating Systems (CSE 403) 2025, [email protected] 29


c.in
Time-shared Multiprogramming OS (1970s)
[1st time-shared OS called CTSS developed by MIT by Project-MAC group for IBM 709 during 1961]
• Additional Key Concepts/Features
• Memory - Virtual memory organization;
• entire process resides in Secondary Memory; generally a smaller portion of RAM is allocated to the process that can accommodate only some portion
of the process; portions which are required are swapped in and out as required from Secondary memory;
• entire functioning is transparent to the user such that the user feels that system has a very large RAM being able to accommodate the entire process

• (P-271 Bach) Initial versions of UNIX implemented Swapping systems but from System V4 the demand paging (virtual memory) systems were used

Operating Systems (CSE 403) 2025, [email protected] 30


c.in
Virtualization of the Lecture Halls

Dean Students

S0
S1
S2
S3 CSE Office
S4
S5 Staff (7
S6 seats)
S7
S8
S9

Dean office also demands


S10
S11
S12

that both the


S13

S14

UG 2nd (19 students) &


S15
S16
S17

3rd yr (21 students)


S18
S19
S20

S21
S22
classes should be held Dean academi
simultaneously
S23
S24
S25
S26
S27 Hostel Buildings
S28
S29
S30
S31
S32
S33
S34 Operating Systems (CSE 403) 2025, [email protected] 31
CSE Building (Total students seating capacity
c.in 35)
Virtualization of the Lecture Halls

CSE UG Demands an
Coordinator illusion that the
need to take whole 3rd yr
care of creating attends lectures
the illusion together

Dean Students

S0
S1
S2
S3 CSE Office
S4
S5 Staff UG 3rd Yr
S6

S7
(19 UG 2rd Yr
S8
S9
studets) (21
students)
Dean office also
S10
S11
S12
Demands an
illusion that the
demands that both
S13

S14 whole 2nd yr


the UG 2nd & 3rd yr
S15
S16
S17
attends lectures
together
classes should be
S18
S19
S20

S21
S22
held simultaneously Dean academi
S23
S24
S25
S26
S27 Hostel Buildings
S28
S29
S30
S31
S32
S33
S34 Operating Systems (CSE 403) 2025, [email protected] 32
CSE Building (Total students seating capacity
c.in 35)
Virtualization of the Lecture Halls R0
R1
R2
R3 Sec 1
CSE UG An illusion that R4 Sec 1 (7 stud)
R5
Coordinator
divides a year
the whole 3rd yr R6 (7 stud)
attends lectures
in multiple together R7
R8 Sec 2
sections
R9 Sec 2 (7 stud)
R10
R11 (7 stud)
Dean Students R12
R13
Here each block (lecture hall)
can accommodate 7 students
R14 Sec 3
R15
R16
Sec 3 (7 stud)
S0
S1
R17
R18
(5 stud)
S2
S3
S4
CSE Office Seating R19
Staff
S5
S6 Block 0 UG 3rd Yr
S7
(19 UG 2rd Yr
S8 studets) (21
S9
S10 Seating students)
S11 An illusion that
S12
S13 Block 1 the whole 2nd yr
S14 attends lectures
Seating
S15
S16
S17
together
Block 2
S18
S19
S20

S21
Dean academi
S22
S23
S24
Seating
S25
S26
S27
Block 3 Hostel Buildings
Seating
S28
S29
S30

Block 4
S31
S32
S33
S34 Operating Systems (CSE 403) 2025, [email protected] 33
CSE Building (Total seating capacity 35) c.in
Virtualization of the Lecture Halls R0
R1
R2
R3 Sec 1
CSE UG An illusion that R4 Sec 1 (7 stud)
R5
Coordinator
divides a year
the whole 3rd yr R6 (7 stud)
attends lectures
in multiple together R7
R8 Sec 2
sections
R9 Sec 2 (7 stud)
R10
R11 (7 stud)
Dean Students R12
R13
Here each block (lecture hall)
can accommodate 7 students
R14 Sec 3
R15
R16
Sec 3 (7 stud)
S0 Mapping Table (Dept Routine) R17
(5 stud)
S1 R18
Seating Block
Yr InDept? #Lect #HostelR19
S2
S3 CSE Office
0
S4
S5 Staff (Sec) (Y/N) Hall Room UG 3rd Yr
S6
(19 UG 2rd Yr
S7
2(1) 1 4 ---
S8
S9 Block 1 studets) (21
S10
(3rd yr Sec 2) students)
An illusion that
S11
S12
2(2) 1 2 ----
S13 the whole 2nd yr
S14
2(3) 0 --- 45 attends lectures
S15
S16 Block 2 together
S17
(2nd yr Sec 2) 3(1) 0
S18
S19
S20
0--- 57
57
S21
3(2) 1 1 ----
S22 Block 3 Dean academi
S23
S24 (3nd yr Sec 3) 3(3) 1 3 ----
S25
S26
S27 Hostel Buildings
S28
S29
Block 4
S30
S31
(2nd yr Sec 1)
S32
S33
S34 Operating Systems (CSE 403) 2025, [email protected] 34
CSE Building (Total students seating capacity
c.in 28)
Virtualization of the Lecture Halls R0
R1
R2
R3 Sec 1
CSE UG An illusion that R4 Sec 1 (7 stud)
R5
Coordinator
takes care of
the whole 3rd yr R6 (7 stud)
attends lectures
creating the together R7
R8 Sec 2
illusion
R9 Sec 2 (7 stud)
R10
R11 (7 stud)
Dean Students R12
R13
Here each block (lecture hall)
can accommodate 7 students
R14
R15
Sec 3
Mapping Table (Dept Routine)
R16
R17
(7 stud)
S0
S1 R18
Seating
Yr InDept? #Lect #HostelR19
S2
S3 CSE Office
Block 0
S4
S5 Staff (Sec) (Y/N) Hall Room UG 3rd Yr
S6
(19 UG 2rd Yr
S7
2(1) 1 4 ---
S8
S9 Block 1 studets) (21
S10
(3rd yr Sec 1) 2(2) students)
An illusion that
S11
S12
1 2 ----
S13 the whole 2nd yr
S14
2(3) 0 --- 45 attends lectures
S15
S16 Block 2 together
S17
(2nd yr Sec 2) 3(1) 1
S18
S19
S20
01 ----
57
S21
3(2) 0 ---- 76
S22 Block 3 Dean academi
S23
S24 (3nd yr Sec 3) 3(3) 1 3 ----
S25
S26
S27 Hostel Buildings
S28
S29
Block 4
S30
S31
(2nd yr Sec 3)
S32
S33
S34 Operating Systems (CSE 403) 2025, [email protected] 35
CSE Building (Total students seating capacity
c.in 28)
Virtualization of the Lecture Halls R0
R1
R2
R3 Sec 1
CSE UG An illusion that R4 Sec 1 (7 stud)
R5
Coordinator
takes care of
the whole 3rd yr R6 (7 stud)
attends lectures
creating the together R7
R8 Sec 2
illusion
R9 Sec 2 (7 stud)
R10
R11 (7 stud)
Dean Students R12
R13
Here each block (lecture hall)
can accommodate 7 students
R14
R15
Sec 3
Mapping Table (Dept Routine)
R16
R17
(7 stud)
S0
S1 R18
Seating
Yr InDept? #Lect #HostelR19
S2
S3 CSE Office
Block 0
S4
S5 Staff (Sec) (Y/N) Hall Room UG 3rd Yr
S6
(19 UG 2rd Yr
S7
2(1) 1 4 ---
S8
Block 1 studets) (21
S9
S10 Dean wants to find out seat location……… students)
(3rd yr Sec 1) 2(2) 1 2 ---- An illusion that
S11
S12 Where UG 3rd Yr : R2 student is sitting in the Dept?
S13 the whole 2nd yr
1. (2/7)+1 -> 1 (#Sec)
S14
2(3) 0 --- 45 attends lectures
S15
S16 Block 2 2. Lookup in Routine entry 3(1); if (inDept) get LectHall -> 1 together
S17
(2nd yr Sec 2) 3(1) 1 3. Get Seat No: (1*7)+(2%7) -> 9
S18
S19 01 ----
57
S20 4. R2 -> S9
S21
3(2) 0 ---- 76
S22 Block 3 Dean academi
S23
S24 (3nd yr Sec 3) 3(3) 1 3 ----
S25
S26
S27 Hostel Buildings
S28
S29
Block 4
S30
S31
(2nd yr Sec 3)
S32
S33
S34 Operating Systems (CSE 403) 2025, [email protected] 36
CSE Building (Total students seating capacity
c.in 28)
Virtualization of the Lecture Halls (Handling Faults: WhenR0 Sections are found in Dept)
R1
R2
R3 Sec 1
CSE UG An illusion that R4 Sec 1 (7 stud)
R5
Coordinator
takes care of
the whole 3rd yr R6 (7 stud)
attends lectures
creating the together R7
R8 Sec 2
illusion
R9 Sec 2 (7 stud)
R10
R11 (7 stud)
Dean Students R12
R13
Here each block (lecture hall)
can accommodate 7 students
R14
R15
Sec 3
Mapping Table (Dept Routine)
R16
R17
(7 stud)
S0
S1 R18
Seating
Yr InDept? #Lect #HostelR19
S2
S3 CSE Office
Block 0
S4
S5 Staff (Sec) (Y/N) Hall Room UG 3rd Yr
S6
(19 UG 2rd Yr
S7
2(1) 1 4 ---
S8
Block 1 studets) (21
S9
Dean wants to find out seat location………
S10
(3rd yr Sec 1) 2(2) students)
An illusion that
S11
S12
1 2 ---- Where UG 3rd Yr : R10 student is sitting in the Dept?
S13
1. (10/7)+1 -> 2 (#Sec) the whole 2nd yr
S14
2(3) 0 --- 45 attends lectures
S15
S16 Block 2 2. Lookup in Routine entry 3(2); NOT (inDept) -> Fault together
S17
(2nd yr Sec 2) 3(1) 1 3. Get Seat No: (1*7)+(2%7) -> 9
S18
S19 01 ----
57 Fault- the section currently is not found in Dept
S20 4. R2 -> S9
S21
3(2) 0 ---- 76 Fault handling mechanism=>
S22 Block 3 • Dean academi
S23 Select a Sec (x) from Dept to be replaced to get a
S24 (3nd yr Sec 3) 3(3) 1 3 ---- free hall
S25
S26
S27 Hostel Buildings • Send back the students of Sec X to hostel
S28
Block 4 • Bring the students of the faulted Sec to Dept
S29
S30
(2nd yr Sec 3) • Update Table
S31
S32 • Then again apply seat conversion logic and show it
S33
S34 Operating Systems (CSE 403) 2025, [email protected] to the Dean 37
Dean will not feel the fault if this can be done quickly
CSE Building (Total students seating capacity
c.in 28)
Virtualization of the Lecture Halls R0
R1
R2
R3 Sec 1
CSE UG An illusion that R4 Sec 1 (7 stud)
R5
Coordinator
takes care of
the whole 3rd yr R6 (7 stud)
attends lectures
creating the together R7
R8 Sec 2
illusion
R9 Sec 2 (7 stud)
R10
R11 (7 stud)
Dean Students R12
R13
Here each block (lecture hall)
can accommodate 7 students
R14
R15
Sec 3
Mapping Table (Dept Routine)
R16
R17
(7 stud)
S0
S1 R18
Seating
Yr InDept? #Lect #HostelR19
S2
S3 CSE Office
Block 0
S4
S5 Staff (Sec) (Y/N) Hall Room UG 3rd Yr
S6
(19 UG 2rd Yr
S7
2(1) 1 4 ---
S8
Block 1 studets) (21
S9
Dean wants to find out seat location………
S10
(3rd yr Sec 1) S2(2) students)
An illusion that
S11
S12 end Se1 2 ---- Where UG 3rd Yr : R10 student is sitting in the Dept?
S13
c 1 fr 1. (10/7)+1 -> 2 (#Sec) the whole 2nd yr
S14
2(3) 0 om---R 45 attends lectures
S15
S16 Block 2 o om 1 2. Lookup in Routine entry 3(2); NOT (inDept) -> Fault together
S17
(2nd yr Sec 2) 3(1) 1 01 back
----
57 3. Get Seat No: (1*7)+(2%7) -> 9
S18

Bri to h o4.
ste R2 -> S9
S19
Fault- the section currently is not found in Dept
l
S20
ng3(2) 0 ---- 76 Fault handling mechanism=>
S21
S22 Block 3 Se c • Dean academi
Select a Sec say x from the Dept to be replaced to
S23
(3nd yr Sec 3) 2 1t
3(3) ot 3 ----
S24
get a free hall
he
S25
S26
Hostel Buildings • Send back the students of Sec x to hostel
S27
De
S28
Block 4 pt • Bring the students of the faulted Sec to Dept
S29
(2nd yr Sec 3)
in R • Update Table
oo
S30
S31
• Then again apply seat conversion logic and show it
S32
S33 m1 to the Dean
S34 Operating Systems (CSE 403) 2025, [email protected] 38
Dean will not feel the fault if this can be done quickly
CSE Building (Total students seating capacity
c.in 28)
Virtualization of the Lecture Halls R0
R1
R2
R3 Sec 1
CSE UG An illusion that R4 Sec 1 (7 stud)
R5
Coordinator
takes care of
the whole 3rd yr R6 (7 stud)
attends lectures
creating the together R7
R8 Sec 2
illusion
R9 Sec 2 (7 stud)
R10
R11 (7 stud)
Dean Students R12
R13
Here each block (lecture hall)
can accommodate 7 students
R14
R15
Sec 3
Mapping Table (Dept Routine)
R16
R17
(7 stud)
S0
S1 R18
Seating
Yr InDept? #Lect #HostelR19
S2
S3 CSE Office
Block 0
S4
S5 Staff (Sec) (Y/N) Hall Room UG 3rd Yr
S6
(19 UG 2rd Yr
S7
2(1) 1 4 ---
S8
Block 1 studets) (21
S9
Dean wants to find out seat location………
S10
(3rd yr Sec 2) 2(2) students)
An illusion that
S11
S12
1 2 ---- Where UG 3rd Yr : R10 student is sitting in the Dept?
S13
1. (10/7)+1 -> 2 (#Sec) the whole 2nd yr
S14
2(3) 0 --- 45 attends lectures
S15
S16 Block 2 2. Lookup in Routine entry 3(2); if (inDept) get Hall -> 1 together
S17
(2nd yr Sec 2) 3(1) 0 3. Get Seat No: (1*7)+(10%7) -> 9
S18
S19 0----- 62
57
S20 4. R2 -> S9
S21
3(2) 1 1 -----
S22 Block 3 Dean academi
S23
S24 (3nd yr Sec 3) 3(3) 1 3 ----
S25
S26
S27 Hostel Buildings
S28
S29
Block 4
S30
S31
(2nd yr Sec 3)
S32
S33
S34 Operating Systems (CSE 403) 2025, [email protected] 39
CSE Building (Total students seating capacity
c.in 28)
Virtualization of the Lecture Halls ( Directive to coordinators take lectures of ‘Extraordinary’ & ‘Good’ students separately)
Cat ‘G’ Cat ‘E’ Cat ‘G’
CSE UG R0 Sec 1
Coordinator Cat ‘E’ R1
Sec 1 Sec 1
An illusion that R2 (4 stud)
creates two the whole 3rd yr Sec 1 R3
(7 stud) (7 stud)
Category of attends lectures (5 stud) R4
R5
students ‘E’ & together R0 R6
‘G’ R1
Sec 1 R7
R2
R3 (5 stud)R8 Sec 2 Sec 2
Dean Students R4 R9
R10 (7 stud) (7 stud
Here each block (lecture hall) R11
R12
can accommodate 7 students Mapping Table (Dept Routine)
R13 Sec 3
S0
S1 Yr InDept? #Lect #Hostel (3 stud
S2 Block 0 (Cat (Y/N) Hall Room UG 3rd Yr
S3 CSE Office
S4
Staff Sec) (19
S5
S6 studets)
UG 2rd Yr
S7
2(E1) 0 --- 17
S8
Block 1 (21
S9
S10 Dean wants to find out conversion……… students)
(3rdyr ‘E’Sec 1)) 2(G1)
S11
S12
1 2 ---- Where UG 3rd Yr : Cat ‘E’,R3 student is sitting in the Dept? An illusion that
S13 the whole 2nd yr
1. (3/7)+1 -> 1 (#Sec)
S14
2(G2) 1 4 ----- attends lectures
S15
S16 Block 2 2. Lookup in Routine 3(E1) if inDept to get LectHall -> 1 together
S17
S18 (2ndyr ‘G’Sec2) 2(G3) 0 ---- 34 3. Get Seat No: (1*7)+(3%7) -> 10
S19
S20 4. Cat ‘E’, R2 -> S10
S21
3(E1) 1 1 ----
S22 Block 3 Dean academi
S23
S24 (3ndyr ‘G’Sec2) 3(G1) 0 ---- 62
S25
S26
S27 Hostel Buildings
3(G2) 1 3 ----
S28
S29 Block 4
S30
S31 (2ndyr ‘E’Sec1)
S32
S33
S34 Operating Systems (CSE 403) 2025, [email protected] 40
CSE Building (Total students seating capacity
c.in 28)
Class Room allocation’s analogy to the
virtual memory organization……

Operating Systems (CSE 403) 2025, [email protected] 41


c.in
Virtualization of the Memory (Paging System) V0
OS creates the illusion; V1
Divides Virtual space in V2
V3 Page 0
equal sized blocks
Experiences V4 Page 0 (7 loc)
(Pages) V5
illusion that the V6 (7 loc)
Maintains separate whole process 1
PMT for each process is in RAM V7
V8 Page 1
V9 Page 1 (7 loc)
V10
V11 (7 loc)
User 3 V12
V13
Here each RAM block (Frame)
comprises of 7 physical locations
V14 Page 2
V15
V16
Page 2 (7 loc)
R0 Page Map Table of Process 2 V17
(5 loc)
R1 V18
R2
R3 OS
Frame 0 InRAM? #Frame #SecMem
R19
R4
modules System area (Y/N) Sector
R5
R6
Virtual address space
of Process 3 Virtual address space
R7
1 2 ---- of Process 2
R8
R9 Frame 1 (19 virtual locations)
R10 (21 virtual locations)
R11 (Pr3 Page1) 0 - 29 Experiences
R12
R13 illusion that the
Each process maintains its own
R14 whole process 2
R15
R16 Frame 2 Page Mapping Table (PMT) separately and dynamically is in RAM
R17
(Pr2 Page 0) updates the PMT (unlike a class routine which is static)
R18
R19 Page Map Table of Process 3
R20
InRAM? #Frame #SecMem
R21
R22 Frame 3 (Y/N) Sector PMT’s are also stored in some RAM Frame User 2
R23
R24 (Pr3 Page 3)
1 1 ---
Secondary Memory
R25
R26
R27

R28
Frame 4 0 - 32
R29
R30
(Pr2 Page 3)
R31
R32 1 3 ---
R33
R34 Operating Systems (CSE 403) 2025, [email protected] 42
RAM (remaining capacity to hold user process
c.in 28 locations)
Virtualization of the Memory (Paging System) V0
OS creates the illusion; V1
Divides Virtual space in V2
V3 Page 0
equal sized blocks
Experiences V4 Page 0 (7 loc)
(Pages) V5
illusion that the V6 (7 loc)
Maintains separate whole process 1
PMT for each process is in RAM V7
V8 Page 1
V9 Page 1 (7 loc)
V10
V11 (7 loc)
User 3 V12
V13
Here each RAM block (Frame)
comprises of 7 physical locations
V14 Page 2
V15
V16
Page 2 (7 loc)
R0 Page Map Table of Process 2 V17
(5 loc)
R1 V18
R2
R3 OS
Frame 0 InRAM? #Frame #SecMem
R19
R4
modules System area (Y/N) Sector
R5
R6
Virtual address space
of Process 3 Virtual address space
R7
1 2 ----
R8
R9 Frame 1 of Process 2
R10
R11 (Pr3 Page1) 0 - 29
During execution for each time Experiences
R12
R13 OS along with the Address Translation Unit (ATU) performsillusion that the
R14 automatically addr translation without user’s intervention………
whole process 2
R15
Frame 2
R16
Q) Where P3’s Virtual address V2 is loaded in RAM i.e. getisthe
in RAM
R17
(Pr2 Page 0)
R18
R19 Page Map Table of Process 3 real address #R?
R20

R21
InRAM? #Frame #SecMem 1. (2/7)+1 -> 1 (#Page)
R22
R23
Frame 3 (Y/N) Sector 2. Lookup in P3’s PMT (1st entry) to get #Frame-> 1 User 2
R24 (Pr3 Page 3) 3. Get Physical Address : (1*7)+(2%7) -> R9
1 1 ---
Secondary Memory
R25
R26
R27 4. Address Translation V2 -> R9
R28
Frame 4 0 - 32
R29
R30
(Pr2 Page 3)
R31
R32 1 3 ---
R33
R34 Operating Systems (CSE 403) 2025, [email protected] 43
RAM (remaining capacity to hold user process
c.in 28 locations)
Virtualization of the Memory (Paging System) V0
[Handling Page Faults]
OS creates the illusion; V1
Divides Virtual space in V2
V3 Page 0
equal sized blocks
Experiences V4 Page 0 (7 loc)
(Pages) V5
illusion that the V6 (7 loc)
Maintains separate whole process 1
PMT for each process is in RAM V7
V8 Page 1
V9 Page 1 (7 loc)
V10
V11 (7 loc)
User 3 V12
V13
Here each RAM block (Frame)
comprises of 7 physical locations
V14 Page 2
V15
V16
Page 2 (7 loc)
R0 Page Map Table of Process 2 V17
(5 loc)
R1 V18
R2
R3 OS
Frame 0 InRAM? #Frame #SecMem
R19
R4
modules System area (Y/N) Sector
R5
R6
Virtual address space
of Process 3 Virtual address space
R7
1 2 ----
R8
R9 Frame 1 of Process 2
R10
R11 (Pr3 Page1) 0 - 29
OS along with the Address Translation Unit (ATU) performsExperiences
R12
R13 automatically addr translation even when a page fault occur
illusion that the
R14
1 4 --- Q) Where P3’s Virtual address V11 is loaded in RAM i.e. get the real
whole process 2
R15
Frame 2
R16
address #R? is in RAM
R17
(Pr2 Page 0)
R18
R19 Page Map Table of Process 3 1. (11/7)+1 -> 2 (#Page)
R20

R21
InRAM? #Frame #SecMem 2. Lookup in P3’s PMT (2nd entry) to get #Frame-> Page fault
R22
R23
Frame 3 (Y/N) Sector 3. Page Replacement: in Frame 3; P3’s Page 3 is replaced by Page 1 User 2
R24 (Pr3 Page 3)
1 1 ---
Secondary Memory
R25
R26
R27

R28
Frame 4 0 - 32
R29
R30
(Pr2 Page 3)
R31
R32 1 3 ---
R33
R34 Operating Systems (CSE 403) 2025, [email protected] 44
RAM (remaining capacity to hold user process
c.in 28 locations)
Virtualization of the Memory (Paging System) V0
[Handling Page Faults]
OS creates the illusion; V1
Divides Virtual space in V2
V3 Page 0
equal sized blocks
Experiences V4 Page 0 (7 loc)
(Pages) V5
illusion that the V6 (7 loc)
Maintains separate whole process 1
PMT for each process is in RAM V7
V8 Page 1
V9 Page 1 (7 loc)
V10
V11 (7 loc)
User 3 V12
V13
Here each RAM block (Frame)
comprises of 7 physical locations
V14 Page 2
V15
V16
Page 2 (7 loc)
R0 Page Map Table of Process 2 V17
(5 loc)
R1 V18
R2
R3 OS
Frame 0 InRAM? #Frame #SecMem
R19
R4
modules System area (Y/N) Sector
R5
R6
Virtual address space
of Process 3 Virtual address space
R7
1 2 ----
R8
R9 Frame 1 of Process 2
R10
R11 (Pr3 Page1) 0 - 29
OS along with the Address Translation Unit (ATU) performsExperiences
R12
R13 automatically addr translation even when a page fault occur
illusion that the
R14
1 4 --- Q) Where P3’s Virtual address V11 is loaded in RAM i.e. get the real
whole process 2
R15
Frame 2
R16
address #R? is in RAM
R17
(Pr2 Page 0)
R18
R19 Page Map Table of Process 3 1. (11/7)+1 -> 2 (#Page)
R20

R21
InRAM? #Frame #SecMem 2. Lookup in P3’s PMT (2nd entry) to get #Frame-> Page fault
R22
R23
Frame 3 (Y/N) Sector 3. Page Replacement: in Frame 3; P3’s Page 3 is replaced by Page 1 User 2
R24 (Pr3 Page 3) 4. Update P3’s PMT
1 1 ---
Secondary Memory
R25
R26
R27 5. Lookup in P3’s PMT (2nd entry) to get #Frame-> 3
R28
Frame 4 1 3 ---- 6. Get Physical Address : (3*7)+(11%7) -> R25
R29
R30
(Pr2 Page 3) 7. Address Translation V11 -> R25
R31
R32 0 ---- 22
R33
R34 Operating Systems (CSE 403) 2025, [email protected] 45
RAM (remaining capacity to hold user process
c.in 28 locations)
Virtualization of Memory (Segmented Paging System)
OS creates the illusion; Code Code
Divides Virtual space in few Segment Segment
logical blocks of unequal size Stack
P0
(Segments) P1
Page 0 Segment Page 0
Stack P2
Each segment is divided into Segment
P3
P4
(7 loc) (7 loc)
few equal sized blocks (Pages) P5
P0 P6
Maintains separate SMT for P1
Page 0
each process; where each SMT
P2 P7
Page 1 Page 0 Page 1
P3 (5 loc) P8
entry points to a PMT User 3 P4 P9
(7 loc) (4 loc) (7 loc)
P10
P11
P12
P13

Process 3’s Segment Map Table (SMT) Page 2


R0
Virtual address space
R1
R2
R3 OS
Frame 0
# PMT Segment Access of Process 3 (19 (3 loc)
System area
R4
R5 modules Segm Frame Length Permission locations) Virtual address space
R6
ent pointer bits(E/R/W) of Process 2 (21
R7 PMT of Pr 3’s SS
R8 locations)
R9 Frame 1 SS 5 0/1/1 InRAM? #Frame #SecMem
R10
R11 (Pr 3 (Y/N) Sector
R12
R13 SS, Page 0) CS 14 1/1/0
R14
1 1 -
R15 Frame 4
R16
R17 (Pr 2
R18
R19 CS Page 0) PMT of Pr 3’s CS
R20

R21 InRAM? #Frame #SecMem


R22 Frame 3 (Y/N) Sector User 2
R23
R24 (Pr3
R25
R26
R27
CS Page 1) 0 0 32 Secondary Memory
R28
R29
Frame 4 1 1 ---
R30
R31
(Pr 2
R32
R33
SS Page 0)
R34 Operating Systems (CSE 403) 2025, [email protected] 46
c.in
Virtualization of Memory (Segmented Paging System)
OS creates the illusion; Code Code
Divides Virtual space in few Segment Segment
logical blocks of unequal size Stack
P0
(Segments) P1
Page 0 Segment Page 0
Stack P2
Each segment is divided into Segment
P3
P4
(7 loc) (7 loc)
few equal sized blocks (Pages) P5
P0 P6
Maintains separate SMT for P1
Page 0
each process; where each SMT
P2 P7
Page 1 Page 0 Page 1
P3 (5 loc) P8
entry points to a PMT User 3 P4 P9
(7 loc) (4 loc) (7 loc)
P10
P11
P12
P13

Process 3’s Segment Map Table (SMT) Page 2


R0
Virtual address space
R1
R2
R3 OS
Frame 0
# PMT Segment Access of Process 3 (19 (3 loc)
System area
R4
R5 modules Segm Frame Length Permission locations) Virtual address space
R6
ent pointer bits(E/R/W) of Process 2 (21
R7 PMT of Pr 3’s SS
R8 locations)
R9 Frame 1 SS 5 0/1/1 InRAM? #Frame #SecMem
R10
R11 (Pr 3 (Y/N) Sector
R12
R13 SS, Page 0) CS 14 1/1/0
R14
1 1 -
R15 Frame 4
R16
R17 (Pr 2 OS along with ATU performs address translation automatically
R18
R19 CS Page 0) PMT of Pr 3’s CS Q) Where P3’s Virtual address V=(SS:P2) is loaded in RAM i.e. #R?
1. Lookup in P3’s SMT to find out PMT of SS (#Frame)
R20

R21 InRAM? #Frame #SecMem


R22
R23
Frame 3 (Y/N) Sector 2. Lookup in P3’s SS’s PMT (2/7)th entry to get #Frame-> 1 User 2
R24 (Pr3 3. Get Physical Address : (1*7)+(2%7) -> R9
4.Secondary Memory
R25
CS Page 1) 0 0 32
Address Translation V(SS:P2) -> R9
R26
R27

R28
R29
Frame 4 1 1 ---
R30
R31
(Pr 2
R32
R33
SS Page 0)
R34 Operating Systems (CSE 403) 2025, [email protected] 47
c.in
Virtualization of Memory (Segmented Paging System) Handling Page Faults
OS creates the illusion; Code Code
Divides Virtual space in few Segment Segment
logical blocks of unequal size Stack
P0
(Segments) P1
Page 0 Segment Page 0
Stack P2
Each segment is divided into Segment
P3
P4
(7 loc) (7 loc)
few equal sized blocks (Pages) P5
P0 P6
Maintains separate SMT for P1
Page 0
each process; where each SMT
P2 P7
Page 1 Page 0 Page 1
P3 (5 loc) P8
entry points to a PMT User 3 P4 P9
(7 loc) (4 loc) (7 loc)
P10
P11
P12
P13

Process 3’s Segment Map Table (SMT) Page 2


R0
Virtual address space
R1
R2
R3 OS
Frame 0
# PMT Segment Access of Process 3 (19 (3 loc)
System area
R4
R5 modules Segm Frame Length Permission locations) Virtual address space
R6
ent pointer bits(E/R/W) of Process 2 (21
R7 PMT of Pr 3’s SS
R8 locations)
R9 Frame 1 SS 5 0/1/1 InRAM? #Frame #SecMem
R10
R11 (Pr 3 (Y/N) Sector
R12
R13 SS, Page 0) CS 14 1/1/0
R14
1 1 -
R15 Frame 4
R16
R17 (Pr 2 OS along with ATU performs address translation automatically
R18
R19 CS Page 0) PMT of Pr 3’s CS Q) Where P3’s Virtual address V=(CS:P2) is loaded in RAM i.e. #R?
1. Lookup in P3’s SMT to find out PMT of CS (#Frame)
R20

R21 InRAM? #Frame #SecMem


R22
R23
Frame 3 (Y/N) Sector 2. Lookup in P3’s CS’s PMT (2/7)th entry to get #Frame-> Page fault
User 2
R24 (Pr3 3. Perform page replacement; update the CS’s SMT
4.Secondary
Get PhysicalMemory
R25
CS Page 1) 0 0 32
Address as using the #Frame as done in previous case
R26
R27

R28
R29
Frame 4 1 1 ---
R30
R31
(Pr 2
R32
R33
SS Page 0)
R34 Operating Systems (CSE 403) 2025, [email protected] 48
c.in
Time-shared Multiprogramming OS (1970s)
[1st time-shared OS called CTSS developed by MIT by Project-MAC group for IBM 709 during 1961]

• Additional Key Concepts/Features


• Memory
Virtual memory organization:
• entire process resides in Secondary Memory; generally a smaller portion of RAM is allocated to the process that can accommodate only some portion
of the process; portions which are required are swapped in and out as required from Secondary memory;
• entire functioning is transparent to the user such that the user feels that system has a very large RAM being able to accommodate the entire process
Virtual Memory Management: fast address translation, Page/Frame size, Frame allocation policy, Page replacement policy

• Inter-process Communication mechanisms


• to allow the processes to manage shared resource in a consistent way

• Performance Metric
• Response Time (rt)- The time from submission of a subrequest by a user
Operating Systems (CSE 403) 2025,
to the time a process responds to it [email protected]
49

- response time

- service time of a subrequest (time quantum) Choice of Time Quantum is tricky


- scheduling overhead

- CPU efficiency
Evolution of Operating System:
Classes

Automatic job transition, Spooling, Command Interpreter, Monitor, Real memory


organization
Multiprogramming, DMA, Memory Protection, kernel/user mode, I/O-bound CPU-bound
programs, Priority-based preemptive scheduling, Degree of multiprogramming
Time-slice, Timer Interrupt, Round-robin scheduling, Virtual Memory Organization

Performance Metric:
Response Time

Time-shared Multiprogramming OS
Drawback –
Response time depends on system load;
unpredictable

Operating Systems (CSE 403) 2025, [email protected] 50


c.in
Real-Time Operating System (RTOS)
Environment – Dedicated System towards processing inputs signals
coming from a large number of sensors from some physical system;

Inputs need to be processed and proper actions need to be taken within


pre-defined deadline

Prime Concern – ensure timely response


RTOS must have well-defined, fixed time constraints…..
WikiMedia: Kozloduy Nuclear Power Plant - Control Room
Hard real-time systems – needs guarantee that critical tasks complete on time
Ex: missile guidance systems, air traffic control systems, etc.

Soft real-time systems – time constraint less restrictive. A critical real-time task
gets priority over other tasks and retains the priority until it completes
Ex: virtual reality, undersea exploration and planetary rovers, etc.

Operating Systems (CSE 403) 2025, [email protected] https://www.absint.com/ait/slides/2.htm 51


c.in
Real-Time Operating System (RTOS)
Additional Key Concepts/Features

User-defined Interrupts

User-defined priorities – in contrast to Time-shared Multiprogramming where OS designer defines the pool of
interrupts and process priority levels

Deadline-based Scheduling

Fault tolerance – Each critical resource is maintained with multiple backups to overcome faults

Operating Systems (CSE 403) 2025, [email protected] 52


c.in
Evolution of Operating System:
Classes

Automatic job transition, Spooling, Command Interpreter, Monitor, Real memory


organization
Multiprogramming, DMA, Memory Protection, kernel/user mode, I/O-bound CPU-bound
programs, Priority-based preemptive scheduling, Degree of multiprogramming
Time-slice, Timer Interrupt, Round-robin scheduling, Virtual Memory Organization

Operating Systems (CSE 403) 2025, [email protected] 53


c.in
Network Operating System (NOS)
[early 90s]
Environment – autonomous systems connected via network (LAN/WAN)

Prime Concern – resource sharing


Network Resource – CPU, printer, scanner, files even a procedure

Additional Key Concepts/Features


Ethernet cables, hub, switch, router

Network Protocols – TCP, UDP, IP, etc. to enable connection among


different computers

Socket programming interface – enables two processes running in two different


computers communicate among each other; TCP socket, UDP socket

Network File System - allows a computer to mount file systems of a remote machine
connected over a network so that it can interact with those file systems as though they
are mounted locally
https://www.absint.com/ait/slides/2.htm

NOS Examples - Microsoft Windows Server 2003,


Operating Microsoft
Systems Windows
(CSE 403) 2025, Server 2008,
[email protected] 54
UNIX, Linux, Mac OS X, Novell NetWare, and
c.in BSD
Distributed Operating System
Environment – autonomous systems connected via network (LAN/WAN) Gets an
illusion of a
single system
Prime Concern – provide transparency in access to a collection of with
network connected systems and resources; loosely coupled systems accumulated
processing
and storage
Distributed OS power of all
running on the individual
Networked pool computing
of resources systems

Distributed operating system hides the existence of multiple


https://www.absint.com/ait/slides/2.htm
Users view the networked computing system as a collection of distinct
computers and provides a single-system image to its users;
machines connected by a communication subsystem
networked machines act as a virtual uniprocessor 55
Operating Systems (CSE 403) 2025, [email protected]
c.in
Distributed Operating System
Distributed operating system is one that looks to its users like an ordinary centralized operating system but runs on multiple,
independent central processing units (CPUs). The key concept here is transparency (use of multiple processors should be
invisible (transparent) to the user)

Functioning - Provide different levels of transparency


Access transparency – users should not need or be able to recognize whether a resource (hardware/software) is remote/local

Location transparency – no hint on the physical location of the resource; users can freely log on to any machine in the system
and access any resource without making any extra effort; Challenge : global resource naming facility

Replication transparency – number of replicated copies, replica name, replica management need not be known to user

Failure transparency - deals with masking from the users' partial failures in the system

Migration transparency - object (process or file) is often migrated from one node to another in a user-transparent manner

Concurrency transparency - each user has a feeling that he/she is the sole user of the system and other users do not exist;
global event ordering; global clock synchronization,

Scaling transparency - to allow the system Operating


to expand in (CSE
Systems scale
403)without disrupting the activities of the users
2025, [email protected] 56
c.in
OS Course Links: NPTEL
•Prof. P K Biswas, ECE, IIT Kharagpur; https://
www.youtube.com/watch?v=MaA0vFKt-ew&list=PLLDC70psjvq5hIT0kfr1sirNuees0NIbG

•Prof. SantanuChattopadhyay, EEC, IIT Kharagpur; https://nptel.ac.in/courses/106/105/106105214/

•Prof. Chester Rebeiro, CSE, IIT Madras; https://nptel.ac.in/courses/106/106/106106144/(2016)

•Prof. SouravBansal, CSE, IIT Delhi; https://nptel.ac.in/courses/106/102/106102132/(2018)

•Prof V Kamakoti, CSE, IIT Madras; https://nptel.ac.in/courses/106/106/106106157/(2017)

•Prof. P C Bhatt, CSE, IIScBangalore; https://nptel.ac.in/courses/106/108/106108101/(2009) pdf only

Operating Systems (CSE 403) 2025, [email protected] 57


c.in
OS Course : Book References

•William Stallings, “Operating Systems : Internals and Design Principles”, Ninth Edition (Pearson)

•Abraham Silberschatz, Peter B. Galvin, Greg Gagne, “Operating System Principles”, 7thEdition, (Wiley)

•Maurice J. Bach, “The Design of the UNIX Operating System”, Prentice-Hall International (1986)

•D. M. Dhamdhere, Operating Systems, 2ndEdition, (Tata McGraw Hill) (2006)

•Charles Crowley, “Operating Systems: A Design-Oriented Approach”, (McGraw Hill)

•Stuart E. Madnick, Stuart E.. Madnick, John J. Donovan, John J.. Donovan, “Operating Systems”, (McGraw Hill)

•J. Archer Harris, “Schaum'sOutline Of Operating Systems”, (McGraw Hill)

Operating Systems (CSE 403) 2025, [email protected] 58


c.in

You might also like