OCR H446 A Level Computer Science · 1.2 Software and Software Development

Stretch tasks Systems Software

Task 1

Quiz Challenge

A quiz game against four computer players, then short and long written answers.

  1. Quiz Blitz12 questions against the clock
  2. Quick Fire4 short answers
  3. Big Think2 long answers

About 20 minutes

Task 2

This or That

Pixel the cat asks 8 questions. Each has two answers: pick the right one.

  • Two answers to every question
  • A fish treat for every right answer
  • Streaks win Pixel shades, then a party hat

About 4 minutes

Task 3

Memory Match

Flip the cards two at a time to match each term card to its meaning card.

  • 12 cards: each term has a meaning
  • One peek at every card
  • Combo points for pairs found in a row

6 pairs, about 4 minutes

Task 4

Sort It

Sort each statement into the right box, like the tick box tables in the exam.

  • 12 cards to sort into 3 boxes
  • Drag a card, tap a box or press its number
  • Combo points for cards sorted in a row

12 cards, about 4 minutes

Task 5

Code Word

Guess the lesson's secret words. Every guess shows which letters are right.

  • A clue for every word
  • Tiles turn green, amber or grey after each guess
  • Fewer guesses win more points

3 words, about 4 minutes

Task 7

Bug Hunt

Two statements are true and one has a bug. Catch the bug before it gets away.

  • Three statements in every round
  • Tap the one with the mistake
  • Streaks win bonus points

5 rounds, about 4 minutes

Brain games

Train your brain on this lesson

Logic, memory and speed, built from this lesson's own key ideas. Win up to three diamonds in each game.

Logic

Odd One Out

Four tiles: three share a link and one does not. Spot the odd one out, then see what links the rest.

  • Three belong together, one does not
  • A hint shows the link, for fewer points
  • Quick answers and streaks win more

8 rounds, about 3 minutes

Memory

Memory Flash

Study the term cards, then they flip over. Find the card that goes with each clue, from memory.

  • Three levels: 3, 4 and 6 cards
  • Two tries to find each card
  • Streaks win bonus points

3 levels, about 4 minutes

Speed

Fact or Fib

Statements fly in one at a time. Is each one a fact or a fib? Decide fast.

  • Swipe, tap or use the arrow keys
  • Every fib comes with its fix
  • Streaks multiply your points

12 statements, about 3 minutes

The final challenge

City Run

Race a robot cat on inline skates through a neon cyber city, from Neon Station to the Hyper Tunnel. Every question is a row of neon gates across the tracks: skate through the one with the right answer, dodge the trains and barriers, and grab diamonds.

  • 20 questions from this lesson, in four parts of the city
  • Swipe, tap or use the arrow keys
  • Dodge trains and holograms, and jump crates and cones

20 questions, about 6 minutes

Bonus challenge

Neon Roll

Roll a glowing ball down an endless neon slope, past towers lit up with neon signs of Pixel the cat. Steer, jump the gaps and dodge the blocks. Questions from this lesson wait at gates along the way: every right answer keeps the ball rolling.

  • Questions from this lesson at every gate
  • Hold the arrow keys or a side of the slope to steer
  • 8 right answers win two diamonds, 15 win three

Endless, about 5 minutes

The games need JavaScript. Every question is below, with the answers at the end.

Read the lesson: Systems Software

Systems Software: the questions

