Memory Multiplexing (3+4) Flashcards
two main approaches to multiplexing in an OS
multiplex CPU operations - schedule to run concurrently on single processor
memory mult - use v mem to enable many processes to share phys mem
reason for multiplexing
limited hardware resources
Explain the concept of protection in memory MUX
2 or more processes cannot accidently overwrite each others data
Example of memory protection
kernel data being protected from user program data
a specific range of physical memory addresses is reserved for kernel data only and not user data
Explain the notion of controlled overlap
The overlapping of concurrently running process needs to be controlled for protection to be implemented properly - mechanisms needed
Explain the concept of translation in memory MUX
mapping from virtual addresses to physical address
RAM uses physical addresses and CPU uses virtual addresses giving it access to all programs that need to be run
What are the different types of memory found in the memory hierarchy?
CPU registers, cache, Ram, disk
What is cache memory in the OS context
computer memory with very short acces time used for storage of frequently used data or instructions
Issues that arise with memory translation
many virtual addresses, few physical addresses - OS needs to map to a valid physical address that is free
Issues that arise with memory assignment
Assigned phys mem space must be free and large enough for the chunk but not too large
Issues that arise with memory protection
Processes must not access same address at same time - must not overwrite each other - process 1 must execute before being swapped out
Issues that arise with memory sharing
n processes share same address in phys mem
Problem - n processes must be divided properly so that each process is assigned phys mem and that equal processes share phys address - must be protected from each other
Explain the notion that a process doesnt need occupy continuous mem spaces
Process in Vmem is swapped into main memory - can be in pieces.
Process referenced by virtual memory can be swapped into main mem and executed bit by bit
Explain the role of the CPU in generating physical addresses
Addresses generated by cpu point directly to bytes is phys mem - when CPU assigns an executing process to physical memory, the process is assigned a chunk of memory that comprises of data words
Define words in the OS context
fixed size data chunks