Computer Science  ·  Level 6
Operating Systems Configuration
Chapter 5: Input and output management
📚 6 Topics
⚑ What you will be able to do

By the end of this chapter, you will be able to:

  • Apply file access methods correctly to retrieve and store data efficiently.
  • Verify file allocation techniques accurately to ensure data is organized properly.
  • Configure file protection and security measures effectively to keep data safe.
  • Perform file and directory operations correctly to manage data with ease.
  • Configure local policy settings correctly by following the right procedures.

Mastering these skills will help you manage computer systems confidently and keep data secure in any workplace.

5.1 Input - output management

Input-output (I/O) management is the part of the operating system that controls every transfer of data between the processor, main memory and peripheral devices such as keyboards, disks, printers, network cards and scanners. Peripheral devices are slower than the CPU, come from many manufacturers and behave differently, so the operating system hides these differences behind a uniform interface and decides when and how each transfer takes place.

Example: at a SACCO banking hall in Murang'a, the teller's PC reads a member card, prints a receipt and writes the transaction to disk; the I/O manager coordinates all three devices so that the teller sees one smooth operation.

5.1.1 Definition

I/O management is the set of operating system functions, data structures and driver software that receives requests for input or output from processes, schedules them, passes them to the correct device, monitors their progress and reports the result back to the requesting process. It sits between user programs and the hardware controllers.

  • I/O device: any hardware unit that supplies data to the computer or receives data from it, for example a mouse, monitor, hard disk or network adapter.
  • Device controller: the electronic circuit on the device or motherboard that understands the device's signals and has its own registers and buffer.
  • Device driver: operating system software that knows how to talk to one type of controller and translates general commands such as "read block 200" into controller commands.
  • I/O request: a call made by a process, normally through a system call such as read() or write(), asking for data to be moved.

5.1.2 Objectives of I/O management

The I/O subsystem is designed to meet a set of goals that keep the whole computer efficient and reliable.

  • Efficiency: keep the CPU and the devices busy at the same time so that slow devices do not hold up computation, for example by overlapping disk reads with processing.
  • Device independence: let programs use the same commands for different devices, so a program can save to a hard disk, flash drive or network share without being rewritten.
  • Uniform naming: give devices and files simple names such as C:\ or /dev/sda that do not depend on the hardware model.
  • Error handling: detect and, where possible, correct errors close to the hardware, for example by retrying a failed disk read before reporting failure to the user.
  • Synchronous and asynchronous transfers: support both blocking calls, where a process waits, and interrupt-driven transfers, where the process continues and is notified later.
  • Sharing and protection: allow shareable devices such as disks to be used by many processes while giving dedicated devices such as printers to one job at a time, and preventing unauthorised access.
  • Buffering: smooth out differences in speed and data unit size between devices and memory.

5.1.3 I/O hardware

I/O hardware consists of the physical parts that move data between the computer and the outside world. Knowing these parts helps a technician diagnose faults and choose drivers.

Name Specification Use
Port Connection point such as USB, HDMI, RJ45, serial Attaches a device to the computer
Bus Shared communication path such as PCI Express, SATA, USB Carries data, address and control signals between components
Device controller Chip with status, command and data registers Operates the device on behalf of the CPU
Interrupt controller APIC on modern PCs Signals the CPU when a device needs attention
DMA controller Direct Memory Access engine Moves blocks of data between device and memory without the CPU copying each byte

Ways the CPU talks to controllers

  • Port-mapped I/O: the CPU uses special instructions (IN and OUT on x86) to read and write controller registers that have their own address space.
  • Memory-mapped I/O: controller registers appear as ordinary memory addresses, so normal load and store instructions control the device; graphics cards use this widely.
  • Direct Memory Access (DMA): the CPU programs the DMA controller with a source, destination and byte count, then carries on with other work; the DMA controller raises an interrupt when the block transfer is complete.

Types of devices

  • Block devices: store data in fixed-size blocks that can be addressed individually, for example hard disks and SSDs.
  • Character devices: deliver or accept a stream of characters with no addressing, for example keyboards, mice and serial ports.
  • Network devices: send and receive packets through a socket interface.

5.1.4 I/O software

I/O software is organised in layers. Each layer uses the services of the one below it and offers a simpler service to the one above it.

  1. User-level I/O software: library routines such as printf() in C and spooling programs that format data and make system calls.
  2. Device-independent operating system software: provides uniform naming, buffering, error reporting, allocation of dedicated devices and a standard block size.
  3. Device drivers: device-specific code that issues commands to the controller, checks status and handles device errors; drivers are supplied by the hardware vendor or by the operating system.
  4. Interrupt handlers: short routines that run when a device signals completion; they save the CPU state, acknowledge the interrupt and wake the waiting driver or process.
  5. Hardware: the controllers and devices that carry out the physical transfer.

