A user closes a program that is running on a computer.
Describe how the operating system manages the main memory that the program was using.
Mark scheme
Award up to two marks for a linked description such as:
- The memory (that was) used by the program is freed/released/marked as free (1) so it can be allocated/reused by another program/process (1)
- The operating system's memory allocation table/record (of memory in use) is updated (1) to show that the program's memory locations/blocks are now free/available (1)
- The program's instructions/data are removed/overwritten in main memory (1) so the space they used is no longer reserved for that program (1)
- The memory pages/blocks allocated to the program are returned to the list of free pages/blocks (1) that can be used when the next program is loaded (1)
For both marks, the expansion must follow/associate with the statement.
Do not award two marks for the same idea described twice (e.g. the memory is freed and added to a list of free blocks); the two marks must come from two different linked descriptions.
Do not accept responses about closing the program window, stopping/terminating the program/process, saving the file or deleting the program from secondary storage/the hard disk.
Ignore statements that main memory is 'managed'/'cleaned up' with no development.
Example answers and how they were marked
The operating system updates its memory allocation table to show that the memory locations the program was using are now free, so another program can be loaded into them.
Why: The memory allocation table/record is updated (1) linked to showing the program's memory locations are now free/available (1).
The operating system frees up the memory the program was using.
Why: The memory used by the program is freed/released (1), but there is no linked development of what this allows.
The operating system deletes the program from the hard disk to free up memory.
Why: This confuses main memory with secondary storage; deleting the program from secondary storage is named in the 'Do not accept' line, so no creditworthy point is made.