Menu

Memory Management Exam Questions

16 Edexcel GCSE Computer Science (1CP2) exam-style questions on Memory Management (3.2 Software), 26 marks in all. Answer them on paper or print them, then open the mark schemes and example answers to see how each is marked.

Revise Memory Management first

Build a paper on 3.2 Software
Print
1Multiple choice1 mark

Identify the function of an operating system that includes allocating main memory to processes.

[1 mark]
  • AFile management
  • BPeripheral management
  • CProcess management
  • DUser management
Mark scheme
  • C Process management (1)
  • The only correct answer is C. The correct answer is process management; memory management is part of process management.
  • A is not correct because file management organises and stores files and folders, not main memory allocation
  • B is not correct because peripheral management controls devices such as printers and keyboards
  • D is not correct because user management controls user accounts and access
Example answers and how they were marked
Full marks1/1

C Process management

Why: Correct option: process management includes memory management, so it includes allocating main memory to processes (1).

No marks0/1

A File management

Why: File management organises files and folders, not main memory allocation. A near-miss from the same list of OS functions, so no mark.

No marks0/1

D User management

Why: Confuses managing user accounts and access with allocating main memory to processes; no creditworthy point.

2Multiple choice1 mark

A user opens a game that is stored on the computer's hard disk.

Identify the store that the operating system copies the game into so that it can be run.

[1 mark]
  • ACache
  • BMain memory
  • CRegisters
  • DSecondary storage
Mark scheme
  • B Main memory (1)
  • The only correct answer is B. The correct answer is Main memory.
  • A is not correct because the cache is small, fast memory in the CPU that holds frequently used instructions and data
  • C is not correct because registers are small storage locations in the CPU that hold the data being worked on
  • D is not correct because secondary storage is where the game is stored and copied from, not where it is copied into
Example answers and how they were marked
Full marks1/1

B Main memory

Why: Correct option: the operating system copies the game and its data from secondary storage into main memory so that it can be run (1).

No marks0/1

A Cache

Why: Cache holds frequently used instructions and data inside the CPU, but the program is not copied there to be run. Near-miss, no mark.

No marks0/1

D Secondary storage

Why: Shows the misconception that a program runs directly from secondary storage; the game is copied from secondary storage into main memory before it can be run.

3Multiple choice1 mark

A computer is running a web browser, a music player and a messaging app at the same time.

Identify what the operating system does when it allocates main memory to a process.

[1 mark]
  • AIt chooses an area of main memory that is not being used by another process
  • BIt chooses an area of main memory that is also used by the operating system
  • CIt chooses how many files the process is allowed to open at the same time
  • DIt chooses the user who is allowed to log on and start the process
Mark scheme
  • A It chooses an area of main memory that is not being used by another process (1)
  • The only correct answer is A. The correct answer is choosing an area of main memory that is not being used by another process.
  • B is not correct because the operating system keeps its own area of main memory and does not give it to a process
  • C is not correct because the number of files a process can open is part of file management, not memory management
  • D is not correct because user management controls who can log on and what each user is allowed to access
Example answers and how they were marked
Full marks1/1

A It chooses an area of main memory that is not being used by another process

Why: Correct option: as part of process management the operating system allocates each process an area of main memory that no other process is using (1).

No marks0/1

C It chooses how many files the process is allowed to open at the same time

Why: Near-miss: this is file management, not how main memory is allocated to a process, so no mark.

No marks0/1

B It chooses an area of main memory that is also used by the operating system

Why: Misconception: the operating system keeps its own area of main memory and does not give it to a process, so no mark.

4Multiple choice1 mark

The operating system keeps a record of where each program and its data are stored in main memory.

Identify why the operating system does this.

[1 mark]
  • ATo make sure each program is given a higher priority than the others
  • BTo make sure each program is saved to secondary storage
  • CTo make sure existing programs and data are not overwritten
  • DTo make sure the CPU is not used by more than one process
Mark scheme
  • C To make sure existing programs and data are not overwritten (1)
  • The only correct answer is C. The correct answer is to make sure existing programs and data are not overwritten.
  • A is not correct because deciding which process runs next and for how long is not why the locations of programs in memory are recorded
  • B is not correct because a program is only moved to secondary storage when virtual memory is used
  • D is not correct because multi-tasking lets more than one process use the CPU in turn