When a user saves a document, the request passes down these layers: the word processor calls write(), the file system finds the disk blocks, the disk driver programs the controller, the controller performs the transfer and raises an interrupt, and the interrupt handler tells the driver that the work is done.

5.1.5 Polling Vs Interrupt-driven I/O

The CPU needs a way to know when a device has finished an operation or has data ready. The two basic methods are polling and interrupts.

Polling

In polling (also called programmed I/O or busy waiting), the CPU repeatedly reads the device's status register in a loop until the busy bit clears, then moves the next byte. Polling is simple and has very low delay for fast devices, but it wastes processor time when the device is slow, because the CPU does nothing useful while waiting.

Interrupt-driven I/O

In interrupt-driven I/O, the CPU starts the operation and then switches to another process. When the device finishes, its controller sends an interrupt signal; the CPU suspends the current work, runs the interrupt service routine for that device and then resumes. This frees the CPU for useful work but each interrupt costs time for saving and restoring state.

Feature Polling Interrupt-driven I/O
Who checks the device CPU checks status repeatedly Device notifies the CPU
CPU use while waiting Wasted in a busy loop Free for other processes
Overhead per event Very small Context save and restore
Best suited to Very fast devices, simple embedded systems Slow or unpredictable devices such as keyboards and printers
Response to rare events Poor, events may be missed between checks Immediate

Modern systems combine both: a network card under heavy load switches from interrupts to polling (as in the Linux NAPI method) to avoid an interrupt storm, then returns to interrupts when traffic drops.

The rest of this chapter
🔒

Create a free account to open more of this chapter.

Free: practical guides, quick cards, workplace scenarios and more.

Create a free account
🔒5.2 Disk operations

Disk operations are the reads and writes that the operating system performs on hard disk drives and solid state drives. Because secondary storage is thousands of times slower than RAM, the speed of disk operations often decides how fast the whole computer feel…

🔒5.3 Computer clock system

The computer clock system provides the timing signals and time-keeping that the operating system needs to schedule processes, time-stamp files and coordinate I/O. Its parts are the system clock (crystal oscillator) that drives the CPU and buses, the real-time…

🔒5.4 Disk selection criteria

Disk selection criteria are the factors a technician weighs when choosing a storage device for a computer or server. The right disk balances capacity, performance, reliability, interface compatibility and cost for the workload. The curriculum stresses size and…

🔒5.5 Demonstration of disk storage management operations

Disk storage management operations are the practical tasks a technician performs to prepare, organise, protect and maintain storage. In Windows most of them are done in Disk Management (diskmgmt.msc), File Explorer, the Optimise Drives tool and the command lin…

🔒5.6 Handling removable media

Removable media are storage and peripheral devices that can be connected and disconnected while the computer runs, such as USB flash drives, external hard disks, memory cards, optical discs and USB peripherals. Handling them correctly means safe connection, sc…

Chapter Practical Activities

Practical 1: Create and organize a structured folder hierarchy on the local drive

Computer Science · Level 6
Operating Systems Configuration
PRACTICAL ASSESSMENT
TIME: 4 HOURS
⬇ PDFCandidate Instructions (Candidate Tool)

Type: Individual

INSTRUCTIONS TO CANDIDATE:
1.  You are required to perform the following task:
i.  Create a folder hierarchy named 'CompanyDocs' on the local C drive with three subfolders 'Finance_Reports', 'HR_Records', and 'Project_Files' each containing two subfolders, all folder names exactly as specified.
2.  You have been provided with the following resources for the practical task:
Tools & EquipmentMaterials
Computer with Windows 10 OS installedLocal hard drive with at least 100GB free space
Keyboard and mouse
⬇ PDFResources Required (Cutting List)
S/NItemQuantity
1Computer with Windows 10 OS installed1 Pc per Candidate
2Keyboard and mouse1 set per Candidate
3Local hard drive with at least 100GB free space1 Pc per Candidate
⬇ PDFAssessor Guide
Items to be EvaluatedMarks AvailableMarks ObtainedComments
TASK 1: Folder Creation and Organization
Observed laboratory rules and workstation setup
(Award 2 marks for adherence to lab rules and correct setup, zero if not)
2
Accessed local C drive correctly
(Award 2 marks for navigating correctly to the local C drive)
2
Created main folder named 'CompanyDocs' on C drive
(Award 3 marks for correct folder name and location)
3
Created three subfolders named 'Finance_Reports', 'HR_Records', and 'Project_Files' inside 'CompanyDocs'
(Award 2 marks each for correct subfolder names and placement)
6
Created two subfolders inside each of the three main subfolders with logical names
(Award 1 mark per correctly named and placed subfolder, total 6 marks)
6
Verified folder hierarchy structure matches the specified organization
(Award 3 marks for complete and accurate folder hierarchy)
3
Sub-Total22
PRODUCT CHECKLIST
Folder 'CompanyDocs' exists on local C drive
(Award 2 marks if folder exists at correct location)
2
Three main subfolders named exactly 'Finance_Reports', 'HR_Records', 'Project_Files' inside 'CompanyDocs'
(Award 1 mark per correctly named and placed folder)
3
Each main subfolder contains exactly two subfolders with logical and consistent naming
(Award up to 4 marks for correctly named and placed subfolders)
4
Folder names are free of spelling errors and use underscore as specified
(Award 2 marks for correct spelling and naming conventions)
2
Folder hierarchy structure corresponds exactly to task instruction
(Award 3 marks for complete, logical folder structure)
3
Sub-Total14
GRAND TOTAL36
ASSESSMENT OUTCOME:   ☐ Competent    ☐ Not Yet Competent (competent if at least 50%)