Quiz Challenge, round 1: Quiz Blitz

  1. How does paging divide memory?

    • Into one block for each program
    • Into separate memories for code and data
    • Into fixed size pages that fit equally sized frames
    • Into variable sized parts that follow the program's structure
  2. What causes a page fault?

    • Two processes write to one page
    • The page table is full
    • A page is larger than a frame
    • A page the process needs is not in physical memory
  3. Shortest job first can starve long processes.

    • True
    • False
  4. Which scheduling algorithm suffers from the convoy effect?

    • Round robin
    • Shortest remaining time
    • Multi level feedback queues
    • First come first served
  5. Which TWO scheduling algorithms are preemptive?

    Tick 2.

    • Round robin
    • Shortest remaining time
    • First come first served
    • Shortest job first
  6. Put the boot process in order.

    Number these 1 to 4.

    • The power on self test checks the hardware
    • The bootstrap loader is loaded from the boot device
    • The operating system kernel is loaded into RAM
    • The processor starts running firmware in ROM
  7. A real time operating system is defined by having the fastest processor.

    • True
    • False
  8. What is the name for software that translates operating system commands for one particular piece of hardware?

  9. What is the main benefit of running intermediate code on a virtual machine?

    • It cannot contain run time errors
    • The same code runs on any platform with a suitable virtual machine
    • It runs faster than native machine code
    • It needs no compiler at all
  10. Which type of operating system spreads one system across several networked machines?

    • Multi user
    • Real time
    • Distributed
    • Embedded
  11. Put what happens on a page fault in order.

    Number these 1 to 3.

    • The operating system loads the page from secondary storage
    • The page table is updated and the process carries on
    • The process needs a page that is not in RAM
  12. What does a multi level feedback queue scheduler do?

    • Always runs the shortest job first
    • Gives every process the same time slice
    • Runs processes strictly in order of arrival
    • Moves processes between queues of different priority based on how they behave

Quiz Challenge, round 2: Quick Fire

  1. Describe two differences between paging and segmentation. [2 marks]

  2. Explain the weakness of first come first served scheduling. [2 marks]

  3. Explain why a pacemaker needs a real time operating system. [2 marks]

  4. Describe the role of a device driver. [2 marks]

Quiz Challenge, round 3: Big Think

  1. Compare round robin, first come first served and shortest job first scheduling. [6 marks]

  2. Explain how Java bytecode and a virtual machine make a program portable, and the cost of doing this. [4 marks]

This or That: tick the right answer

  1. Which divides memory by the program's logical structure?

    • Segmentation
    • Paging
  2. Which scheduler gives every process an equal time slice in turn?

    • Shortest job first
    • Round robin
  3. Which kind of fragmentation does paging cause?

    • Internal
    • External
  4. What does the BIOS run first?

    • The operating system kernel
    • A power on self test
  5. A braking system must always react within 5 ms. Which operating system does it need?

    • Multi user
    • Real time
  6. Which can take the processor away from a running process?

    • A preemptive scheduler
    • A non preemptive scheduler
  7. Several users share one mainframe at once. Which must its operating system provide?

    • A guaranteed response time
    • Access control between users
  8. What does a system virtual machine let you do?

    • Make the processor run faster
    • Run a whole guest OS in software

Memory Match: match each term to its meaning

TermMeaning
A Page fault1 Variable sized blocks that follow program structure
B Segmentation2 Short jobs stuck behind one long job
C Starvation3 Translates OS commands for one piece of hardware
D Convoy effect4 Loads the operating system kernel into RAM
E Device driver5 A needed page is not in physical memory
F Bootstrap loader6 A process that never gets processor time

Sort It: tick one box in each row

Which scheduling algorithm does each statement describe?

StatementRound robinFirst come first servedShortest job first
Suits an interactive system with many users
Fair and responsive, but ignores priority
Needs to know run times in advance
The simplest algorithm to implement
Gives the lowest average waiting time
Works like a queue at a shop till
Picks the process with the least total run time
Takes the processor back when a time slice runs out
One long job can hold up all the short ones
Each process gets a fixed time slice in turn
Can starve long processes
Runs processes in the order they arrive

Code Word: write the word that fits each clue

  1. A fixed size slot in physical memory that holds one page. (5 letters)

  2. The core of the operating system, loaded into RAM by the bootstrap. (6 letters)

  3. Software that turns operating system commands into ones a particular device understands. (6 letters)

Link Up: find the three groups

These 12 tiles make 3 groups of 4. Write each group in the table, and what links its tiles.

  • Distributed
  • Real time
  • Feedback queues
  • Segmentation
  • Page fault
  • Round robin
  • Paging
  • Embedded
  • Multi user
  • Page table
  • Shortest job first
  • First come first served

Bug Hunt: tick the statement that is wrong

