Systems software Flashcards

(211 cards)

1
Q

Why is processor scheduling needed?

A

To maximise CPU efficiency and ensure fair, fast execution of tasks

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is the role of the Interrupt Service Routine (ISR)?

A

To handle an interrupt before the CPU returns to the fetch-decode-execute cycle

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is an interrupt?

A

A signal sent to the CPU by software, hardware, or the internal clock to indicate an event requiring immediate attention.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is virtual memory used for?

A

Extending apparent RAM by using secondary storage when physical memory is insufficient.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is segmentation?

A

Dividing memory into variable sized logical segments.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is paging?

A

Dividing memory into fixed size blocks called pages

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is the purpose of memory management?

A

To allocate and organise RAM so programs run efficiently without interfering.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Is multitasking the same as multiprocessing?

A

Multitasking uses one CPU switching tasks; multiprocessing uses multiple CPUs running tasks simultaneously.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What does multitasking mean on a PC?

A

Running multiple programs apparently at the same time by rapidly switching between them.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What are the five key functions of an operating system?

A

Memory management, interrupt service routines, processor scheduling, backing store management and input, output management

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What is the purpose of the OS interface?

A

To hide hardware complexity and allow users to perform tasks easily

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What is the role of the loader?

A

It is a ROM based program that loads the OS from storage into RAM at startup

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Where is the operating system stored when the computer is switched off?

A

In permanent storage such as a hard disk

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Why does the user need an operating system to interact with hardware?

A

Because users cannot communicate directly with hardware, so the OS acts as a bridge

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What is an operating system?

A

A program or series of programs that manage the operations of the computer

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What is memory management in an OS?

A

The allocation and management of memory space so multiple tasks can run efficiently.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

Why is memory management important when multitasking?

A

It ensures each task has its own memory area and switches between them smoothly

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

What happens when you switch applications?

A

The OS switches to the corresponding memory area for that application

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

What is paging?

A

Dividing memory into fixed size 4KB pages to manage processors efficiently.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

Can a processor be split across multiple pages?

A

Yes a process may be stored in several separate pages in memory

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

How are logical and physical addresses linked in paging?

A

The OS uses a page table to map logical addresses to physical memory locations

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
22
Q

What is segmentation?

A

Dividing memory into variable length segments based on program structure

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
23
Q

How is segmentation different from paging?

A

Paging uses fixed size blocks; segmentation uses logical divisions of varying sizes

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
24
Q

Can only part of a program be loaded in segmentation?

A

