Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Elements
Interface with OS software and functions Basic CPU Basic I/O Cache Procedures Memory protection Privilege modes Interrupts Statewords Processes
2001, P. J. Denning
CPU
pid
sw cache
RAM
2001, P. J. Denning 3
2001, P. J. Denning
Basic I/O
CPU Disk
Printer
RAM
CPU to DISK: STARTIO DISK TO RAM: DMA transfer DISK TO CPU: completion interrupt
2001, P. J. Denning
Basic I/O
STARTIO(i, j, a, b, rw, size)
Method 1: Package (a,b,rw,size) in packet from sender j to device i Method 2: Place (a,b,rw,size) in device block in memory --- memory mapped I/O
Transfer via Direct memory access (DMA) Finish with completion interrupt
2001, P. J. Denning
Cache
Hold subset of RAM contents in fast local-access store
RAM set = fixed set of pages mapping to a single slot; same number of pages in each set Cache holds one slot per set Index: table telling which page in each slot
2001, P. J. Denning 7
Sets:
0
0 4 8 12
1
1 5 9 13
2
2 6 10 14
3
3
0 1
7
2
12
3
5 11
0 1 2 3
11 15
12 5 2 11
cache
index
RAM
2001, P. J. Denning
hit probability
2001, P. J. Denning
linkage parameters
FRAME Call stack manages aaset of Call stack manages set of frames (activation records) of frames (activation records) of called procedures on aa stack. called procedures on stack. CPU stack environment registers CPU stack environment registers keep track of the stack. keep track of the stack. Linkage section contains return Linkage section contains return information to restore callers information to restore callers environment. environment. See separate presentation on See separate presentation on procedures for more detail. procedures for more detail.
SP
locals
working stack
2001, P. J. Denning
10
Memory Protection
CPU
descriptor B L
RAM
B:
working address A
Interrupts
CALL instruction uses handle Event detectors to set IP, S, and M Interrupt mask bits Interrupt number Interrupt vector = interrupt handler handles Interrupt handler Interrupt parameter (passed in register or atop stack) System Call instruction
2001, P. J. Denning
12
2001, P. J. Denning
13
2001, P. J. Denning
14
2001, P. J. Denning
15
2001, P. J. Denning
16
2001, P. J. Denning
17
2001, P. J. Denning
18
A more detailed description of these A more detailed description of these elements of process management can be elements of process management can be found in the slides about time sharing. found in the slides about time sharing.
2001, P. J. Denning
19