The shape of the lesson
By the end of the lesson, learners can
- 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.
- 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.
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.
Forty-five minutes, phase by phase
| Time | Phase | What happens in the room | Grouping |
|---|---|---|---|
| 0 to 5 min | Hook: predict | Open 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 min | Teach and check: Utilities that come with the OS | Each utility exists because of a specific problem. | Whole class, then pairs |
| 13 to 21 min | Teach and check: Program libraries | Software under development is often constructed from existing code. | Pairs |
| 21 to 30 min | Teach and check: Dynamic Link Libraries | A 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 min | Check | The 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 min | Plenary | The 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 min | Exit and homework | Set the worksheet below (6 questions, 17 marks). Learners self-assess against the objectives before they leave. | Individual |
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.
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.
What to head off, and how
| Trap learners fall into | Teaching 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. |
Utility software and program libraries: worksheet
6 questions, 17 marks. Written in the style of the papers; no past paper question is reproduced.
Explain why a disk formatter is needed.
Describe how defragmentation software can improve the performance of a computer with a magnetic hard disk.
Identify three utility programs provided with an operating system, other than defragmentation software, and state the purpose of each.
Software under development is often constructed using code from program libraries. Explain three benefits of this to the developer.
Explain the benefits of using Dynamic Link Library (DLL) files.
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
- 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.
- 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.
- 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.)
- 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).
- 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.
- 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.
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.
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
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
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
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
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
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
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.
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.
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.
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.
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.
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 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.