Lecture 3 Flashcards
What are the two main approaches to multiplexing?
multiplex CPU operations (scheduling processes to run concurrently on a single processor),
and multiplexing memory (using virtual memory to enable many processes to share
physical memory).
When do we want a process to access the memory of another process?
inter-process communication (e.g. process A needs the computational result of process B)
Protection during multiplexing
memory access of one
process by another is prevented, meaning they cannot accidentally overwrite each others data.
Give an example of memory protection
Kernal data is protected by user programs as there is a range of physical memory allocated to storing kernal data and cant be accessed by user programs.
Memory multiplexing: controlled overlap
processes effectively communicate as to when each will access the shared resource so as there is no usage overlap.
Memory translation
mapping from virtual addresses (a specific memory
address in a very large range of possible memory addresses) to a physical addresses
(a specific memory address in a very limited range of possible memory addresses).
Does CPU use virtual or physical addresses
e CPU uses virtual addresses thus giving it
access to all programs that need to be scheduled to run (loaded into main memory).
cache memory
computer memory with very short access time used for storage of frequently used instructions or data
What is the basic problem of memory translation?
there are many processes that can be assigned logical memory addresses (e.g. using 64 bit memory
addresses), but there are relatively few physical memory addresses
Memory assignment
Process must be assigned to a free physical memory address that is of a suitable size for the process.
Memory protection
Because of limited physical memory processes must share main memory addresses. protection is needed to ensure that processes don’t access this shared memory at the same time.
Memory sharing
The problem is that the n processes must
be suitably divided up so as all processes are assignment a physical memory address and that an approximately equal number of processes share a physical address in main memory