AdvertisementYour brand could be hereYour brand hereOn every Darslab page · students, parents and teachersinfo@darslab.comAsk for pricesPricesinfo@darslab.com
☰ Year plan · Computing

Software behind the screen

Week 26 · 4.3 Computer software · 3 lessons
1

The manager inside

Computing 9: Topic 4.3, pp. 320–334
GoalDescribe the main tasks of an operating system and explain how it manages the resources of a computer.
New words
operating system · system software that manages the computer’s resources and lets people and other programs use the hardwareresource · something a computer uses to do its work, such as power, memory, storage or a hardware devicesystem software · software that runs and looks after the computer itself, not software for the user’s own tasksuser account · a person’s own login, with its own space and its own rights on the computer
Explanation

A computer has only a limited amount of each resource: power, memory, storage space and hardware devices. The operating system is the manager that shares them out. It also gives people an interface, so that they can use the hardware and run other programs. Its main tasks are memory management (deciding how much RAM each running program gets and making room when needed), file management (storing files in secondary storage and keeping track of their names, folders and places), device management (passing data to and from devices such as a printer or microphone), and power management (switching off unused parts, or dimming the screen when the battery is low). It also looks after user accounts and security: a person must log in, and different accounts get different rights. The operating system is system software.

TaskWhat the operating system looks afterExample
Memory managementhow much RAM each running program getsmakes space before a new program opens
File managementwhere files and folders are storedmoves, copies or deletes a file when asked
Device managementdata going to and from devicessends a print job to the printer
Power managementhow the battery or mains power is useddims the screen when the battery is low
User accounts and securitywho may log in and what they may doasks for a username and password
Worked examples
Bus stationComputerOperating system task
bays for the busesspaces in RAM for programsmemory management
the timetable of where each bus isa record of where each file is storedfile management
the radio link to each drivera connection to each devicedevice management
the fuel supplythe batterypower management
staff passesusernames and passwordsuser accounts and security
A bus station and a computer. A station manager has limited bays, fuel and staff, and decides who gets what. The operating system does the same job for the computer’s resources. Both must keep a record, share fairly and stop people from using what they should not.
ProgramBlocks of RAM used
music player6
notes program5
free5
total in the tablet16
Memory management with numbers. A tablet has 16 blocks of RAM. A music player uses 6 blocks and a notes program uses 5, so 16 − 11 = 5 blocks are free. A drawing program asks for 8 blocks. 5 is less than 8, so the operating system cannot start it yet. If the music player is closed, 6 more blocks become free: 5 + 6 = 11, which is enough, and the drawing program can start.
Python
1battery = int(input("Battery %: "))
2if battery <= 10:
3    print("Sleep mode soon")
4elif battery <= 20:
5    print("Battery saver on")
6else:
7    print("Normal")
Output
Battery saver on
Power management as a decision. Input: the battery level is 20. The program checks the smallest limit first. 20 is not at most 10, but it is at most 20, so it prints Battery saver on. The same program prints Sleep mode soon for 8 and Normal for 55.
Class activity

Be the operating system (no computer). Draw a strip of 10 squares on paper: this is the RAM. Make cards for four programs and their sizes: Game 4, Writer 3, Calculator 1, Video 5. A partner opens and closes programs in any order they choose, for example “open Game, open Video, open Writer”. You place each program in the squares it needs, or say “not enough room” and say which program you could close to make space. Write down the free squares after each request.

Practice
1
Write the operating system task each sentence describes: memory management, file management, device management, power management or user accounts and security.
SentenceTask
(a) It decides how much RAM each running program gets.?
(b) It remembers in which folder a document is saved.?
(c) It turns the screen brightness down after two minutes without use.?
(d) It asks for a password before opening a learner’s files.?
(e) It sends a picture to the printer.?
2
A computer has 12 blocks of RAM. Program A uses 3 blocks and program B uses 4 blocks. A new program C needs 7 blocks. How many blocks are free? Can C start? What could the operating system do?
ProgramBlocks of RAM used
A3
B4
C (waiting)needs 7
3
A phone runs this program. Predict the output for the inputs 4, 5 and 30. Explain the result for 5.
Python
1battery = int(input("Battery %: "))
2if battery < 5:
3    print("Switch off extra parts")
4elif battery < 30:
5    print("Dim the screen")
6else:
7    print("Normal")
4
Two learners share one family computer. Give two reasons why the operating system should give each of them a separate user account.