Teachers' Portal  /  A-Level Computer Science 9618  /  System Software  /  Utility software and program libraries
Lesson pack · A-Level Computer Science 9618 · 5.1 · AS Level

Utility software and program libraries

Tools and ready-made code. An operating system comes with utility programs that format, protect, tidy, repair, shrink and back up your storage.

Student lesson Lab, full screen
At a glance

The shape of the lesson

Topic
System Software
Syllabus reference
Cambridge International AS and A Level Computer Science 9618, 5.1
Level
AS Level
Duration
45 minutes, lab-led; stretches to a 60 minute block (see the contingency notes)
Position in topic
Lesson 2 of 4 in System Software; follows Why a computer needs an operating system; leads into Assemblers, compilers and interpreters
Central model
Fig. 1: defragmentation moves the scattered blocks of each file together
Cooperative structure
Assessment
Stage 1 check and the exam-style plenary from the student lesson, plus the worksheet as the exit task
Learning objectives

By the end of the lesson, learners can

Section by section
  • Utilities that come with the OS: Each utility exists because of a specific problem.
  • Program libraries: Software under development is often constructed from existing code.
  • Dynamic Link Libraries: A library can be joined to a program in two ways.
Key points to leave on the board
  • Six utilities: disk formatter, virus checker, defragmenter, disk analysis/repair, file compression, back-up.
  • Describe the effect: e.g. defragmenting makes files contiguous so they load faster from a hard disk.
  • Libraries: pre-written and pre-tested, so they save time and are reliable.
  • DLL: linked at run time; smaller executables, shared memory, update once; fails if missing or incompatible.
The core visual model

One picture every idea returns to

Utility software is system software that helps to maintain, protect and optimise the computer: a disk formatter, a virus checker, defragmentation software, disk contents analysis / disk repair software, file compression and back-up software. A program library is a collection of pre-written, pre-tested routines that developers can use in new programs. A Dynamic Link Library (DLL) is linked to a program when it runs, so one copy can be shared by many programs and updated without recompiling them.

Defragmentation: each file's blocks are moved next to each other Before After File A File B File C free space Fewer head movements on a magnetic disk, so files are read faster
Fig. 1: defragmentation moves the scattered blocks of each file together
Lesson sequence

Forty-five minutes, phase by phase

TimePhaseWhat happens in the roomGrouping
0 to 5 minHook: predictOpen with the question in the title, Tools and ready-made code.. An operating system comes with utility programs that format, protect, tidy, repair, shrink and back up your storage. Put the figure on the board: it is the one picture every idea in the lesson returns to.Whole class, then pairs
5 to 13 minTeach and check: Utilities that come with the OSEach utility exists because of a specific problem.Whole class, then pairs
13 to 21 minTeach and check: Program librariesSoftware under development is often constructed from existing code.Pairs
21 to 30 minTeach and check: Dynamic Link LibrariesA library can be joined to a program in two ways. Model the worked example Why use a DLL? on the board, one line at a time. Your turn: A program that worked yesterday now reports "missing.dll file" after another application was uninstalled. Explain what has happened.Jigsaw
30 to 36 minCheckThe four Stage 1 questions from the student lesson, answered on mini whiteboards or by show of fingers. Re-teach the one most get wrong.Individual, then whole class
36 to 43 minPlenaryThe exam-style questions from Stage 2, one at a time: thirty seconds alone, then a random call. The feedback lines in the key give the examiner's wording.Individual, random call
43 to 45 minExit and homeworkSet the worksheet below (6 questions, 17 marks). Learners self-assess against the objectives before they leave.Individual
Timing and contingency

Protect the parts that carry the learning

The sequence carries about fifty minutes of material, so the lab is driven by one student while the class predicts rather than explored freely. Times are a guide.

Protected: the check at 30 minutes. It is the only individual read on whether the key idea landed, and it is not cut.

Cut first if the build overruns: the last check in Dynamic Link Libraries, never the check or the plenary.

In a 60 minute block: run worksheet questions 1 to 3 in class as a Rally Coach set and model both the hardest worked example and its check live.

Running the cooperative task

Jigsaw

Split the content into expert pieces. Expert groups master one piece each, then regroup so every home team has one expert per piece, and each expert teaches their piece to the team.

The full structure, with its variations and the other twelve, is on the cooperative-learning page.

Examiner traps to pre-empt

What to head off, and how

Trap learners fall intoTeaching move that pre-empts it
Defragmenting a solid state drive gives no speed benefit (it has no moving heads) and causes extra write operations that wear it out.Defragmentation is for magnetic hard disks.
Say the routines are pre-tested, not just pre-written. "It is already written" gains the time mark but not the reliability mark.Return to Program libraries: ask a pair to state the correct version and show it on the lab before moving on.
Worksheet

Utility software and program libraries: worksheet

6 questions, 17 marks. Written in the style of the papers; no past paper question is reproduced.

NameClassDate
Q1 · explain[2 marks]

Explain why a disk formatter is needed.

Q2 · explain[3 marks]

Describe how defragmentation software can improve the performance of a computer with a magnetic hard disk.

Q3 · recall[3 marks]

Identify three utility programs provided with an operating system, other than defragmentation software, and state the purpose of each.

Q4 · explain[3 marks]

Software under development is often constructed using code from program libraries. Explain three benefits of this to the developer.

Q5 · explain[4 marks]

Explain the benefits of using Dynamic Link Library (DLL) files.

Q6 · analysis[2 marks]

A company updates a DLL used by several of its programs. One program stops working after the update. Explain why this could happen.

Answer key and marking notes
Q1 · 2 marks
  • A new storage device must be prepared before the OS can store files: the formatter sets up the file system / directory structure (tracks and sectors).
  • It can also be used to erase a disk for reuse, partition it, or check it for bad sectors.