In each set, two statements are true and one has a mistake in it.

    • Paging causes external fragmentation between pages.
    • Pages are a fixed size and fit any frame in physical memory.
    • Segments vary in size and follow the structure of the program.
    • Round robin gives each process an equal time slice in turn.
    • Round robin always runs the most urgent process first.
    • First come first served runs processes in order of arrival.
    • Shortest job first needs run times to be known in advance.
    • Shortest job first makes sure that long processes are never starved.
    • Shortest job first gives the lowest average waiting time.
    • A device driver translates operating system commands for one device.
    • The BIOS runs a power on self test before loading the bootstrap.
    • The operating system kernel is loaded before the power on self test runs.
    • An embedded operating system is built for one dedicated task.
    • A real time operating system guarantees a maximum response time.
    • A distributed operating system runs on a single machine.

Brain game: Odd One Out

Three tiles in each set share a link. Tick the odd one out, then write what links the other three.

    • Real time
    • Round robin
    • Embedded
    • Multi user

    What links the other three?

    • Feedback queues
    • Round robin
    • Paging
    • Shortest job first

    What links the other three?

    • Segmentation
    • Paging
    • Page table
    • First come first served

    What links the other three?

    • Distributed
    • Real time
    • Page fault
    • Multi user

    What links the other three?

    • Distributed
    • Feedback queues
    • Round robin
    • First come first served

    What links the other three?

    • Feedback queues
    • Page fault
    • Paging
    • Page table

    What links the other three?

Brain game: Memory Flash, on paper

Which term means this? Write your answer from memory.

  1. A needed page is not in physical memory

  2. A process that never gets processor time

  3. Variable sized blocks that follow program structure

  4. Short jobs stuck behind one long job

  5. Translates OS commands for one piece of hardware

  6. Loads the operating system kernel into RAM

Brain game: Fact or Fib

Tick Fact if the statement is true and Fib if it is not.

  1. A device driver translates operating system commands for one device.

    • Fact
    • Fib
  2. Shortest job first needs run times to be known in advance.

    • Fact
    • Fib
  3. Paging causes external fragmentation between pages.

    • Fact
    • Fib
  4. The operating system kernel is loaded before the power on self test runs.

    • Fact
    • Fib
  5. An embedded operating system is built for one dedicated task.

    • Fact
    • Fib
  6. A distributed operating system runs on a single machine.

    • Fact
    • Fib
  7. Pages are a fixed size and fit any frame in physical memory.

    • Fact
    • Fib
  8. Shortest job first can starve long processes.

    • Fact
    • Fib
  9. Shortest job first makes sure that long processes are never starved.

    • Fact
    • Fib
  10. Round robin gives each process an equal time slice in turn.

    • Fact
    • Fib
  11. Round robin always runs the most urgent process first.

    • Fact
    • Fib
  12. A real time operating system is defined by having the fastest processor.

    • Fact
    • Fib

City Run

City Run is a race through a neon cyber city, played on screen. It asks 20 of the questions above, from the quiz, This or That, Memory Flash and Fact or Fib.

Neon Roll

Neon Roll is a ball rolling down an endless neon slope, played on screen. Every right answer keeps it rolling. It asks the questions above, from the quiz, This or That, Memory Flash and Fact or Fib.

Answers

Round 1: Quiz Blitz

  1. Into fixed size pages that fit equally sized frames Pages are a fixed size chosen by the operating system, so any page fits any frame. Variable sized parts are segments.
  2. A page the process needs is not in physical memory The operating system must load the page from secondary storage, evicting another page if RAM is full.
  3. True If short jobs keep arriving, a long job may never reach the front of the queue.
  4. First come first served One long job at the front holds up every shorter job queued behind it.
  5. Round robin; Shortest remaining time Round robin and shortest remaining time can take the processor from a running process. First come first served and shortest job first let it run until it finishes or blocks.
  6. The processor starts running firmware in ROM → The power on self test checks the hardware → The bootstrap loader is loaded from the boot device → The operating system kernel is loaded into RAM Firmware runs first, checks the hardware, finds the boot device and loads the bootstrap, which loads the kernel.
  7. False It guarantees a maximum response time. In a braking system a late answer is a wrong answer, however fast the hardware.
  8. device driver Drivers are why one operating system can support thousands of different printers.
  9. The same code runs on any platform with a suitable virtual machine Portability is the gain. The cost is slower execution than native code.
  10. Distributed A distributed operating system shares work across machines but appears to the user as a single system.
  11. The process needs a page that is not in RAM → The operating system loads the page from secondary storage → The page table is updated and the process carries on The missing page is fetched, evicting another if RAM is full, and the page table is updated so the process can continue.
  12. Moves processes between queues of different priority based on how they behave Processes that use a lot of processor time drift to lower priority queues, which keeps interactive ones responsive.

