Lecture8_OPSYS
Lecture8_OPSYS
– large
– fast
– non volatile
• Memory hierarchy
– small amount of fast, expensive memory – cache
– some medium-speed, medium price main memory
– gigabytes of slow, cheap disk storage
7
Addressing
Requirements: Protection
• Processes should not be able to reference
memory locations in another process without
permission
• Impossible to check absolute addresses at
compile time
• Must be checked at run time
Requirements: Sharing
• Allow several processes to access the same
portion of memory
• Better to allow each process access to the
same copy of the program rather than have
their own separate copy
Requirements: Logical Organization
• Memory is organized linearly (usually)
• Programs are written in modules
– Modules can be written and compiled
independently
• Different degrees of protection given to
modules (read-only, execute-only)
• Share modules among processes
• Segmentation helps here
Requirements: Physical Organization
• Cannot leave the programmer with the
responsibility to manage memory
• Memory available for a program plus its data
may be insufficient
– Overlaying allows various modules to be assigned
the same region of memory but is time consuming
to program
• Programmer does not know how much space
will be available
Basic Memory Management
Basic Memory Management
Monoprogramming without Swapping or Paging
Palmtops
Embedded
system
14
Swapping (1)
15
Swapping (2)