Seneca

Memory & Process Management

Computer Science: OCR GCSE, topic 1.5.5

Memory and Process Management

The memory (RAM) and the central processing unit (CPU) are hardware. A part of the operating system manages both of these components.

Purpose of memory manager

Purpose of memory manager

  • The memory manager controls the allocation of random access memory (RAM) to each running process.
  • If the memory manager fails to manage memory well, then the computer will slow down and might crash.
  • The memory manager moves data from secondary storage into RAM.
  • The data can be removed from RAM when no longer needed.
Purpose of process manager

Purpose of process manager

  • Modern operating systems allow users to run multiple programs at once.
  • In reality, a CPU can only execute one process at a time.
  • So the CPU must switch between processes so quickly that the processes seem to be running at the same time.
Memory allocation

Memory allocation

  • The OS gives memory in RAM when an application or process starts.
  • If an application or process needs more memory, the OS gives the application or process more memory.
  • The OS must be careful not to overwrite memory given to any other application or process running.
Multitasking

Multitasking

  • Modern operating systems allow multiple applications to run at once.
  • Running multiple applications at once is known as multitasking.
  • For multitasking to work, the OS must manage how memory and CPU time is given to each running process.
How multitasking works

How multitasking works

  • If there is only one CPU, the OS manages the tasks of each application or process.
  • The OS makes the tasks of different applications or processes appear to run at the same time.
  • The OS swaps quickly between the instructions of each application or process.
  • The OS assigns processes or applications to each core.
  • So more than one set of instructions is executed at the same time.

Test yourself on Memory & Process Management

  • What might happen if the memory manager does not efficiently manage the memory?

  • In reality, how many processes can be run on a single processor at once?

  • Choose the statement that is true.

  • A computer has four CPU cores instead of just one. How does multitasking change compared with a computer that has only one CPU core?

  • Two applications are each given their own area of RAM by the operating system. Why does the operating system keep these two memory areas separate?

Practise this topic for free