Example answers and how they were marked
Full marks1/1

C To make sure existing programs and data are not overwritten

Why: Correct option: the OS keeps a record of where each program and its data are held so that new items are not stored over existing ones (1).

No marks0/1

B To make sure each program is saved to secondary storage

Why: Saving to secondary storage is not why memory locations are recorded; that only happens when virtual memory is used. Near-miss, no mark.

No marks0/1

A To make sure each program is given a higher priority than the others

Why: Confuses the record of memory locations with deciding the order in which processes run; no creditworthy point.

5Short recall1 mark

A program is stored on the computer's hard disk.

State what the operating system must do before the program can be run.

[1 mark]
Mark scheme

Award one mark for:

  • Copies/loads the program (and the data it uses) from secondary storage/the hard disk into main memory/RAM (1)

Allow 'the program is moved into RAM'.

Do not accept 'installs the program'.

Do not accept 'opens the program' or 'runs the program' on their own.

Example answers and how they were marked
Full marks1/1

It copies the program from the hard disk into main memory.

Why: Creditworthy point 'copies the program from secondary storage into main memory' (1).

No marks0/1

It opens the program so that the user can use it.

Why: 'Opens the program' is given as a do-not-accept answer; it does not say the program is copied into main memory.

No marks0/1

It installs the program into RAM.

Why: Programs are not installed into RAM; installing is not creditworthy and is given as a do-not-accept answer.

6Short recall1 mark

A user closes a program that has finished running.

State what the operating system does with the main memory that the program was using.

[1 mark]
Mark scheme

Award one mark for any of the following:

  • It frees/releases the memory (1)
  • The memory is marked as available/empty so that another program can use it (1)
  • The program and its data are removed/deleted from main memory (1)

Allow 'the memory is cleared'.

Do not accept 'it deletes the program from the hard disk' (the program is stored in secondary storage and is not removed).

Example answers and how they were marked
Full marks1/1

It frees the memory so that another program can use it.

Why: Creditworthy point 'frees/releases the memory so another program can use it' (1).

No marks0/1

It saves the memory to the hard disk.

Why: Memory is not saved to the hard disk when a program closes; this is not freeing the memory, so no marks.

No marks0/1

It deletes the program from the hard disk.

Why: Given as a do-not-accept answer: closing a program does not delete it from secondary storage.

7Short recall2 marks

The operating system keeps a record of where each program and its data are stored in main memory.

State two reasons why the operating system needs this record.

[2 marks]
Mark scheme

Award one mark for any of the following up to a maximum of two marks:

  • So that it does not overwrite/use memory that is already being used by another program (1)
  • So that it can find the program/data again when the program needs it (1)
  • So that it knows which memory locations are free/can be allocated to a new program (1)
  • So that it can keep the data used by each program separate from other programs (1)
  • So that it can free the memory when the program is closed/knows which memory to release (1)

Do not accept 'so the program runs faster'.

Do not accept 'so that the program is not lost when the power is turned off' (this is about saving files to secondary storage, not main memory).

Example answers and how they were marked
Full marks2/2

So that the operating system does not put a new program on top of memory that another program is already using, and so that it can find the data again when the program needs it.

Why: Creditworthy point 'does not overwrite memory used by another program' (1) and 'find the program/data again when needed' (1).

Some marks1/2

It knows where the program is so it can find it again when it needs to run it.

Why: Creditworthy point 'find the program/data again when it is needed' (1); no second reason given.

No marks0/2

So that the program is not lost when the computer is switched off.

Why: This is about saving to secondary storage, not about a record of main memory locations; not a creditworthy reason, so no marks.

8Short recall2 marks

An operating system can run more than one program at the same time.

State two things the operating system does to manage the programs that are running at the same time.

[2 marks]
Mark scheme

Award one mark for any of the following up to a maximum of two marks:

  • Decides which program/process will run on the CPU next (1)
  • Decides how long each program/process will run for/gives each process a time slice (1)
  • Allocates/shares out main memory between the programs/processes (1)
  • Moves a program (and its data) that is not currently being used from main memory to virtual memory/secondary storage, and back when needed (1)
  • Stores/saves the state of each process so that it can continue where it left off (1)

Do not accept 'it makes the computer faster'.

Do not accept 'it runs all of the programs at exactly the same time' on a single CPU.