Practical 2: Systematic Renaming of Multiple Files Using Standard Naming Conventions

Computer Science · Level 6
Operating Systems Configuration
PRACTICAL ASSESSMENT
TIME: 4 HOURS
⬇ PDFCandidate Instructions (Candidate Tool)

Type: Individual

INSTRUCTIONS TO CANDIDATE:
1.  You are required to perform the following task:
i.  Rename a set of 10 text files systematically applying standard file naming conventions with prefix 'ProjA_' and sequential numbering from 01 to 10.
2.  You have been provided with the following resources for the practical task:
Tools & EquipmentMaterials
Desktop Computer with Windows 10 OSSet of 10 sample text files (.txt)
USB flash drive 16GB
⬇ PDFResources Required (Cutting List)
S/NItemQuantity
1Desktop Computer with Windows 10 OS1 Pc per Candidate
2Set of 10 sample text files (.txt)1 Set per Candidate
3USB flash drive 16GB1 Pc per Candidate
⬇ PDFAssessor Guide
Items to be EvaluatedMarks AvailableMarks ObtainedComments
TASK 1: Preparation and Safety
Observed laboratory rules including workstation cleanliness and no food/drink near computer
(Award 2 marks for full compliance or zero)
2
Sub-Total2
TASK 2: File Management and Renaming
Accessed the folder containing the 10 sample text files
(Award 1 mark for correct folder access or zero)
1
Selected files correctly for renaming
(Award 1 mark for selecting all 10 files or zero)
1
Applied standard naming convention prefix 'ProjA_' to all files
(Award 2 marks for correct prefix applied to all files or zero)
2
Renamed files with sequential numbering from 01 to 10 in two-digit format
(Award 3 marks for correct numbering sequence or zero)
3
Ensured file extensions (.txt) were preserved during renaming
(Award 2 marks for preserving file extensions or zero)
2
Verified all renamed files opened correctly without errors
(Award 2 marks for successful file access post-renaming or zero)
2
Sub-Total11
TASK 3: Documentation and Backup
Copied renamed files to USB flash drive as backup
(Award 2 marks for successful backup or zero)
2
Saved screenshot of renamed files list as 'fileren'
(Award 3 marks for correct screenshot saved or zero)
3
Sub-Total5
PRODUCT CHECKLIST
All 10 files renamed with prefix 'ProjA_' and sequential numbering 01 to 10, extensions intact
(Award 10 marks for full correct renaming or zero)
10
Sub-Total10
GRAND TOTAL28
ASSESSMENT OUTCOME:   ☐ Competent    ☐ Not Yet Competent (competent if at least 50%)
🔒

Free: practical guides, quick cards, workplace scenarios and more.

Create a free account
🔒Configure File and Folder Permissions on Windows 10Practical 3
🔒Apply Local Group Policy Settings to Enforce Security RestrictionsPractical 4
🔒Setting File Attributes on Selected DocumentsPractical 5
🔒Implement file compression and decompression for disk space optimizationPractical 6
🔒Advanced File Searching and Filtering in Windows OSPractical 7
🔒Configure Disk Quotas for User Accounts on Local Drive C:Practical 8
🔒Creating and Managing Shortcuts for Frequently Used Files and FoldersPractical 9
🔒Backup and Restore Local Files on Windows 10Practical 10
Am I competent?

At the start of this chapter we promised you would be able to:

  • Apply file access methods correctly to retrieve and store data efficiently.
  • Verify file allocation techniques accurately to ensure data is organized properly.
  • Configure file protection and security measures effectively to keep data safe.
  • Perform file and directory operations correctly to manage data with ease.
  • Configure local policy settings correctly by following the right procedures.

Tick each one you can genuinely do.

So, are you there yet?

You're competent when you can confidently do 50% or more of what this chapter promised.

Sign in to record how you're doing.