- In a very simple OS, only one program at a time is in the memory. To run second program, the first one has to be removed and the second one placed in memory. Single Tasking System.
- More sophisticated OSs allow multiple programs to be in memory at the same time. To keep them from interfering with one another (and with OS), some kind of protection mechanism is needed. Multi Tasking System.
- Main memory is a large array of words or bytes, ranging in size from hundreds of thousands to billions. Each word or byte has its own address.
- The central processor reads instructions from main memory during the instruction-fetch cycle and both reads and writes data from main memory during the data-fetch cycle (on a Von Neumann architecture).
- For a program to be executed, it must be mapped to absolute addresses and loaded into memory. As the program executes, it accesses program instructions and data from memory by generating these absolute addresses. Eventually, the program terminates, its memory space is declared available, and the next program can be loaded and executed.
- The OS is responsible for the following activities in connection with memory management:
- Keeping track of which parts of memory are currently being used and by whom,
- Deciding which processes (or parts thereof) and data to move into and out of memory,
- Allocating and deallocating memory space as needed.
Cem Ozdogan
2010-02-20