Round 2: Quick Fire

    • Pages are a fixed size, segments vary in size
    • Paging is decided by the OS, segments follow the logical structure of the program
    • Paging causes internal fragmentation, segmentation external
    • A page number plus offset against a segment number plus offset
    Model answer

    Pages are a fixed size, while segments are variable sized. Paging is decided by the operating system, while segments follow the logical structure of the program, such as its functions.

    • A long process runs until it finishes, with no preemption
    • So the short jobs queued behind it wait, the convoy effect
    Model answer

    A long job at the front runs until it finishes, so every short job queued behind it is held up waiting, which is the convoy effect.

    • It guarantees a maximum response time
    • A late response could harm the patient, so a late answer is a wrong answer
    Model answer

    It guarantees a maximum response time, so the pacemaker always reacts within a fixed time. A late response could harm the patient, so a late answer is a wrong answer.

    • It translates operating system instructions into commands for specific hardware
    • So one operating system can work with many different devices
    Model answer

    A device driver translates the operating system's generic instructions into commands that one specific device understands, so the same operating system can work with thousands of different devices.

Round 3: Big Think

    • Round robin gives each process a fixed time slice in turn
    • Round robin is fair and responsive
    • Round robin ignores priority
    • First come first served runs processes in order of arrival until each finishes
    • A long job holds up the short ones behind it, the convoy effect
    • Shortest job first gives the lowest average waiting time
    • Shortest job first needs run times known in advance
    • Shortest job first can starve long processes
    • Round robin is preemptive, the other two are not
    Model answer

    Round robin gives each process a fixed time slice in turn and is preemptive, so it is fair and responsive, but it ignores priority. First come first served runs processes in order of arrival until each finishes, which is simple, but one long job at the front holds up every short job behind it, the convoy effect. Shortest job first runs the job needing the least time next, which gives the lowest average waiting time, but run times must be known in advance and long jobs can starve if short ones keep arriving.

    • The source is compiled into intermediate code, not machine code for one processor
    • Each platform has its own virtual machine that runs the bytecode
    • So the same compiled code runs anywhere without recompiling
    • The cost is slower execution than native code
    • Every computer needs the virtual machine installed
    Model answer

    The source code is compiled into intermediate code rather than machine code for one processor. Each platform has its own virtual machine, which translates the bytecode as it runs, so the same compiled code runs on any platform without recompiling. The cost is that it runs slower than native machine code, and every computer must have the virtual machine installed.

This or That

  1. Segmentation Segments follow parts of the program, such as a function or an array, so they vary in size. Pages are a fixed size set by the operating system.
  2. Round robin Round robin is fair and responsive but ignores priority. Shortest job first picks by expected run time.
  3. Internal The last page of a process is rarely full, so space is wasted inside it. Segmentation leaves gaps between segments instead.
  4. A power on self test The hardware is checked before the bootstrap loader, and then the kernel, are loaded.
  5. Real time A real time operating system guarantees a maximum response time. In a braking system, a late answer is a wrong answer.
  6. A preemptive scheduler Preemptive scheduling can interrupt a process, as round robin does when a time slice ends.
  7. Access control between users A multi user system must keep users apart and share the processor fairly. Guaranteed response times are what a real time system offers.
  8. Run a whole guest OS in software A system virtual machine runs a complete operating system inside another, which is useful for testing untrusted software or sharing one server.

Memory Match

  • A 5 Page fault: A needed page is not in physical memory
  • B 1 Segmentation: Variable sized blocks that follow program structure
  • C 6 Starvation: A process that never gets processor time
  • D 2 Convoy effect: Short jobs stuck behind one long job
  • E 3 Device driver: Translates OS commands for one piece of hardware
  • F 4 Bootstrap loader: Loads the operating system kernel into RAM