Do not accept the name of a scheduling algorithm on its own (e.g. round robin) without a description.

Example answers and how they were marked
Full marks2/2

It decides which program will run on the CPU next, and it decides how long each program can run for before it is swapped for another one.

Why: Creditworthy points 'decides which program runs on the CPU next' (1) and 'decides how long each program runs for/time slice' (1).

Some marks1/2

It decides which program runs next on the CPU and it makes all of the programs run at exactly the same time.

Why: Creditworthy point 'decides which program runs on the CPU next' (1); 'all programs run at exactly the same time' is not credited on a single CPU.

No marks0/2

It uses round robin so that all of the programs run faster.

Why: A named scheduling algorithm on its own is not credited, and 'run faster' is not a creditworthy point, so no marks.

9Describe2 marks

A program is stored on secondary storage before it is run.

Describe how the operating system manages memory when a program is started.

[2 marks]
Mark scheme

Award up to two marks for a linked description such as:

  • The program (and its data) is copied/loaded from secondary storage into main memory/RAM (1) so that the CPU can fetch/execute its instructions (1)
  • An area of main memory is allocated/reserved for the program (1) that is large enough to hold the program and its data (1)
  • The operating system checks that there is enough free main memory (1) before the program can be started/loaded, otherwise it cannot run/an error is reported (1)
  • The operating system keeps a record of the memory addresses used by the program (1) so that its instructions and data can be found when it runs (1)

Allow 'loaded into RAM', 'stored in memory' and 'put into main memory' as equivalent to copied into main memory.

A single statement that the program is loaded/stored in main memory, with no linked development, can be given one mark only.

Do not accept descriptions of the CPU fetching/executing instructions that do not refer to the operating system loading or allocating memory.

Do not accept responses about virtual memory (moving processes to secondary storage) or about which process runs next on the CPU.

Do not accept the program being run from secondary storage/hard disk.

Example answers and how they were marked
Full marks2/2

The operating system copies the program and its data from secondary storage into main memory so that the CPU can fetch and execute its instructions.

Why: Copying the program and data into main memory (1) linked to the CPU fetching/executing instructions (1).

Some marks1/2

The operating system loads the program into main memory.

Why: The program is copied/loaded into main memory (1), but there is no linked development of how or what this leads to, so only one mark is given.

No marks0/2

The CPU fetches the program's instructions from main memory and executes them one at a time.

Why: This describes the fetch-decode-execute cycle, not the operating system loading or allocating memory, which is the Do not accept line; no creditworthy point is made.

10Describe2 marks

An operating system keeps a record of the memory it has allocated to each program.

Describe how this record is used.

[2 marks]
Mark scheme

Award up to two marks for a linked description such as:

  • The start and end address/size of the block allocated to each program is recorded (1) so the operating system knows which areas of main memory are in use and which are free (1)
  • The record is checked before memory is allocated (1) so memory already in use is not given to another program/is not overwritten (1)
  • The record is searched for a free block that is large enough (1) so a newly loaded program is placed in a suitable area of main memory (1)
  • The record is updated when a program ends/closes (1) so the memory it was using is marked as free for other programs (1)

Allow the record to be called a memory map/memory table/allocation table.

A response that only says the operating system keeps a record/list of the memory each program is using, without saying what the record contains, earns 0 marks.

A response that states what the record contains, e.g. the addresses/the start and end address of each block, earns 1 mark even if it does not say how the record is used.

Do not accept responses about saving programs/files to secondary storage or about moving programs to virtual memory, as these are not uses of this record.

Example answers and how they were marked
Full marks2/2

The operating system records the start and end address of the block of memory given to each program so that it does not give the same memory to another program.

Why: The start and end address of each block is recorded (1) linked to memory already in use not being given to another program (1).

Some marks1/2

The operating system records the start and end address of the memory used by each program.

Why: States what the record contains (1), but does not develop how the record is used, so the second mark is not earned.

No marks0/2

The operating system saves the programs to the hard disk so there is enough memory for other programs.

Why: Describes moving programs to secondary storage rather than how the record of allocated memory is used; no creditworthy point is made.

11Describe2 marks

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.

[2 marks]
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
Full marks2/2

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).

Some marks1/2

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.

No marks0/2

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.

12Describe2 marks

The operating system is held in main memory while the computer is running.

