Download presentation
Presentation is loading. Please wait.
Published byAllen Chapman Modified over 9 years ago
1
OPERATING SYSTEM OVERVIEW
2
Contents Basic hardware elements
3
Most I/O devices are much slower than the processor Interrupts Interrupt request signal Active waiting cycle (polling)
4
An interrupt cycle is added to the instruction cycle (fecth and execute). The processor checks to see if an interrupt has occured (interrupt signal) Interrupt mechanism
5
interrupt handler interrupt vector Interrupt mechanism
6
CPU saves PS and PC (push) into the control stack CPU loads into PC and PS the corresponding values from the interrupt vector Interrupt processing
7
iret interrupt handler execution Interrupt processing
8
Interrupt enable/disable bit (PS register) Hardware priority STI (Set Interrupt) CLI (Clear Interrupt) Interrupt mechanism
9
main memory i+1 PS inth 1OO i i 149 15O iret 1OOO 12OO 12O1 main memory inthinth progprog interruptinterrupt 1 1 2 2 3 3 interrupt vector Interrupt processing
10
PS prog 12O1 3824 PS PC SP stack main memory 3824 39OO CPU completes execution of the current instruction Interrupt processing
11
interrupt signal has been accepted PS inth 1OO 3822 PS PC SP stack main memory 3824 39OO 12O1 PS prog 3823 3822 Interrupt processing
12
PS inth 151 3822 PS PC SP stack main memory 3824 39OO 12O1 PS prog 3823 3822 iret execution Interrupt processing
13
stack main memory 3824 39OO PS prog 12O1 3824 PS PC SP iret completed Interrupt processing
14
O.S.Components Contents
15
Process Management O.S. COMPONENTS Main-Memory Management Secondary-Memory Management
16
File Management I/O-System Management O.S. COMPONENTS
17
Creating and deleting processes Suspending and resuming processes Provide mechanisms for process interaction Process management
18
Keeping track of which parts of memory are currently being used and by whom Main memory management
19
Deciding which processes are to be loaded when memory becomes available Main memory management
20
Allocating and deallocating memory space as needed Main memory management
21
Secondary memory management Free space management Storage allocation Disk scheduling
22
I/O SYSTEM MANAGEMENT The I/O subsystem consists of A memory-management component that includes buffering and spooling
23
A general device driver interface Drivers for specific hardware devices A general device driver interface Drivers for specific hardware devices I/O SYSTEM MANAGEMENT The I/O subsystem consists of I/O SYSTEM MANAGEMENT The I/O subsystem consists of
24
File management Creating and deleting files and directories Supporting primitives for manipulating file and directory
25
Mapping files onto storage Backing up files on stable storage media File management
26
Protection systems Mechanism for controlling the access of processes to system resources
27
The mechanism must provide means for specifying the controls to be imposed and means for enforcement Protection systems
28
The interface between users and O.S. A program that reads and interpretes control statements The interface between users and O.S. A program that reads and interpretes control statements Comand-Interpreter System
29
Its main function: to get next command statement and execute it (shell) Comand-Interpreter System
30
System calls Contents
31
Processes communicate with the O.S. and request services to it by making system calls System Calls
32
System calls provide the interface between any process and O.S. System Calls
33
Process control Examples of System Call Communications Information management Device manipulation File manipulation
34
Corresponding to each system call there is a library procedure Corresponding to each system call there is a library procedure
35
count= read (file, buffer, nbytes) count returns the number of bytes actually read C program Example: read system call
36
Library read procedure operating system system call READ INT return from INT register x x call parameters load x system call READ 2 3 1
37
Puts the parameters of the system call in machine registers The library procedure The control is returned to the caller by returning the status code as a result Issues a INT instruction to start the O.S.
38
directly via registers in a memory block whose address is passed as a parameter in a registry into the stack (push, pop) directly via registers in a memory block whose address is passed as a parameter in a registry into the stack (push, pop) Methods to pass parameters to operating system
39
hardware (CPU, memory, disks, terminals, …) UNIX O.S. (process management, memory management, file system, I/O,...) standard library (open, close, read, write,..) utility programs (shell, compiler, …) users user mode kernel mode user int. library interface system call interf.
40
Dual mode of operations user mode Hardware control does not allow the execution of privileged instructions Used for normal execution of user programs
41
Used for the execution of O.S. functions as required by system calls supervisor mode (kernel mode) All instructions can be executed Dual mode of operations
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.