Sort It

  1. Round robin Suits an interactive system with many users Everyone gets a regular turn, so the system feels responsive.
  2. Round robin Fair and responsive, but ignores priority Round robin treats every process the same, so urgent work waits its turn.
  3. Shortest job first Needs to know run times in advance It cannot pick the shortest job without an estimate of every job's length.
  4. First come first served The simplest algorithm to implement It needs nothing more than a queue.
  5. Shortest job first Gives the lowest average waiting time Running short jobs first keeps the average wait as low as possible.
  6. First come first served Works like a queue at a shop till Whoever arrives first is served first, however long they take.
  7. Shortest job first Picks the process with the least total run time Shortest job first runs the quickest job next.
  8. Round robin Takes the processor back when a time slice runs out Round robin is preemptive: a process is stopped when its slice ends.
  9. First come first served One long job can hold up all the short ones That is the convoy effect, the classic weakness of first come first served.
  10. Round robin Each process gets a fixed time slice in turn Equal time slices, handed out in turn, are round robin.
  11. Shortest job first Can starve long processes If short jobs keep arriving, a long job may never be picked.
  12. First come first served Runs processes in the order they arrive First come first served is a simple queue in order of arrival.

Code Word

  1. FRAME A fixed size slot in physical memory that holds one page.
  2. KERNEL The core of the operating system, loaded into RAM by the bootstrap.
  3. DRIVER Software that turns operating system commands into ones a particular device understands.

Link Up

  • Types of operating system Distributed; Embedded; Multi user; Real time
  • Scheduling algorithms Round robin; First come first served; Shortest job first; Feedback queues
  • Memory management Paging; Segmentation; Page table; Page fault

Bug Hunt: the wrong statement, and why

  1. Paging causes external fragmentation between pages. Paging causes internal fragmentation, because the last page is rarely full. Segmentation causes external fragmentation.
  2. Round robin always runs the most urgent process first. Round robin ignores priority and urgency. Every process simply gets its turn.
  3. Shortest job first makes sure that long processes are never starved. If short jobs keep arriving, a long job may wait forever. That is starvation.
  4. The operating system kernel is loaded before the power on self test runs. The power on self test runs first to check the hardware. Only then is the bootstrap loaded, and it loads the kernel.
  5. A distributed operating system runs on a single machine. A distributed operating system spreads one system across several networked machines, while appearing to the user as one system.

Odd One Out

  1. Round robin is the odd one out: it goes with Scheduling algorithms. The other three: Types of operating system.
  2. Paging is the odd one out: it goes with Memory management. The other three: Scheduling algorithms.
  3. First come first served is the odd one out: it goes with Scheduling algorithms. The other three: Memory management.
  4. Page fault is the odd one out: it goes with Memory management. The other three: Types of operating system.
  5. Distributed is the odd one out: it goes with Types of operating system. The other three: Scheduling algorithms.
  6. Feedback queues is the odd one out: it goes with Scheduling algorithms. The other three: Memory management.

Memory Flash

  1. Page fault A needed page is not in physical memory
  2. Starvation A process that never gets processor time
  3. Segmentation Variable sized blocks that follow program structure
  4. Convoy effect Short jobs stuck behind one long job
  5. Device driver Translates OS commands for one piece of hardware
  6. Bootstrap loader Loads the operating system kernel into RAM

Fact or Fib

  1. Fact A device driver translates operating system commands for one device.
  2. Fact Shortest job first needs run times to be known in advance.
  3. Fib Paging causes external fragmentation between pages. The fix: Paging causes internal fragmentation, because the last page is rarely full. Segmentation causes external fragmentation.
  4. Fib The operating system kernel is loaded before the power on self test runs. The fix: The power on self test runs first to check the hardware. Only then is the bootstrap loaded, and it loads the kernel.
  5. Fact An embedded operating system is built for one dedicated task.
  6. Fib A distributed operating system runs on a single machine. The fix: A distributed operating system spreads one system across several networked machines, while appearing to the user as one system.
  7. Fact Pages are a fixed size and fit any frame in physical memory.
  8. Fact Shortest job first can starve long processes.
  9. Fib Shortest job first makes sure that long processes are never starved. The fix: If short jobs keep arriving, a long job may wait forever. That is starvation.
  10. Fact Round robin gives each process an equal time slice in turn.
  11. Fib Round robin always runs the most urgent process first. The fix: Round robin ignores priority and urgency. Every process simply gets its turn.
  12. Fib A real time operating system is defined by having the fastest processor. The fix: It guarantees a maximum response time. In a braking system a late answer is a wrong answer, however fast the hardware.