Describe how the operating system stops a running program from overwriting memory that is not its own.

[2 marks]
Mark scheme

Award up to two marks for a linked description such as:

  • It keeps a record of which memory addresses/areas belong to each program and to the operating system (1) so it knows which addresses a program is allowed to use (1)
  • Each program is given its own area of main memory (1) so a program cannot write to the addresses used by another program or by the operating system (1)
  • The memory used by the operating system is marked as protected/reserved (1) so a program that tries to write to it is blocked/causes an error (1)
  • The address a program writes to is checked against the record of its allocated area (1) and the write is stopped if the address is outside that area (1)

Allow the memory being protected to be that of the operating system or of another program.

For both marks, the expansion must follow/associate with the statement.

Do not award generic answers such as 'the operating system manages memory' or 'the operating system keeps track of memory'.

Do not award responses about stopping programs using too much memory or allocating memory, as these are not about protecting memory being overwritten.

Do not award responses about virtual memory, paging or moving processes to secondary storage.

Do not award responses about firewalls, antivirus software or passwords.

Example answers and how they were marked
Full marks2/2

The operating system gives each program its own area of main memory so that a program cannot write to the addresses used by another program or by the operating system.

Why: Each program is given its own area of main memory (1) linked to it not being able to write to the addresses used by another program or the operating system (1).

Some marks1/2

The operating system gives each program its own area of main memory.

Why: Each program is given its own area of main memory (1), but there is no linked development saying how this stops a program overwriting memory that is not its own.

No marks0/2

The operating system stops a program overwriting memory by moving it into virtual memory when it uses too much.

Why: This describes virtual memory and limiting how much memory a program uses, not protecting memory from being overwritten, so neither bullet applies and the Do not award lines rule it out.

13Explain2 marks

A program is stored on secondary storage before it is run.

Explain one reason why the operating system must copy the program into main memory before it can be run.

[2 marks]
Mark scheme

Award up to two marks for a linked explanation such as:

  • The CPU can only fetch/execute instructions held in main memory (1) because it cannot access secondary storage directly (1)
  • The program's instructions are copied into RAM/main memory (1) so the CPU can read/fetch them (1)
  • Main memory is faster to access than secondary storage (1) so the CPU does not have to wait for the program's instructions to be read from secondary storage (1)
  • The program's data is copied into main memory (1) so the CPU can access it directly while the program runs (1)

For both marks, the expansion must follow/associate with the statement.

A statement of location on its own, e.g. 'the program needs to be in RAM' / 'the program is copied into main memory', earns the first mark only; a reason linked to the CPU fetching or accessing it is needed for the second mark.

Do not accept 'so the program can run', 'so the program can be loaded/started' or 'so it is in memory' on its own without saying that the CPU can access/fetch it from main memory.

Do not accept 'quickly' on its own as the reason; accept it only when linked to the CPU accessing the data/instructions directly or faster than secondary storage.

Do not accept 'to store the program permanently', 'to save the program' or 'so it is not lost when the computer is switched off' as main memory is volatile.

Example answers and how they were marked
Full marks2/2

The CPU can only fetch and execute instructions that are in main memory, and it cannot access secondary storage directly.

Why: Linked point (1) that instructions must be in main memory and reason (1) that the CPU cannot access secondary storage directly.

Some marks1/2

The program's instructions need to be in RAM.

Why: Statement of location (1) but no linked reason saying why the CPU needs them there.

No marks0/2

So the program is saved in main memory and is not lost when the computer is switched off.

Why: No creditworthy point; it wrongly treats main memory as permanent storage, which the 'do not accept' guidance rules out.

14Explain2 marks

Main memory holds the operating system, several programs and their data at the same time. As part of process management, the operating system keeps a record of where each program and its data are located in main memory.

Explain one reason why the operating system keeps this record.

[2 marks]
Mark scheme

Award up to two marks for a linked explanation such as:

  • So the operating system does not allocate memory already in use/avoids allocating the same memory to another program/prevents memory being reallocated (1) which would overwrite/corrupt the existing program or data (1)
  • So the operating system can find/locate a program or its data when it is needed (1) because it can then load/access it using the memory address(es) in the record (1)
  • So the operating system can identify free areas of main memory (1) and allocate them to a new program/process (1)
  • So the operating system can keep programs and data separate in main memory (1) so one program cannot change/overwrite another program's data (1)

