Memory and Primary Storage - Worksheets, Questions and Revision
20 original exam-style questions - 8 pages of questions with a full mark scheme - free printable PDF.
Memory and Primary Storage revision guideMore GCSE Computer Science practiceMock exams
This topic is chapter 2 of GCSE Computer Science Topic Workbook 1 and chapter 2 of GCSE Computer Science 10-Minute Tests.
1.2 Memory and Primary Storage
fileSizes = [500000, 2000000, 15000000]
FOR i = 0 TO 2
sizeInMB = fileSizes[i] / 1000000
IF sizeInMB >= 1 THEN
OUTPUT "Large"
ELSE
OUTPUT "Small"
ENDIF
NEXT iComplete the trace table to show the values of i, fileSizes[i] and sizeInMB, and the output produced, as the algorithm executes.
Discuss the likely effect of this upgrade on the laptop's performance, and explain the circumstances in which further increasing the RAM would provide little or no additional benefit.
In your answer you should refer to:
- the relationship between RAM size, secondary storage use and performance
- the role of the CPU and cache in overall performance
- the idea of diminishing returns
Question 1
- its contents are not lost / are retained when the power supply is switched off oeB1
- Answer: Its contents are retained even when the power is switched off.
Question 2
- (a) RAMB1
- (a) Answer: RAM
- (b) ROMB1
- (b) Answer: ROM
- (c) RAMB1
- (c) Answer: RAM
- (d) BothB1
- (d) Answer: Both
Question 3
- Terabyte (TB)B1
- Petabyte (PB), given after TerabyteB1
- Answer: Terabyte (TB), then Petabyte (PB)
Question 4
- ROM stores the fixed start-up instructions/BIOS needed to boot the computer, which must not be lost when the power is offB1
- RAM is needed to temporarily store data/instructions for programs that are currently running, which can changeB1
- using only ROM would mean data could not be changed while the computer runs; using only RAM would mean the start-up instructions would be lost every time the power is removed (any three of these points, max 3)B1
- Answer: ROM holds permanent, unchanging start-up instructions that survive power loss; RAM holds changeable, temporary data for running programs. Both are needed because their properties (permanent/read-only vs changeable/read-write) are needed for different jobs.
Question 5
- (a) 8B1
- (a) Answer: 8 bits
- (b) 1024B1
- (b) Answer: 1024 bytes
- (c) 2500 (KB) caoA1
- (c) Answer: 2500 KB
- (d) 2 500 000 (bytes) cao, ft from (c)A1
- (d) Answer: 2,500,000 bytes
Question 6
- (a) the BIOS / bootstrap program / start-up instructions / firmware oeB1
- (a) Answer: The BIOS/bootstrap program (start-up instructions/firmware).
- (b) this program must run every time the computer starts, before the operating system has been loaded from secondary storageB1
- (b) if it was lost, the computer would not be able to begin starting up / load the operating system at allB1
- (b) Answer: The start-up program is needed at every boot, before the OS is available; without it stored permanently, the computer could never start.
Question 7
- 3.2 / 4 shown (or equivalent method)M1
- 80% caoA1
- Answer: 80%
Question 8
- closing unused applications frees up space in RAMB1
- so there is more room for the apps/data that are actually being used, meaning the operating system needs to use (slower) virtual memory less often, improving performanceB1
- Answer: Closing unused apps frees RAM space, reducing the need for the OS to use slower virtual memory, which improves performance.
Question 9
- Registers placed first (fastest) and Secondary storage (SSD) placed last (slowest)B1
- Cache placed between Registers and RAM, giving the full order: Registers, Cache, RAM, Secondary storage (SSD)B1
- Answer: Registers, Cache, RAM, Secondary storage (SSD)
Question 10
- stores instructions/data that the CPU has recently used or is likely to need again soonB1
- so the CPU can access this data much faster than fetching it from (the slower) RAM each time, improving performance oeB1
- Answer: Cache stores frequently/recently used instructions and data close to the CPU, so the CPU can retrieve it faster than from RAM, improving overall speed.
Question 11
- (a) correct place values identified/summed, e.g. 64 + 16 + 8 + 2M1
- (a) 90 caoA1
- (a) Answer: 90
- (b) binary split correctly into nibbles: 0101 and 1010M1
- (b) 5A caoA1
- (b) Answer: 5A
- (c) each hex digit correctly converted to a 4-bit nibble: 3 = 0011, F = 1111M1
- (c) 00111111 caoA1
- (c) Answer: 00111111
- (d) 200 divided by 16 giving quotient 12 and remainder 8 (or equivalent method)M1
- (d) C8 caoA1
- (d) Answer: C8
Question 12
- 8 GB converted to 8000 MBM1
- 8000 divided by 4 shown (method for number of files)M1
- 2000 (files) caoA1
- Answer: 2000 files
Question 13
- row i = 0: fileSizes[i] = 500000, sizeInMB = 0.5, Output = Small, all correctB1
- row i = 1: fileSizes[i] = 2000000, sizeInMB = 2, Output = Large, all correctB1
- row i = 2: fileSizes[i] = 15000000, sizeInMB = 15, Output = Large, all correctB1
- the loop counter i shown correctly incrementing 0, 1, 2 across the three rowsB1
- Answer: i=0: fileSizes[i]=500000, sizeInMB=0.5, Output=Small | i=1: fileSizes[i]=2000000, sizeInMB=2, Output=Large | i=2: fileSizes[i]=15000000, sizeInMB=15, Output=Large
Question 14
- (a) 16 caoB1
- (a) Answer: 16
- (b) recognises that 2n must be greater than or equal to 1024M1
- (b) 10 caoA1
- (b) Answer: 10 bits
Question 15
- (a) an area of secondary storage (e.g. the hard disk/SSD) that is used as an extension of RAM oeB1
- (a) Answer: An area of secondary storage used as an extension of RAM, to store data that does not fit in RAM.
- (b) when RAM is full, the operating system moves data that is not currently being used out of RAM and onto secondary storage (virtual memory)B1
- (b) this frees up space in RAM for the data/programs that are currently neededB1
- (b) allowing the computer to continue running programs/multitask even though there is not enough physical RAM to hold everything at onceB1
- (b) Answer: The OS swaps out unused data from RAM to secondary storage, freeing RAM space so currently needed programs/data can be loaded, allowing the system to keep running despite insufficient physical RAM.
Question 16
- secondary storage (disk/SSD) is much slower to access than RAMB1
- so if data has to be swapped between RAM and virtual memory very frequently, the computer's performance slows down significantly oe (thrashing)B1
- Answer: Virtual memory is stored on much slower secondary storage than RAM, so heavy use of it (frequent swapping) makes the computer noticeably slower.
Question 17
- 0.9 x 5000 shownM1
- 4500 cache hits caoA1
- 500 cache misses (ft: 5000 - hits)B1
- Answer: 4500 cache hits, 500 cache misses
Question 18
- registers have an extremely small capacity (each register can typically only hold one value/a very small amount of data)B1
- so RAM (with a much larger capacity) is needed to hold the full program and its data, with only small amounts moved into registers when the CPU needs themB1
- Answer: Registers can hold only tiny amounts of data each, so RAM (far larger capacity) is needed to store the whole running program, with data moved into registers only as needed.
Question 19
- Level 1 Basic, isolated statement(s), e.g. 'more RAM makes it faster', with little or no justification. Limited or no use of appropriate technical terms. Answer is not clearly linked to the scenario.1-2
- Level 2 Shows some understanding of how RAM size affects performance (e.g. reduces reliance on slower virtual memory/secondary storage), with some justification. The discussion may be one-sided or not fully developed, and diminishing returns/the role of the CPU and cache may be only briefly mentioned. Some appropriate technical terms used.3-4
- Level 3 A coherent, well-developed discussion that explains how increasing RAM reduces reliance on (slower) virtual memory up to a point, and explains that once RAM is large enough to hold everything the CPU currently needs, further increases give diminishing returns because performance is then limited by other components such as the CPU and cache. The answer is logically structured and uses appropriate technical terminology throughout.5-6
- Indicative content:
- Before the upgrade, if 8 GB of RAM was often full, the operating system would have to use virtual memory (secondary storage) to store data that did not fit in RAM
- Secondary storage (HDD/SSD) is much slower to access than RAM, so relying on virtual memory slows the computer down
- Increasing RAM to 16 GB means more data/programs can be held in RAM at once, reducing how often virtual memory is needed
- This is likely to noticeably improve performance if the laptop was previously running out of RAM
- However, if the tasks the student runs never actually needed more than 8 GB, having 16 GB gives little or no extra benefit (diminishing returns)
- Overall performance also depends on the CPU (clock speed, number of cores) and cache size, not just the amount of RAM
- If the CPU itself is slow, or the cache is small, adding more RAM will not fix these bottlenecks
- Therefore performance gains from adding RAM depend on what was actually limiting performance beforehand
Question 20
- 224 evaluated as 16 777 216 (bytes)M1
- 16 777 216 divided by 220 (1 048 576) shown, or equivalent use of index laws (224 / 220 = 24)M1
- 16 (MB) caoA1
- Answer: 16 MB
Mark your answers
Check answers without an account. Some answers can be checked automatically; use the mark scheme to mark the rest.