Purposes of an Operating System (OS) (Cambridge (CIE) A Level Computer Science): Flashcards

Exam code: 9618

1/84

0Still learning

Know0

  • Define resource management.

Cards in this collection (84)

  • Define resource management.

    Resource management is the operating system managing the computer's hardware efficiently to ensure the system runs smoothly.

  • Name three things resource management is vital for.

    Maximising performance, reducing bottlenecks, and ensuring multitasking works correctly.

  • What runs when a computer is switched on?

    The BIOS, stored in ROM, runs a bootstrap program.

  • The BIOS is stored in          and runs the bootstrap program.

    The BIOS is stored in ROM and runs the bootstrap program.

  • What does the bootstrap program load?

    The kernel and essential parts of the OS, from hard disk or flash storage into main memory (RAM).

  • How is flash memory organised on tablets and smartphones?

    A read-only section for the operating system, and a second section for apps and user data.

  • Define kernel.

    The kernel is the core of the operating system, responsible for process, memory, device, interrupt and file management.

  • True or False?

    The kernel is responsible only for memory management.

    False.

    The kernel manages processes, memory, devices, interrupts and files.

  • What does the kernel do for process management?

    It schedules processes, allocates CPU time, and handles multitasking.

  • What does the kernel do for memory management?

    It allocates RAM to processes, handles virtual memory, and prevents clashes.

  • What does the kernel use to control input and output devices?

    Device drivers.

  • How does the OS maximise CPU usage?

    Through scheduling, which allows multiple processes to be managed efficiently.

  • What does multitasking ensure?

    That the CPU switches rapidly between processes.

  • What happens when RAM is full?

    The OS may use virtual memory on disk to simulate extra memory, which allows more programs to run than would otherwise fit.

  • Why do input and output devices need optimising?

    They are much slower than the CPU.

  • Define Direct Memory Access (DMA) controller.

    A DMA controller allows data transfer between memory and devices without CPU involvement.

  • True or False?

    The DMA controller requires the CPU to manage each data transfer.

    False.

    DMA allows transfer without CPU involvement, which frees the CPU to perform other tasks.

  • What is the benefit of DMA?

    It frees up the CPU to perform other tasks while data is being moved.

  • What does the DMA controller do when a transfer is complete?

    It sends an interrupt to the CPU.

  • How does the OS hide hardware complexity?

    It provides a user-friendly interface through GUIs, and uses device drivers to handle communication with specific hardware, so users do not need to know technical commands.

  • A GUI makes tasks like file transfers easy, for example                            instead of the command line.

    A GUI makes tasks like file transfers easy, for example drag-and-drop instead of the command line.

  • Which is faster, a laser printer or a hard disk?

    A hard disk, at around 100 Mbps, against around 1 Mbps for a laser printer.

  • Which techniques manage the input/output resource?

    Interrupts, DMA, buffering and driver management.

  • Which techniques manage the storage resource?

    File system management, and read/write optimisation via caching and buffering.

  • Define multitasking.

    Multitasking is the operating system managing system resources so that the user has the impression that multiple programs are running at the same time.

  • How many instructions can a CPU execute at a time?

    One. It processes billions per second and switches between tasks so quickly that it gives the illusion of programs running simultaneously.

  • The OS splits tasks and allocates system resources based on a                 .

    The OS splits tasks and allocates system resources based on a priority.

  • Define process.

    A process is a program in execution, including the program code, current data, register values and memory space.

  • How does the OS treat each running application?

    As a separate process.

  • Name the three process states.

    Running, ready and blocked.

  • What does the running state mean?

    The process is actively being executed by the CPU.

  • What does the ready state mean?

    The process is prepared to run but is waiting for the CPU to be available.

  • What does the blocked state mean?

    The process is waiting for an event or resource, such as I/O completion.

  • Define scheduling.

    Scheduling is deciding which tasks to process, for how long, and in what order.

  • What is the difference between pre-emptive and non-pre-emptive scheduling?

    Pre-emptive allocates the CPU for time-limited slots and allows processes to be interrupted. Non-pre-emptive allocates the CPU for unlimited time slots, and a process cannot be interrupted until it completes or reaches its burst time.

  • Name two pre-emptive scheduling algorithms.

    Round Robin and Shortest Remaining Time First.

  • Name two non-pre-emptive scheduling algorithms.

    First Come First Serve and Shortest Job First.

  • What is the risk of pre-emptive scheduling?

    Low-priority processes can be neglected if high-priority processes arrive frequently.

  • What is the risk of non-pre-emptive scheduling?

    If a process with a long burst time is running, shorter processes are neglected.

  • Define Round Robin scheduling.

    A pre-emptive algorithm that distributes processor time equally, giving each process a time quantum. A process not finished by the end of its quantum moves to the back of the queue.

  • Define First-Come-First-Served scheduling.

    A non-pre-emptive algorithm that prioritises processes that arrive at the queue first. The current process blocks all others until it completes.

  • Define Multi-Level Feedback Queue scheduling.

    A pre-emptive priority algorithm using multiple queues so tasks of equal size are grouped together. Processes start in the highest priority queue and trickle down if they exceed the time quantum.

  • Define Shortest Job First scheduling.

    A non-pre-emptive algorithm where processes are continuously sorted by burst time, shortest to longest, with shorter jobs at the front of the queue.

  • Define Shortest Remaining Time First scheduling.

    A pre-emptive version of Shortest Job First, where processes with the shortest remaining time have higher priority.

  • Give a benefit and a drawback of Round Robin.

    Benefit: all processes get a fair share of the CPU, and it is predictable. Drawback: choosing the right time quantum is difficult, and long processes get high turnaround and waiting times.

  • What do both Shortest Job First and Shortest Remaining Time First require?

    Knowing the burst time of processes in advance.

  • True or False?

    A drawback of one scheduling algorithm is always a drawback.

    False.

    Suitability depends on the specific scenario and system requirements. A drawback in one scenario may not be a drawback in another.

  • What are the five steps of interrupt handling?

    An interrupt signal occurs; the current process is paused and its state saved; the kernel identifies the source and priority; the appropriate Interrupt Service Routine (ISR) is called; the original process is restored and resumed.

  • What is saved when a process is paused for an interrupt?

    Its state, including the registers and the program counter.

  • Define Interrupt Service Routine (ISR).

    The routine that is called to handle a particular interrupt, once the kernel has identified its source and priority.

  • True or False?

    After an interrupt has been handled, the original process is discarded.

    False.

    The original process is restored and resumed.

  • What do timer interrupts do?

    They trigger a context switch between processes, supporting pre-emptive multitasking.

  • What do I/O interrupts signal?

    That an I/O task has finished, such as a file write or printer job, which unblocks waiting processes.

  • What do hardware interrupts respond to?

    Urgent external events, such as a power failure or mouse input.

  • What do software interrupts do?

    They are generated by programs to request system-level services, such as memory allocation.

  • The                   , which is part of the kernel, uses interrupts to decide which process should run next.

    The scheduler, which is part of the kernel, uses interrupts to decide which process should run next.

  • Define memory management.

    Memory management is a fundamental role of the operating system, dealing with the allocation and deallocation of the computer's primary memory.

  • What happens when a user opens an application?

    Its data is loaded from storage into active memory so that it can run smoothly.

  • Why does primary memory need careful management?

    It is a limited resource in the system.

  • Name two benefits of memory management.

    Efficient allocation enables multitasking, and it maintains security by not letting programs access memory reserved for other programs.

  • Memory management maintains                  by stopping programs accessing memory reserved for others.

    Memory management maintains security by stopping programs accessing memory reserved for others.

  • Name the three memory management techniques.

    Paging, segmentation and virtual memory.

  • Define paging.

    Paging is a method of chunking primary memory into equal-sized blocks.

  • True or False?

    Pages are variable in size.

    False.

    Paging divides memory into fixed, equal-sized blocks. It is segmentation that uses variable sizes.

  • What happens to pages as users switch between applications?

    Memory is dynamically allocated. Pages are taken away from applications not in active use and granted to applications that are in active use.

  • Define internal fragmentation.

    Internal fragmentation is the wasted space that builds up inside pages over time, because unused space in a page cannot hold other unrelated data.

  • A 200KB file is divided into four 64KB pages.

    How much of the last page is used?

    The first three pages hold 192KB, so the fourth page has 8KB used and 56KB unused.

  • Why is unused space in a page wasteful?

    Because other unrelated data cannot be stored in that page.

  • Give one benefit and one drawback of paging.

    Benefit: it facilitates efficient memory management and enables the use of virtual memory. Drawback: it can lead to internal fragmentation.

  • Define segmentation.

    Segmentation is a method of chunking memory into blocks that correspond to different types of data needed by an application.

  • Are segments all the same size?

    No. They are sized depending on their allocated data.

  • Give an example of segments in an application.

    A video editing application may have a segment for video data, audio data and special effects.

  • Define external fragmentation.

    As segments fill up the memory, physical gaps reduce the maximum size of new segments that can be allocated.

  • Give one benefit and one drawback of segmentation.

    Benefit: it allows intuitive and efficient memory access, allocating only the space an application needs. Drawback: it can result in external fragmentation.

  • Define virtual memory.

    When a computer is running low on primary memory, secondary storage acts as an extension of the main memory.

  • What does virtual memory create?

    An illusion of a larger memory, which enables applications to continue to multitask.

  • Virtual memory is created                       .

    Virtual memory is created temporarily.

  • How does virtual memory compare with RAM for speed?

    Accessing data in virtual memory is considerably slower than RAM. Solid-state drives are faster than hard-disk drives, but neither is as fast as RAM.

  • True or False?

    Virtual memory is as fast as RAM.

    False.

    It is considerably slower. Neither solid-state drives nor hard disks are as fast as RAM.

  • What is the risk of over-relying on virtual memory?

    Performance issues.

  • Explain what is meant by virtual memory, for 3 marks.

    Disk or secondary storage is used to extend the RAM available, so the CPU appears able to access more memory than the available RAM. Only the data in use needs to be in main memory, so data can be swapped between RAM and virtual memory as necessary.

  • State one difference between paging and segmentation in how memory is divided.

    Paging divides memory into fixed size blocks. Segmentation divides memory into variable sized blocks.

  • Who decides the size, for paging and for segmentation?

    The operating system divides the memory into pages. The compiler is responsible for calculating the segment size.

  • Which has faster access times, paging or segmentation?

    Paging.

Sign up to unlock flashcards

or