VTU 6th Semester ECE Operating System PP
VTU 6th Semester ECE Operating System PP
2) Memory hierarchy
3) Interrupt structure
4) I/O organization
Krupananda S, Jetking
Model of a Computer System
3
Krupananda S, Jetking
1)The Central Processing Unit (CPU)
4
CPU contains two kinds of registers
1) General purpose registers
Also called program-accessible registers
Hold data, addresses, index values, or the stack pointer during
execution of a program
2) Control registers
Contain information that controls or influences operation of the CPU
Set of control registers is called the program status word (PSW)
Krupananda S, Jetking
The Central Processing Unit (CPU) (continued)
5
Krupananda S, Jetking
The Central Processing Unit (CPU) (continued)
6
2) User mode
Cannot execute privileged instructions
OS puts CPU in user mode while executing user programs
Krupananda S, Jetking
2)Memory hierarchy
8
MMU
Krupananda S, Jetking
Memory hierarchy (continued)
9
MMU
MMU
Krupananda S, Jetking
Memory hierarchy (continued)
11
Krupananda S, Jetking
12
Krupananda S, Jetking
3)Input/Output Subsystem
13
Krupananda S, Jetking
4)Interrupts
15
Krupananda S, Jetking
17
Krupananda S, Jetking
OS Interaction with the Computer and
User Programs
18
Krupananda S, Jetking
1)Controlling Execution of
19
Programs
When user program starts, PSW should contain:
1) Program counter (PC) field contains the address of the
first instruction in the program
2) Mode (M) field, set to user mode (1)
3) Memory protection information (MPI) field contains
start address in memory and size of program
4) Interrupt mask (IM) field, set to enable all interrupts
When program is interrupted, CPU state(PSW
and GPRs) are saved in the program table
When program is resumed, its CPU state is
Krupananda S, Jetking
Interrupt Processing (continued)
21
Nested interrupt Processing
Two approaches for nested interrupt processing :
1. Disable nested interrupts through masking
2. Service more critical interrupts in a nested manner interruptible
kernel
Krupananda S, Jetking
3)System Calls
22
Evolution (continued)
Real-time operating systems
Priority-based scheduling and deadline-aware scheduling
Distributed operating system
Let's programs share resources across network