Test 6: Long Questions

Long questions

10 questions · 50 min · 82 marks

Want to try first? Take the free Computer Science test: 94hbp-7gz9m-ufent-tsj4r

Sample questions with answers

The first 5 of 10, each with a model answer. Try writing yours first.

  1. Question 1 · 8 marks

    Describe the architecture of an operating system, explaining kernel, shell, and layered design with examples.

    Show model answer

    Architecture: the way the parts of an OS are organized and how they work together, like departments in a school.

    1)Kernel: the core part that directly controls the CPU, memory, and devices and decides how and when programs use these resources.

    Example: when you open a file, the kernel reads it from the hard drive and sends it to the screen.

    2)Shell: the outer part that interacts with the user, receives commands and passes them to the kernel. Graphical shells (Windows desktop) use icons and menus; command-line shells (Command Prompt or Terminal) use typed instructions. Figure 1.1 (diagram): User Applications are above the Operating System; inside it the Shell connects to the Kernel; the Kernel connects down to Hardware.

    Car example: the engine is the kernel and the steering wheel and dashboard are the shell.

    3)Layered design: the lower layer works directly with hardware like the CPU, RAM, and hard disk; the middle layer manages these resources; the upper layer runs applications and provides the user interface. Each layer depends on the one below it, which makes the OS easier to manage, repair, and improve.

    School example: support staff = lower layers, administration = middle layers, teachers and students = upper layers.

  2. Question 2 · 8 marks

    Explain the process lifecycle in detail with examples.

    Show model answer

    A process is a running program, and process management ensures each process gets the resources it needs. A process goes through three stages.

    1)Creation: happens when you start a program (like MS Word); the OS loads the program into memory and gives it the resources (CPU time and memory) it needs.

    2)Execution: the process is actively running and performing tasks.

    3)Termination: the process finishes its task and is closed by the user or the system; the OS frees the resources so other processes can use them.

    Example (Google Chrome): Creation begins when the user clicks the browser icon and the OS loads it into memory and allocates resources; Execution is loading web pages, displaying media, and responding to user actions; Termination occurs when the browser is closed and the OS stops the process and releases its resources.

    Diagram: Creation -> Execution -> Termination.

  3. Question 3 · 8 marks

    Differentiate between RAM and virtual memory, and explain how multithreading improves performance.

    Show model answer

    RAM (primary memory) is the main working area of a computer: a fast storage area where data and instructions are kept temporarily and erased when the computer is turned off.

    Example: opening a Word document places the program and document into RAM.

    Virtual memory: when RAM is full, the OS uses part of the storage drive (hard drive, SSD, or NVMe) as extra space that acts like temporary RAM, allowing more programs to run. Storage drives have lower data transfer speeds and higher access times than RAM, so virtual memory can reduce performance. Data of less active programs may be moved there, freeing RAM for current programs but making the less active programs slower.

    Multithreading: a single process divides its work into threads that share the same memory and resources but run independently.

    Benefits: Enhanced Performance (tasks run in parallel so complex operations finish faster); Improved Responsiveness (e.g. a word processor lets you type while another thread checks spelling); Support for Concurrent Operations (games, video editing, real-time communication tools); Efficient Use of Resources (threads need fewer resources than separate processes).

    Example: a browser loads content while playing a video.

  4. Question 4 · 8 marks

    Describe system calls, their purpose, and give examples of at least three types.

    Show model answer

    A system call is a request made by a program to the operating system to perform a specific task that the program cannot do directly.

    Purpose: they act as a bridge between user programs and the kernel, allowing applications to access hardware and core OS functions safely; without system calls, programs that directly control hardware can be unsafe and complex.

    Example: when you save a file in a text editor, the program uses a system call to tell the OS to write data to the storage drive.

    Types:

    1)open: opens a file for reading or writing (opening a music file to play);

    2)read: retrieves data from a file or input device (reading text from a document);

    3)write: sends data to a file or output device (saving an image to the computer);

    4)fork: creates a new process by duplicating an existing one (opening a new browser tab). Linux and macOS have a few hundred system calls while Windows uses nearly 2,000.

  5. Question 5 · 10 marks

    A computer system uses the First-Come, First-Served (FCFS) scheduling method to manage processes. The following table shows the arrival time and the CPU burst time (time needed for execution) of three processes: P1 (Arrival Time 0 seconds, Burst Time 4 seconds), P2 (Arrival Time 1 second, Burst Time 3 seconds), P3 (Arrival Time 2 seconds, Burst Time 1 second). Requirements: I. Arrange the processes in the order they will be executed according to the FCFS scheduling method. II. Show the execution sequence of all processes. III. Calculate the start time and completion time for each process. IV. Find the waiting time for each process. V. Calculate the average waiting time for all processes.

    Show model answer

    I. Order of arrival is P1, P2, P3, so FCFS executes P1, then P2, then P3. II. Execution sequence (Gantt chart): [ P1: 0-4 ] -> [ P2: 4-7 ] -> [ P3: 7-8 ] with time marks 0, 4, 7, 8. III. P1 starts at 0 and completes at 4; P2 starts at 4 and completes at 7; P3 starts at 7 and completes at 8. IV. Waiting time = start time - arrival time: P1 = 0 - 0 = 0 s; P2 = 4 - 1 = 3 s; P3 = 7 - 2 = 5 s. V. Average waiting time = (0 + 3 + 5) / 3 = 8 / 3 = 2.67 seconds (approximately).

More tests in Operating Systems: Structure and Services

Practise with a free account

Save your scores, see which chapters need work, and keep a notebook of every question you got wrong.

Create free account