Lect 1 - Introduction to Operating Systems Course
Lect 1 - Introduction to Operating Systems Course
Introduction to OS
Subrata Nandi, Dept. of CSE
“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
Figures/Tables utilized from the standard books or other sources has been
acknowledged in the respective slides
Secondary
Keyboard Printer Monitor
Memory
End User
(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
(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
• 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
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)
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
• 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
• 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
• (P-271 Bach) Initial versions of UNIX implemented Swapping systems but from System V4 the demand paging (virtual memory) systems were used
Dean Students
S0
S1
S2
S3 CSE Office
S4
S5 Staff (7
S6 seats)
S7
S8
S9
S14
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
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……
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
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
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]
• 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
- CPU efficiency
Evolution of Operating System:
Classes
Performance Metric:
Response Time
Time-shared Multiprogramming OS
Drawback –
Response time depends on system load;
unpredictable
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.
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
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
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,
•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)
•Stuart E. Madnick, Stuart E.. Madnick, John J. Donovan, John J.. Donovan, “Operating Systems”, (McGraw Hill)