Q2 · 3 marks
  • As files are saved and deleted, files become split into blocks scattered over the disk (fragmented).
  • The defragmenter moves the blocks so each file is stored in contiguous blocks, and groups free space together.
  • The read/write heads move less to read a file, so files are opened faster.
Q3 · 3 marks
  • Virus checker: detects and removes / quarantines malware.
  • Back-up software: copies data so it can be restored if lost or corrupted.
  • File compression: reduces file size to save storage and transmission time. (Also accept disk formatter, disk contents analysis / repair, with purpose.)
Q4 · 3 marks
  • Saves time: the routines do not have to be written from scratch.
  • The routines are already tested, so they are more reliable and reduce testing time.
  • Complex routines written by experts can be used without the developer needing that expertise (and give consistency across programs).
Q5 · 4 marks
  • The DLL is linked at run time, so its code is not included in the executable file, making the executable smaller.
  • One copy of the DLL in memory can be shared by several programs running at the same time, saving memory.
  • The DLL can be updated or fixed by replacing one file, without recompiling the programs that use it.
  • Saves development time as the routines are pre-written and pre-tested.
Q6 · 2 marks
  • The program is linked to the DLL at run time, so it now uses the new version.
  • The new version may have changed a routine's name, parameters or behaviour, so it is no longer compatible with the program.
Quiz

6 multiple-choice questions on this lesson

From the topic question bank. Assign them in the app for a marked score in your gradebook, or run the topic as a class game.

Q11 mark

What does defragmentation software do?

  • AMoves the blocks of each file on a magnetic hard disk so they are stored together, and groups the free space
  • BRemoves the parts of files that are infected with a virus and repairs the damaged blocks
  • CReduces the size of each file by removing repeated or unnecessary data
  • DSplits a large disk into separate partitions, each with its own file system
Q21 mark

A user wants to email a folder of 40 photographs, but the attachment is over the size limit. Which utility is most useful?

  • AFile compression software
  • BDefragmentation software
  • CDisk contents analysis software
  • DBack-up software
Q31 mark

Which statement describes a program library?

  • AA collection of pre-written, pre-tested routines that can be used in new programs
  • BA folder on a server holding the source code of every program a company has written
  • CA utility that keeps a record of every program installed on the computer
  • DA set of compiled programs that the operating system runs when the computer starts
Q41 mark

A computer has a solid state drive (SSD). A user asks whether to run defragmentation software every week to speed it up. What is the best advice?

  • ANo: an SSD has no moving read/write heads, so there is no speed gain and the extra writes wear it out
  • BYes: an SSD becomes fragmented faster than a magnetic disk, so it needs defragmenting more often
  • CYes: defragmenting moves the files into the SSD's RAM so they load more quickly
  • DNo: an SSD cannot store files in blocks, so it can never become fragmented
Q51 mark

Five programs each use the same 6 MiB graphics library, and all five are running at once. How much memory does the library code take up if it is statically linked, and if it is a DLL?

  • A30 MiB statically linked; 6 MiB as a DLL
  • B6 MiB statically linked; 30 MiB as a DLL
  • C30 MiB statically linked; 30 MiB as a DLL
  • D6 MiB statically linked; 1.2 MiB as a DLL
Q61 mark

A software company fixes a bug in a DLL used by four of its programs and replaces the DLL file. One of the programs now fails to start. Which explanation is most likely?

  • AThe program is linked to the DLL at run time, and the new version has changed a routine so it is no longer compatible with the program
  • BThe program had a copy of the old DLL code inside its executable, which now clashes with the new file
  • CReplacing the DLL deleted the program's executable file, because they were stored together
  • DThe other three programs are using the DLL, so it is locked and the fourth program cannot share it
Quiz key
Q1: A

A defragmenter rearranges file blocks so each file is contiguous, so the read/write heads move less. Removing infections is a virus checker's job. Making files smaller is file compression. Partitioning is done by a disk formatter or partitioning tool.

Q2: A

File compression reduces the size of the files and can bundle them into one archive, so the attachment is smaller. Defragmenting rearranges blocks on a disk but does not change file sizes. Disk analysis shows how space is used. Back-up software copies files but does not make them smaller.

Q3: A

A program library holds routines (procedures, functions, classes) already written and tested, ready to be called by new programs. A folder of a company's source code is just storage, not a library of reusable routines. A record of installed programs is not a library, and start-up programs are not library routines.

Q4: A

Fragmentation slows a hard disk because the heads must move between scattered blocks; an SSD reads any block equally fast, so defragmenting gives no benefit and wastes write cycles. It does not fragment faster in any way that matters for speed. Defragmenting does not move files into RAM. An SSD does store data in blocks and can be fragmented; it just does not matter for speed.

Q5: A

Static linking puts a copy in each executable, so 5 × 6 = 30 MiB is loaded. A DLL is loaded once and shared by all five programs, so only 6 MiB is used, a saving of 24 MiB. Swapping the figures reverses the two methods. A DLL does not need five copies, and it is not split between programs into smaller pieces.

Q6: A

A dynamically linked program loads whatever version of the DLL is present when it runs, so if a routine's name, parameters or behaviour changed, that program can fail. A statically linked program would contain the code itself, but then the DLL change would not affect it. Replacing a DLL does not delete executables. A DLL is designed to be shared by several programs at once.

Slides

Slides for this lesson

A projectable deck for every pack is on the way. Until then, present the student lesson full screen: its sections, figure and lab tabs follow the same order as the plan above.

Also for this topic

Everything else you can use

Original work by the TheLucidSTEM team. The worksheet items are written in the style of the papers; no past paper question is reproduced.
Previous lessonWhy a computer needs an operating system