1
CS 4410 Operating Systems
Memory: Hardware and Allocation
Summer 2011 Cornell University
Memory: Hardware and Allocation Summer 2011 Cornell University 1 - - PowerPoint PPT Presentation
CS 4410 Operating Systems Memory: Hardware and Allocation Summer 2011 Cornell University 1 Today How the memory is shared among the ready processes? Memory Address protection Logical vs Physical Address Contiguous memory
1
Summer 2011 Cornell University
2
3
Registers Cache (L1, L2, L3) Memory Hard Disk
4
5
6
–
Entire process (code, data) is transferred from disk to memory, and vice versa.
–
Processes can run when they are partially in the memory.
7
– The physical addresses are known to the programmer.
– The physical addresses are known at the loading time.
– The physical addresses are known at the execution. – The CPU understands logical addresses. – The Memory understands physical addresses.
8
9
OS process process process
25600 30004 42094 88000 30004 12090
base limit
10
11
CPU memory +
14000 Relocation register Logical address 346 Physical address 14346
12
13
– It checks if the routine is in the memory. – If not, the program loads the routine.
14
CPU < + memory limit register relocation register trap: addressing error logical address no yes physical address
15
– First fit – Best fit – Worst fit
16
17