List the main functions of an operating system and the explain which of the various components of an OS (as given in the lecture slides) carry out these functions.
Functions of OS:
process(or) management
- schedular decides which process should be run
memory management
- processes are allocated memory as required
- handles virtual memory / pages
file and disk management
- manages files and directory
performance and error handling
- task manager
user interface
- TUI (command line), GUI (start menu, taskbar, desktop), UI (touchscreen phones)
device management
- drivers
system security
- Authentication, user roles, permission settings / access control
- e.g. lockscreen
Explain in your own words the difference between a program, a process and a thread.
Describe the main functions carried out by the scheduler in an operating system,
hence explain the necessity to have a scheduler.
schedular selects which process to run from a process queue within the CPU.
Describe the main functions of the memory management component of an OS.
To ensure that processes are allocated memory as required
Translating addresses in processes to physical addresses in RAM
Ensuring that processes cannot access memory belonging to other processes
Managing shared memory
Explain the purpose of virtual memory and how it works. Use diagrams where
necessary.
Uses virtual (logical) addresses that don’t correspond to physical memory locations.
The Memory Management Unit (MMU) translates virtual to physical addresses.
Memory is broken into pages.
If more RAM is needed, some pages are swapped to secondary storage (swap space) and swapped back when required.
Describe in detail (using diagrams where appropriate) how logical files are mapped to the physical space(s) they occupy on secondary storage.
File: Named collection of data, normally in secondary storage.
File System:
- Manages physical storage of data.
- Maps logical file structure to physical storage.
- A single file may be distributed across many blocks.
Directories/Folders: Provide hierarchical logical organisation.
Allocation table entries contain next block numbers (example: File Allocation Table).
(in own words):
Logical structures like folders and file names are mapped to actual disk sectors or blocks using an allocation table that tracks where each piece of the file is physically stored.
Describe the 3 types of UI covered in this module and explain their similarities and
differences.
Text User Interface (TUI)
Also known as Command Line Interface (CLI) or shell.
Requires user to know commands and parameters.
Text-based input/output.
Graphical User Interface (GUI)
Uses icons and menus.
Uses pointing devices (mouse, touchscreen).
Requires more memory; used in most modern OS.
Natural User Interface (NUI)
Uses intuitive, natural human behaviour (touch, voice, gesture).
Newer technology, e.g., Siri, Alexa, gaze-tracking, brain–machine interfaces.
List the various types of operating systems covered in this module and write a brief
explanation (in your own words) how they are different.
Note: A single OS may fall under multiple types/categories.
Simple Batch OS: Multiprocessing of batch programs; little interaction; early data processing systems.
Single-tasking OS: One program at a time (e.g. DOS).
Multitasking OS: More than one process at a time; processor switches between processes (e.g. Windows, MacOS, Android).
Multi-access / Timesharing OS: Multiple users and processes.
Multiprocessing OS: More than one CPU, can run multiple processes per CPU.
Virtual Machine (VM): Makes a single machine appear as multiple; uses hypervisor (e.g. VirtualBox, VMware).
Distributed OS: Manages distinct computers to appear as one system.
Real-time OS: Handles processes in real time for time-critical control systems (e.g. aircraft control).
Network OS: Runs on servers to manage data, users, and network traffic.
Mobile OS: Designed for portable devices (e.g. Android, iOS).