60 practice questions
Explain the difference between assemblers, compilers, and interpreters.
mediumWhat does a linker do?
mediumWhat is a loader?
mediumExplain what an API is.
mediumWhat does "portability" mean for high-level languages?
easyExplain the difference between open source and proprietary software.
easyWhat is the purpose of utility software?
easyWhat is the role of a linker in the software development process?
hardExplain why utility software such as a backup tool is considered system software rather than application software.
easyWhich of the following is an example of system software?
easyWhat are the four main functions of an operating system?
easyWhat is the role of the OS in handling interrupts?
mediumExplain the difference between a process and a thread.
hardDescribe the role of memory management as a function of an operating system.
mediumWhat is 'virtual memory'?
mediumDescribe two functions of the file management (file system) component of an operating system.
mediumWhat is the purpose of a device driver?
easyExplain what is meant by 'paging' as used in memory management, and what happens when a 'page fault' occurs.
hardWhich function of an operating system is responsible for deciding which areas of RAM are allocated to which running processes?
mediumDescribe the role of input/output (I/O) management as a function of an operating system.
mediumIn round-robin CPU scheduling, each process is:
easyExplain how round-robin scheduling works, including the term 'time quantum'.
mediumAn advantage of the shortest job first (SJF) scheduling algorithm is that it:
mediumExplain how shortest job first (SJF) scheduling works, and describe one drawback of this approach.
mediumIn priority scheduling, the CPU is allocated next to:
easyExplain the risk of 'starvation' in priority scheduling, and describe how 'aging' can be used to address it.
hardWhich scheduling algorithm is most likely to cause 'starvation' for long-running processes, as shorter processes keep being given priority?
mediumCompare round-robin scheduling with first come, first served (FCFS) scheduling in terms of how quickly processes receive a response from the CPU.
mediumIf the time quantum in round-robin scheduling is set too small, what is the likely effect?
hardExplain the difference between pre-emptive and non-pre-emptive scheduling algorithms, giving an example of each.
mediumWhat is a virtual machine?
mediumWhich type of software translator converts source code into an intermediate form that is then run by a virtual machine, rather than directly into native machine code?
hardWhat is a 'hypervisor'?
easyExplain the difference between a Type 1 and a Type 2 hypervisor.
mediumWhy are virtual machines often used when testing new software?
mediumExplain why a company might use virtual machines for 'server consolidation'.
mediumA security benefit of running an application inside a virtual machine is that:
mediumExplain how a hypervisor allocates physical hardware resources (such as CPU time and RAM) between multiple virtual machines running on the same physical computer.
hardA disadvantage of using virtual machines is that:
mediumExplain why a business might use a virtual machine to run an older piece of software that requires an outdated operating system.
mediumWhat is the difference between procedural and object-oriented programming?
mediumWhich of the following is a key feature of the agile development methodology?
easyExplain one advantage and one disadvantage of the waterfall methodology.
mediumExplain why version control software (e.g. Git) is useful when developing software as part of a team.
mediumIn the Extreme Programming (XP) methodology, what is "pair programming"?
mediumThe spiral model of software development combines elements of:
mediumExplain the role of 'risk analysis' in the spiral model of software development.
hardWhich of the following lists the typical phases of the waterfall model in the correct order?
easyExplain why the spiral model might be more suitable than the waterfall model for a large, high-risk software project.
mediumIn agile development, a 'sprint' typically refers to:
easyDescribe three features of an IDE that support development.
easyWhat does a debugger allow a developer to do?
easyDescribe the difference between white-box and black-box testing.
mediumWhich IDE feature highlights syntax errors as the programmer types, before the program is run?
easyExplain what a "breakpoint" is and how it helps when debugging a program.
mediumDescribe what is meant by "iterative testing" and why it is preferable to testing only once at the end of a project.
mediumWhat is the main purpose of unit testing?
easyExplain the purpose of integration testing, and how it differs from unit testing.
mediumSystem testing is carried out to check that:
mediumExplain what 'equivalence partitioning' is and how it is used in black-box testing.
hardThe OS sits between hardware and software, managing resources and providing a consistent platform. Core jobs: memory management, processor scheduling, interrupt handling, file management, device management (via drivers), security/access control and providing a user interface.
| Memory technique | How it works | Strength / weakness |
|---|---|---|
| Paging | Memory divided into fixed-size pages loaded into any free frames | No external fragmentation; pages need not be contiguous |
| Segmentation | Memory divided into variable-size logical segments (a whole module/array) | Matches program structure; can cause external fragmentation |
| Virtual memory | Disk used as extra "RAM"; inactive pages swapped out | Runs large programs; too much swapping = thrashing |
| Scheduling algorithm | Idea | Drawback |
|---|---|---|
| Round robin | Each process gets a fixed time slice (quantum) in turn | Ignores priority; quantum size is a trade-off |
| First come first served (FCFS) | Run in arrival order until each finishes | A long job delays all behind it (convoy effect) |
| Shortest job first (SJF) | Run the shortest job next | Needs run-time estimate; long jobs may starve |
| Shortest remaining time (SRT) | Pre-emptive SJF โ switch if a shorter job arrives | Context-switch overhead; starvation |
| Multi-level feedback queues | Several priority queues; jobs move between them | Complex to design and tune |
| Translator | Translates | Output & speed | Errors | Source protection |
|---|---|---|---|---|
| Compiler | Whole program โ machine code once | Standalone executable; slow to compile, fast to run | Reported all together after compiling | Source not distributed |
| Interpreter | One statement at a time, every run | No executable; slower execution | Stops at the first error (good for debugging) | Source usually distributed |
| Assembler | Assembly mnemonics โ machine code (1:1) | Fast, very low-level | Per instruction | N/A |
1. LEXICAL ANALYSIS
- source code split into tokens
- whitespace and comments removed
- identifiers/keywords added to the symbol table
2. SYNTAX ANALYSIS (parsing)
- tokens checked against the language grammar
- an abstract syntax tree (AST) is built
- syntax errors reported here
3. CODE GENERATION
- object (machine) code produced from the AST
4. OPTIMISATION
- code rearranged/reduced to run faster or use
less memory (e.g. removing redundant operations)| Methodology | Approach | Strengths | Weaknesses |
|---|---|---|---|
| Waterfall | Strict sequential phases, sign-off each stage | Clear documentation; predictable; easy to manage | Inflexible; errors found late; user sees product only at end |
| Agile (Scrum) | Iterative sprints; working software every 2โ4 weeks | Flexible; constant user feedback; welcomes change | Less documentation; scope creep; harder to cost/timetable |
| Extreme Programming (XP) | Agile + pair programming + test-first | Very high code quality; fast feedback | Labour-intensive; needs disciplined team |
| Spiral | Iterative with risk analysis each loop | Risk-managed; suits large, high-risk projects | Expensive; complex; needs risk expertise |
| RAD | Rapid prototyping + user evaluation | Fast; user-centred; good for unclear requirements | Not for large/complex systems; needs skilled team |
| Test type | What it checks | Run by |
|---|---|---|
| Unit | A single function/module in isolation | Developer |
| Integration | Modules working correctly together | Developer / QA |
| System | The whole system against requirements | QA team |
| Alpha | In-house testing before any release | Internal testers |
| Beta | Limited release to real users | Selected end users |
| Acceptance | System meets the client's requirements | Client / end user |
| Regression | A change has not broken existing features | Automated suite |
A field accepts an exam mark 0โ100.
Normal : 47 (clearly valid)
Boundary : 0, 100 (lowest/highest valid)
-1, 101 (just-invalid boundaries)
Erroneous: "abc", 9999, blank (wrong type/way out)
Good test plans always include all three categories.INP ; input a number into ACC STA num ; store ACC in memory location "num" INP ; input a second number into ACC ADD num ; ACC = ACC + contents of num OUT ; output the value in ACC HLT ; stop num DAT ; reserve/label a data location Key idea: each mnemonic = one machine instruction (opcode + operand). This is procedural + low-level.
| Addressing mode | The operand isโฆ | Use / note |
|---|---|---|
| Immediate | the actual value to use | Fastest โ value is in the instruction |
| Direct | the memory address of the value | One memory access to get the value |
| Indirect | the address OF the address of the value | A pointer; enables flexible access |
| Indexed | a base address, plus an index register | Perfect for arrays: base + i |
Array starts at address 200, index register IR. To access array[3]: effective address = 200 + 3 = 203 Incrementing IR walks through the array โ this is exactly how a FOR loop over an array is implemented in machine code.