Yes, just like paging partial loading is possible

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
What is virtual memory?
A technique where disk storage is used to extend RAMM when physical memory is full.
26
What is swapping in virtual memory?
Moving jobs between RAM and disk to free up memory for active tasks.
27
What happens if too many jobs are swapped in and out?
Performance slows due to the time needed for frequent memory swaps.
28
Where can you check your PC's memory stats?
In 'system information' showing RAM and virtual memory availability
29
What is the role of the scheduler?
To manage the order and timing of process execution to optimise CPU utilisation.
30
Why is processor scheduling necessary
Because only one process can execute at a time, so CPU must be shared fairly and efficiently
31
What is processor scheduling?
The OS process of allocating CPU time to tasks to maximise efficiency in a multitasking system
32
When does the CPU check for interrupts?
At the end of each fetch-decode-execute cycle
33
Give the order of example interrupt priorities from highest to lowest
Power failure Clock interrupt Input output device
34
Why are interrupts prioritised?
To ensure critical events are handled before lower-priority ones
35
What is the interrupt vector?
A table that stores the addresses of ISRs, allowing the CPU to call the correct routine
36
What happens after an interrupt is serviced?
The saved PC and registers are stored from the stack and the fetch-decode-execute cycle resumes
37
What is saved onto the system stack during an interrupt?
The program counter and register values of the interrupted process
38
What does the CPU do first when an interrupt is received?
It suspends the current process and disables lower priority interrupts
39
Why are timer interrupts important?
They trigger regularly to indicate it is the next process's turn, enabling multitasking
40
Give an example of a hardware interrupt
An input/output device signalling completion of an operation or an error such as 'printer out of paper'
41
When does a software interrupt occur?
When an application terminates or requests a service from the operating system
42
What are the three main objectives of a scheduler?
To maximise throughput, provide acceptable response times, and keep hardware resources as busy as possible
43
What is round robin scheduling?
A pre-emptive scheduling algorithm where each process receives a fixed time slice in a cyclic FIFO order.
44
What happens if a process does not finish within its time slice?
It is pre-empted and placed at the back of the ready queue
45
What mechanism enables round robin scheduling?
An interval timer that generates regular interrupts to enforce time slices
46
What is a limitation of round robin?
It does not guarantee good response time for all processes and may allow high priority jobs to receive consecutive slices
47
What is first come first served scheduling?
A non-pre-emptive algorithm where jobs are executed strictly in the order they arrive
48
What is a limitation of first come first served?
Long jobs delay shorter ones reducing overall responsiveness
49
What is shortest job first?
A non-preemptive algorithm that selects the process with the smallest estimated running time next
50
Where is shortest job first most suitable?
Batch systems or scientific workloads where job lengths are predictable
51
What is a limitation of shortest job first?
Long jobs may starve if short jobs keep arriving
52
What is shortest remaining time?
A preemptive version of Shortest Job First where the process with the least remaining execution time is always selected
53
Why does shortest remaining time improve responsiveness?
Short jobs can pre-empt long ones, reducing waiting time for small tasks
54
Why is shortest remaining time unsuitable for interactive systems?
It relies on accurate estimates of job length and may cause excessive pre-emption
55
What is the purpose of multi level feedback queues?
To adapt scheduling decisions dynamically based on process behaviour
56
Which types of jobs are prioritised in multi level feedback queues?
Short jobs and input/output bound processes
57
How does multi level feedback queues reduce bottlenecks?
Slow, input/output heavy jobs are removed to lower priority queues, allowing CPU bound jobs to progress with input/output occurs in parallel.
58
What is the overall aim of multilevel feedback queues?
To maximise processor utilisation by adapting to workload characteristics
59
What is the role of backing store management in an operating system?
To track where files and applications are stored on secondary storage and manage their transfer into memory when needed.
60
Why must the OS maintain a directory of file locations?
To allow fast access and retrieval of files and to ensure efficient file organisation
61
How does the OS control user access to files?
Through file permissions and authentication methods such as passwords
62
What file operations does the OS manage for the user?
Moving, deleting, renaming and protection files from unauthorised access
63
What is peripheral management?
The OS function responsible for controlling input/output devices and coordinating communication between them and the CPU.
64
Why does the OS check device status before sending data?
To ensure the device is available, online, and ready to receive data (e.g., has paper, is powered on).
65
What is a buffer and why is it used?
A temporary memory area used to store data being transferred to a device, compensating for speed differences between the CPU and slower peripherals.
66
How does buffering improve system performance?
It allows the CPU to continue other tasks while the device processes data at its own pace
67
What is a distributed operating system?
A parallel‑processing OS that spreads tasks across multiple networked computers, appearing to the user as a single unified system
68
How does a distributed OS divide work?
Tasks are broken into subtasks and allocated to different machines on the network.
69
Why can distributed systems improve performance?
They combine the storage, memory, and processing power of multiple computers, outperforming a single processor system.
70
Give examples of distributed OS versions
Linux, Unix, and Windows all have distributed variants.
71
What types of applications benefit from distributed OS?
Scientific research, forecasting, and other compute‑intensive workloads.
72
What is a multitasking operating system?
An OS that allows multiple programs to run apparently simultaneously by rapidly switching the CPU between them.
73
Where are multitasking OS typically used?
Standalone systems such as PCs and laptops.
74
How does a multitasking OS create the illusion of simultaneous execution?
By keeping several programs in memory and allocating small time slices of CPU time to each in turn.
75
Give examples of tasks a user might run simultaneously on a multi‑tasking OS.
Typing a document, playing music, writing code, checking emails.
76
What would you see in Task Manager on a multi‑tasking OS?
Many programs loaded in memory, even though only one is executing at any moment.
77
What is a multi‑user, multi‑tasking system?
A system where multiple users access a single powerful computer simultaneously, each running multiple tasks, managed by a scheduling algorithm.
78
What hardware setup is typical in a multi‑user, multi‑tasking system?
A central mainframe/server connected to multiple user terminals (keyboard + screen).
79
How does the OS ensure fairness in a multi‑user system?
By using processor scheduling to allocate CPU time efficiently among all users
80
Why do multi‑user systems rely heavily on scheduling algorithms?
Because many users share one CPU, so the OS must prevent bottlenecks and maintain acceptable response times.
81
What type of computer is a mobile phone?
A multi‑tasking computer with its own specialised operating system.
82
Why are mobile phone operating systems tied to specific hardware?
Because they must integrate tightly with device‑specific components like radios, sensors, and touchscreens.
83
Why do smartphones have two operating systems?
Main OS: Runs the user interface and application software. Lower‑level real‑time OS: Controls the radio and hardware components.
84
What is a security risk associated with the lower‑level mobile OS?
It may contain vulnerabilities that allow attackers to gain control of the device.
85
What features do mobile operating systems combine?
PC‑like OS features plus mobile‑specific capabilities such as touchscreen control, wireless connectivity, camera, microphone, and media functions.
86
Why do mobile OS need real‑time capabilities?
To manage time‑critical hardware operations like radio communication.
87
What is an embedded operating system?
A specialised OS built into dedicated hardware devices, running a fixed application stored in ROM and handling a limited range of inputs and outputs.
88
Where are embedded operating systems commonly found?
Devices such as washing machines, microwaves, and aircraft control systems.
89
Why do embedded systems have minimal user interfaces?
Because they perform a narrow set of tasks, requiring only simple controls like buttons, dials, or small displays.
90
Why do embedded systems not require complex memory management?
They have limited RAM and run a single, predictable application.
91
Why do embedded systems not need permanent storage management?
They typically do not store user data; the program is fixed in ROM.
92
What is a real‑time operating system?
An OS designed to process inputs and respond within strict time constraints, often used in safety‑critical systems.
93
Why must real‑time systems respond very quickly to inputs?
Because delays could compromise safety or system stability, especially in environments like aviation.
94
Why must real‑time systems handle many inputs simultaneously?
They monitor numerous sensors and controls at once, requiring immediate and coordinated responses.
95
What is a failsafe mechanism in a real‑time OS?
A system that detects hardware faults and takes corrective action to maintain safe operation.
96
What is redundancy in a real‑time system?
The inclusion of backup hardware that automatically takes over if a component fails.
97
Give an example of a real‑time embedded system.
The flight‑control system in a fly‑by‑wire aircraft such as an Airbus A320.
98
What is the BIOS?
A program stored in EPROM that runs when the computer is powered on, initialising hardware and starting the operating system.
99
What is the main purpose of the BIOS during startup?
To perform POST (Power‑On Self‑Test) and check essential hardware such as RAM, keyboard, and disk drives.
100
What does it mean that BIOS provides an abstraction layer?
It hides hardware details from software, allowing programs to interact with hardware in a standardised way.
101
Is BIOS used after the OS loads?
No — in modern systems, BIOS hands control to the OS and is no longer used afterward
102
What is a device driver?
A software program that allows the operating system to communicate with and control a specific hardware device.
103
Why are device drivers necessary?
They translate OS commands into hardware‑specific instructions, so the OS doesn’t need to know hardware details.
104
Are device drivers hardware‑dependent or OS‑dependent?
Both — each driver is written for a specific device and a specific operating system.
105
How are device drivers installed?
Automatically by the OS when hardware is detected, or manually via installation software.
106
What happens when a program calls a device driver routine?
The driver executes hardware‑level operations and may call back into the original program when complete.
107
What is a virtual machine?
A program that emulates the functions of a physical computer, allowing one OS to run inside another.
108
What can a virtual machine do?
Execute intermediate code, emulate hardware, or run a full operating system within another system.
109
Where might you find virtual‑machine‑style interfaces?
Smartphones and car navigation systems, where a software layer mimics a traditional OS interface
110
Why are virtual machines useful?
They allow testing, hardware emulation, isolation, and running software designed for different systems
111
What are the two main categories of software?
Systems software and applications software.
112
What is systems software?
Software required to run the computer’s hardware and application programs, including the OS, utilities, libraries, and translators.
113
What is applications software?
Programs designed to perform user‑focused tasks such as word processing, browsing, or gaming.
114
What are the types of applications software?
Off‑the‑shelf (proprietary) and custom‑written (often open source).
115
What is the role of the operating system?
It sits between hardware and application software, managing resources and providing a user interface.
116
What is meant by resource management in an OS?
Controlling and coordinating hardware such as CPU, memory, storage, and peripherals.
117
What does the OS provide to help users interact with the system?
A user interface (e.g., Windows) for running applications, changing settings, and installing software.
118
What does the BIOS do during POST?
Tests essential hardware such as RAM, keyboard, and disk drives.
119
What is compression software?
A utility program that reduces file size so data can be stored or transmitted more efficiently.
120
Why is compression useful for internet transmission?
Smaller files upload/download faster and help meet size limits (e.g., email attachment limits).
121
Why might users compress files before emailing them?
To reduce file size so it can be sent within attachment limits and downloaded more quickly.
122
Are compression tools always built into the OS?
Basic tools are included, but advanced compression/sharing tools (e.g., WinZip) may require separate purchase.
123
Name some utility programs
Disk defragmentation Automatic backup Automatic updating Virus checker Compression software
124
What are the categories of applications software?
General‑purpose, special‑purpose, and custom‑written.
125
What is general‑purpose software?
Software that can be used for many tasks, e.g., word processors, spreadsheets, graphics packages.
126
What is special‑purpose software?
Software designed for a specific task, e.g., payroll systems, hotel booking systems, fingerprint scanners.
127
What is custom‑written software?
Software developed specifically for one organisation when off‑the‑shelf solutions do not meet their needs.
128
What is bespoke software?
Custom‑developed software tailored to a specific organisation’s requirements.
129
What are advantages of bespoke software?
Fully customised features Can be extended as needs change
130
What are disadvantages of bespoke software?
Expensive due to unique development Long development time May contain undiscovered errors
131
What is off‑the‑shelf software?
Pre‑made software sold to the general market.
132
What are advantages of off‑the‑shelf software?
Cheaper because cost is shared Ready to install immediately Well‑tested and well‑documented
133
What are disadvantages of off‑the‑shelf software?
May include unwanted features May lack some required features
134
What is utility software?
System software designed to optimise computer performance or perform maintenance tasks such as backups, compression, updates, and security checks.
135
What is disk defragmentation?
A utility that reorganises fragmented files on a hard disk so file blocks are stored contiguously, improving read speed and system performance.
136
Why does fragmentation slow down a computer?
The read/write head must move to multiple locations to access a single file, increasing access time.
137
How often do modern systems run defragmentation?
Automatically on a schedule (e.g., weekly on Windows), though it can also be run manually.
138
What does an automatic backup utility allow the user to specify?
Backup destination Files/folders to back up Backup schedule and type (full zipped backup or mirror backup)
139
What is the difference between full backup and mirror backup?
Full backup: Files are zipped/compressed. Mirror backup: Files are copied exactly without compression.
140
Why are backups essential?
They protect data against loss from hardware failure, corruption, or accidental deletion
141
What does an automatic update utility do?
Regularly checks the internet for newer versions of installed software and installs updates automatically.
142
Why must firewalls and antivirus software be updated frequently?
New threats and viruses appear constantly, so security software must stay current to remain effective.
143
Why do application updates require a licence?
Updates are part of the software’s maintenance cycle and require a valid licence to access.
144
What does a virus checker do?
Scans the hard drive and internet downloads for malware, removing or quarantining infected files.
145
Why is real‑time scanning important?
It detects threats immediately before they can execute or spread.
146
What built‑in antivirus does Windows include?
Windows Defender.
147
What is open source software?
Software licensed for free use, with source code provided so users can study, modify, and redistribute it.
148
What must developers do when creating software from open source code?
Distribute their new software with its source code and keep it free to use.
149
How is open source different from freeware?
Freeware is free to use but does not provide access to source code and often has usage restrictions.
150
What are benefits of open source software?
Free to use Maintained by a community of developers Supported by commercial organisations in many cases Encourages transparency and customisation
151
What is closed source software?
Proprietary software where the source code is not available and usage is controlled by a licence.
152
What restrictions might proprietary software have?
Single‑user licences No permission to modify or redistribute No access to source code
153
What are benefits of proprietary software?
Professionally developed and tested Regular updates and bug fixes Technical support and documentation Large user base
154
What criteria should be considered when selecting software?
Required functionality Compatibility with available hardware Whether it is off‑the‑shelf or custom‑written Cost Reliability and user base (tried and tested)
155
What is an assembler?
A translator that converts assembly language into machine code (object code) using a one‑to‑one instruction mapping
156
What is object code?
The machine code instructions that a specific computer can execute directly
157
Why is assembly language considered low‑level?
Each instruction closely corresponds to a single machine code instruction, making it hardware‑specific.
158
What is a compiler?
Translating the entire source code into machine code before execution, producing an independent executable file.
159
What is an interpreter?
Translating and executing source code line‑by‑line at runtime, without producing a separate executable.
160
When is a compiler preferred?
For performance‑critical applications where fast execution is needed
161
When is an interpreter preferred?
For rapid development, debugging, or platform‑independent execution.
162
Why do some translators produce intermediate code like bytecode?
To allow platform‑independent execution via a virtual machine, improving portability and security.
163
What are the stages of compilation?
Lexical analysis — tokenising the source code Syntax analysis — checking grammatical structure Code generation — producing machine code Optimisation — improving performance and efficiency
164
What is the role of a linker?
Combines object code with libraries and resolves external references to produce a complete executable.
165
What is the role of a loader?
Loads the executable into memory and prepares it for execution by the CPU.
166
What are libraries in programming?
Pre‑written code modules that provide common functions, which can be linked into programs to save development time.
167
What is an interpreter?
A translator that converts source code into machine code line‑by‑line and executes it immediately.
168
How does an interpreter run a program?
It reads a line, translates it, executes it, then moves to the next line.
169
What happens when an interpreter encounters a syntax error during execution?
It stops at the line containing the error and reports it, but any previous lines that were valid will already have executed.
170
What happens if the syntax error prevents the program from being parsed?
The interpreter scans the whole program first, detects the error, and does not execute any code until the error is fixed.
171
Why does the interpreter sometimes run part of the program before crashing, and sometimes run none of it?
If the error is detected during execution, earlier lines run. If the error is detected during initial scanning, nothing runs.
172
What is the key difference between an interpreter and a compiler?
Interpreter: Executes code line‑by‑line, stopping at errors. Compiler: Translates the entire program first; no code runs until all errors are fixed.
173
What is lexical analysis?
The stage where the compiler removes whitespace/comments, breaks the source code into tokens, and adds identifiers/literals to the symbol table.
174
What does the lexical analyser produce?
A stream of tokens representing keywords, identifiers, operators, and literals.
175
What is tokenisation?
Converting the source code into a sequence of token codes used by later compiler stages.
176
What is syntax analysis?
The stage where the compiler checks whether the token sequence follows the grammar rules of the programming language.
177
What type of errors does syntax analysis detect?
Structural errors such as missing brackets, incorrect operator placement, or invalid statement structure.
178
What data structure is often produced during syntax analysis?
A parse tree or abstract syntax tree (AST).
179
What is code generation?
Translating the validated program into machine code or intermediate code.
180
What is code optimisation?
Improving the generated code to make it more efficient without changing its behaviour.
181
Give examples of code optimisation
Removing redundant calculations Reordering instructions for faster execution Minimising memory usage Loop optimisation (e.g., unrolling)
182
What are the main functions of lexical analysis?
Remove superfluous characters (e.g., whitespace) Remove comments Perform simple error checks (e.g., illegal identifiers, invalid operators) Convert source code into tokens Add identifiers/literals to the symbol table
183
What types of errors can the lexical analyser detect?
Illegal identifiers and invalid operators.
184
What types of errors can the lexical analyser not detect?
Misspelled keywords and undeclared variables — these are caught during syntax analysis.
185
What does syntax analysis do?
Checks whether the token sequence follows the grammar rules of the language.
186
What does the syntax analyser use to validate structure?
A set of grammar rules, often represented as a parse tree or abstract syntax tree.
187
What does the syntax analyser place on the symbol table?
Tokens representing keywords, identifiers, constants, and operators.
188
What is the purpose of the symbol table?
To store information about every identifier and keyword used in the program for use during compilation.
189
What information is stored in a symbol table entry?
Identifier/keyword Kind of item (variable, constant, keyword, operator, etc.) Type (integer, real, Boolean, etc.) Run‑time address or value Pointer to additional information (e.g., array bounds, procedure parameters)
190
Why is the symbol table central to compilation?
It allows the compiler to track variables, types, memory locations, and semantic information throughout the compilation process.
191
What are the advantages of code optimisation?
May significantly improve performance Helps reduce execution time and resource usage Can eliminate unnecessary operations (e.g., redundant loops)
192
What is a potential drawback of code optimisation?
It increases compilation time and may produce unexpected results if the optimiser misinterprets intent.
193
What is a linker?
A tool that combines object code with separately compiled subroutines and assigns machine addresses to them.
194
What is a loader?
A utility that loads the compiled and linked object code into memory for execution.
195
Why are linkers and loaders essential?
They allow modular programming by enabling separately compiled code to be combined and executed.
196
What are libraries?
Collections of pre‑compiled routines and functions that can be imported into programs to perform common tasks.
197
What are the advantages of libraries?
Standardised interfaces Tested and error‑free code Saves development time Avoids reinventing common solutions
198
Why are loops slower in interpreted programs?
Each statement inside the loop is reinterpreted on every iteration
199
What is a disadvantage of interpreters?
They are slower because each statement is translated every time it is executed
200
Why are interpreted programs platform independent?
They can run on any machine with the appropriate interpreter
201
What are the advantages of interpreters in development?
No lengthy recompilation is needed after each change
202
Why is compiled code easier to distribute?
It can be shared without giving access to the source code
203
Why is compiled code suitable for frequent use?
It can be saved and run repeatedly without recompilation
204
Why does compiler object code run faster than interpreted code?
It is already translated into machine code before execution
205
Why might a programmer not want to distribute source code?
To prevent others from copying, modifying, or reverse engineering their work
206
Why is bytecode useful for program safety?
It can be checked by the virtual machine before execution to prevent malicious behaviour
207
How can bytecode be optimised?
It can be optimised for the specific virtual machine that will interpret it.
208
Why is bytecode more secure than distributing source code?
It is harder to reverse engineer than source code
209
Why does bytecode provide platform independence?
Any machine with the appropriate virtual machine can run the bytecode
210
Why do some languages compile to bytecode instead of machine code?
To allow the code to be interpreted by a virtual machine, combining benefits of compiling and interpreting
211
What is bytecode?
An intermediate representation of source code produced by a compiler and executed by a virtual machine.