Lecture 2 18.3.2024
Lecture 2 18.3.2024
for OS
03/26/25 2
Architectural Features for OS
03/26/25 3
Protected Instructions
03/26/25 4
OS Protection
03/26/25 5
Crossing Protection Boundaries
03/26/25 6
Protection Modes and Crossing
OS Kernel
trap handler system service routine
trap to kernel
mode kernel mode
system call
User Programs
7
Memory Protection
03/26/25 9
I/O Control
• I/O issues:
– how to start an I/O (special instructions or memory-
mapped I/O
– I/O completion (interrupts)
• Interrupts are the basis for asynchronous I/O EXAM
– device controller performs an operation asynch to CPU
– device sends an interrupt signal on bus when done
– in memory is a vector table containing a list of addresses
of kernel routines to handle various events
– CPU switches to address indicated by vector specified by
the interrupt signal
03/26/25 10
I/O Control (cont) exam
device interrupts
03/26/25 12
Synchronization
03/26/25 13
EXERCISE
1. What do you understand the following terms as used in
OS?
i. System Call
ii. Interrupt
iii. Exception
iv. Error handler
v. User Mode and Kernel mode
vi. Synchronization and synchronization
2. Step by step briefly explain how controlling of I/O can be
done in OS.
3. With a well labeled diagram supported with brief
explanations, illustrate How does a user-mode program call
a kernel-mode service?
4. What is user model and kernel mode in OS?
5. Why user programmes executes in user mode and kernel
progrmmes executes in kernel mode?
03/26/25 14