Logic and computer systems · GCSE · OCR J277 1.5.1, AQA 8525 3.4.3, Edexcel 1CP2 3.2.1 · about 15 min
What an operating system does, scheduling, and utility software.
[1 mark]What is a device driver?
[1 mark]How does an operating system run several programs on one core?
[1 mark]What does defragmentation do?
[1 mark]Why should an SSD not be defragmented?
[1 mark]What does an incremental backup copy?
[1 mark]What does this program print?
queue = ["a", "b", "c"] job = queue.pop(0) queue.append(job) print(queue)
Write a round-robin scheduler with a time slice of 2 units. Each job in jobs needs some units of processor time. Take the job at the front of the queue, run it for 2 units or for what it has left, whichever is less, and print <name> ran for <n>. If it is not finished, put it at the back of the queue; if it is, print <name> finished at <t>, where t is the total time so far.
# the two lines every program starts with: the commands, then the robot
from bugbot import *
connect()
jobs = [("motors", 3), ("camera", 5), ("radio", 2)]
time_slice = 2Plan your program here, then type it in and press Run.