For both marks, the expansion must follow/associate with the statement.

Do not accept 'to manage memory' or 'to organise memory' on its own without saying what the record is used for.

Do not accept 'to keep track of programs' or 'so it knows where programs are' on its own: this states what the record contains, not a use for it. It needs a linked use such as finding/loading a program when needed or avoiding overwriting it.

Do not accept 'to store the program' because the record stores the location, not the program.

Do not accept answers about saving a program to secondary storage/hard disk when it is closed; the record is of locations in main memory.

Example answers and how they were marked
Full marks2/2

It keeps a record so that it does not give the same area of main memory to another program, which would overwrite the data already there.

Why: Linked point (1) about not allocating the same memory to another program and reason (1) that this would overwrite existing data.

Some marks1/2

It can identify free areas of main memory.

Why: Gives the point (1) about identifying free areas but does not give the linked reason/expansion about allocating them to a new program.

No marks0/2

So the operating system knows where each program is.

Why: No credit; this states what the record contains rather than a use for it, and the mark scheme says this on its own earns no marks.

15Explain2 marks

A computer can run more than one program at the same time.

Explain one way the operating system manages main memory when more than one program is running.

[2 marks]
Mark scheme

Award up to two marks for a linked explanation such as:

  • The operating system allocates a separate area of main memory to each program (1) so one program cannot overwrite another program's instructions/data (1)
  • The operating system keeps each program in its own area of main memory (1) so a program cannot access/corrupt another program's data (1)
  • The operating system keeps track of which areas of main memory are free/in use (1) so it can give memory to a program when it starts without overwriting another program (1)
  • The operating system sets aside/allocates memory for a program when it is loaded (1) so that the program has space for its instructions and data (1)

For both marks, the expansion must follow/associate with the statement.

Only one linked point is needed for both marks; a second explanation of the same idea gains no further credit.

Do not accept 'the operating system manages/shares out main memory' on its own, because this repeats the question and does not say how memory is managed.

Do not accept 'it decides which program runs next on the CPU' because this is process scheduling, not memory management.

Do not accept 'it stops programs using too much memory' or 'it makes the computer faster' without a linked reason saying how memory is managed.

Do not accept 'each program is given its own memory addresses' on its own; the point must say the program is kept in a separate area of memory.

Example answers and how they were marked
Full marks2/2

It gives each program a separate area of main memory so that one program cannot overwrite another program's data.

Why: Linked point (1) that a separate area is allocated to each program, and reason (1) that this stops one program overwriting another's data.

Some marks1/2

It gives each program its own area of main memory.

Why: Gives the point (1) but no linked reason saying what keeping the program in its own area achieves.

No marks0/2

It decides which program will run next on the CPU.

Why: No creditworthy point; this describes process scheduling, not memory management, and is named in the 'Do not accept' guidance.

16Explain2 marks

When a program closes, the operating system frees the main memory it was using.

Explain one reason why the operating system frees main memory when a program closes.

[2 marks]
Mark scheme

Award up to two marks for a linked explanation such as:

  • The memory can be reused/allocated to another program (1) so other programs have enough main memory to run (1)
  • Freeing the memory stops main memory becoming full (1) so the computer can load/run new programs (1)
  • The closed program's data is no longer needed (1) so keeping it would waste main memory (1)
  • The operating system can give the freed memory to a program that needs more (1) so that program can continue to run (1)

For both marks, the expansion must follow/associate with the statement.

Do not accept 'to make the computer faster' on its own without saying how freeing memory helps.

Do not accept 'to delete the program' or 'to save the program' because closing a program does not remove it from secondary storage.

Example answers and how they were marked
Full marks2/2

The memory can be reused by another program, so other programs have enough main memory to run.

Why: Linked point (1) about reusing the memory and reason (1) that other programs then have enough memory.

Some marks1/2

So that the memory is free.

Why: Gives the point (1) but does not give a linked reason saying what the free memory is used for.

No marks0/2

So the program is deleted from the computer.

Why: No creditworthy point; closing a program does not delete it from secondary storage.

Keep practising Memory Management

More exam questions on 3.2 Software

Teachers: print these as a worksheet with the mark schemes at the end, and sign your school up to set your classes activities on Memory Management.

Fetch Decode Explain isn't affiliated with or endorsed by Pearson Edexcel.