Operating Systems quiz

Processes, threads, scheduling, memory management and file systems.

81 questionsInstant feedbackFree

Set up your quiz

Difficulty
Number of questions

Tip: press 1–4 to answer and Enter for the next question.

All 81 questions with answers
  1. What is an operating system?

    • A text editor
    • Software that manages hardware and provides services to programs (correct)
    • A programming language
    • A type of hardware
  2. Which of the following is an operating system?

    • Python
    • Oracle
    • Linux (correct)
    • HTML
  3. What is the kernel?

    • A text file
    • A type of virus
    • A hardware chip
    • The core component of the operating system (correct)
  4. What is a process?

    • A program in execution (correct)
    • A file on disk
    • A hardware device
    • A network cable
  5. Which CPU scheduling algorithm is non-preemptive?

    • Round Robin
    • Shortest Remaining Time First
    • First Come First Serve (correct)
    • Preemptive Priority
  6. Which is the fastest memory in a computer?

    • RAM
    • Registers (correct)
    • Hard disk
    • SSD
  7. Which is one of the four necessary conditions for deadlock?

    • Preemption
    • Starvation
    • Fragmentation
    • Mutual exclusion (correct)
  8. How do threads of the same process differ from separate processes?

    • Threads have separate address spaces
    • Threads cannot run concurrently
    • Threads share the process address space (correct)
    • Threads do not use the CPU
  9. What is virtual memory?

    • Extra physical RAM chips
    • A technique that uses disk space to extend usable memory (correct)
    • A type of cache
    • A graphics memory
  10. Paging helps eliminate which problem?

    • Deadlock
    • Starvation
    • Internal CPU errors
    • External fragmentation (correct)
  11. What is a semaphore used for?

    • Process synchronization (correct)
    • Disk formatting
    • Memory allocation
    • Printing
  12. Round Robin scheduling uses which concept?

    • Priority number
    • Shortest job
    • Time quantum (correct)
    • Arrival order only
  13. What is a context switch?

    • Changing the screen resolution
    • Saving one process state and loading another (correct)
    • Switching off the CPU
    • Restarting the OS
  14. A page fault occurs when:

    • The CPU overheats
    • A file is deleted
    • The disk is full
    • The requested page is not in main memory (correct)
  15. The Banker's algorithm is used for:

    • Disk scheduling
    • Memory paging
    • Deadlock avoidance (correct)
    • File encryption
  16. What is Belady's anomaly?

    • Page faults always decrease with more frames
    • Page faults can increase when more frames are added (e.g. FIFO) (correct)
    • CPU usage doubles
    • Disk speed drops
  17. What is thrashing?

    • Excessive paging that causes very low CPU utilization (correct)
    • Fast CPU execution
    • A type of scheduling
    • A disk format
  18. What is a race condition?

    • A fast CPU benchmark
    • A scheduling algorithm
    • Outcome depends on the timing of concurrent access to shared data (correct)
    • A type of memory leak
  19. Which page replacement algorithm replaces the page that will not be used for the longest time?

    • Optimal (OPT) (correct)
    • FIFO
    • LRU
    • Random
  20. What is priority inversion?

    • Giving all tasks equal priority
    • Reversing the CPU clock
    • Killing low-priority tasks
    • A low-priority task holding a resource needed by a higher-priority task (correct)
  21. Which of these is a mobile operating system?

    • Android (correct)
    • Photoshop
    • Oracle
    • Chrome browser
  22. Which company develops macOS?

    • IBM
    • Google
    • Microsoft
    • Apple (correct)
  23. Linux is an example of what kind of operating system?

    • Mobile-only
    • Closed-source only
    • Embedded-only
    • Open-source (correct)
  24. What is a file system?

    • The way an OS organizes and stores files on a disk (correct)
    • A network protocol
    • A list of programs
    • A type of RAM
  25. What is a device driver?

    • A type of CPU
    • Software that lets the OS communicate with hardware (correct)
    • A network cable
    • A person who fixes computers
  26. What does multitasking mean?

    • Using several monitors
    • Having many users
    • Typing quickly
    • Running more than one program seemingly at the same time (correct)
  27. What is booting?

    • Shutting down the computer
    • Installing apps
    • Formatting a disk
    • Starting up a computer and loading the operating system (correct)
  28. Which program loads the OS kernel when the computer starts?

    • Antivirus
    • Bootloader (correct)
    • Text editor
    • Compiler
  29. What is a GUI?

    • A type of kernel
    • A graphical user interface with windows and icons (correct)
    • A storage device
    • A command-line only interface
  30. What is the command-line interface on Linux usually called?

    • Desktop
    • Browser
    • Shell or terminal (correct)
    • Explorer
  31. Which of these manages files on Windows?

    • Notepad
    • File Explorer (correct)
    • Paint
    • Task Manager only
  32. Which tool on Windows shows running programs and CPU usage?

    • Task Manager (correct)
    • Disk Cleanup
    • File Explorer
    • Control Panel
  33. What is a thread?

    • A user account
    • A storage block
    • A type of cable
    • The smallest unit of execution within a process (correct)
  34. What is the main job of memory management in an OS?

    • Connecting to Wi-Fi
    • Printing documents
    • Cleaning the screen
    • Allocating and freeing memory for programs (correct)
  35. What is a system call?

    • A function in a user library
    • A phone call to support
    • A request from a program to the OS kernel for a service (correct)
    • A hardware interrupt only
  36. What is the difference between a program and a process?

    • A process is a program in execution (correct)
    • A process is a file type
    • They are the same
    • A program is running; a process is stored on disk
  37. What is a Process Control Block (PCB)?

    • A file system block
    • A memory cache
    • A hardware chip
    • A data structure the OS keeps for each process (correct)
  38. Which are typical process states?

    • Start, stop, pause only
    • Active, deleted
    • New, ready, running, waiting, terminated (correct)
    • Open, closed, saved
  39. What does the CPU scheduler do?

    • Chooses which ready process runs next on the CPU (correct)
    • Manages disk space
    • Updates the OS
    • Schedules meetings
  40. What is First-Come, First-Served (FCFS) scheduling?

    • Processes run in the order they arrive (correct)
    • The shortest job runs first
    • Processes take turns with time slices
    • The highest priority runs first
  41. What is Shortest Job First (SJF) scheduling known for?

    • Being fair to long jobs
    • Minimum average waiting time when burst times are known (correct)
    • Using time slices
    • Never causing starvation
  42. What is starvation in scheduling?

    • The CPU overheats
    • A process waits indefinitely because others are always chosen first (correct)
    • A process uses too much memory
    • A process ends early
  43. What technique prevents starvation in priority scheduling?

    • Using FCFS only
    • Lowering all priorities
    • Aging, which raises the priority of waiting processes (correct)
    • Killing old processes
  44. What is the difference between preemptive and non-preemptive scheduling?

    • They are identical
    • Non-preemptive is always faster
    • Preemptive can interrupt a running process; non-preemptive cannot (correct)
    • Preemptive never switches
  45. What is a time quantum?

    • The fixed time slice each process gets in Round Robin (correct)
    • The disk access time
    • The boot time
    • The total runtime of a process
  46. What is a mutex?

    • A file permission
    • A type of process
    • A lock that lets only one thread enter a critical section at a time (correct)
    • A memory block
  47. What is a critical section?

    • The kernel's main loop
    • An error handler
    • The boot sector
    • Code that accesses shared resources and must not run concurrently (correct)
  48. What is internal fragmentation?

    • A full hard drive
    • A damaged disk
    • Wasted space inside an allocated memory block (correct)
    • Free memory split into small gaps between blocks
  49. What is external fragmentation?

    • Free memory split into small non-contiguous pieces (correct)
    • A broken file
    • Memory used by the kernel
    • Wasted space inside a block
  50. What does a page table do?

    • Maps virtual page numbers to physical frame numbers (correct)
    • Stores passwords
    • Lists files on disk
    • Schedules processes
  51. What is the TLB?

    • A scheduling queue
    • A type of disk
    • A cache of recent page table translations (correct)
    • A file system table
  52. What is swapping?

    • Moving processes or pages between RAM and disk (correct)
    • Changing the CPU
    • Switching users
    • Exchanging two files
  53. Which page replacement algorithm removes the page used least recently?

    • FIFO
    • Optimal
    • LRU (correct)
    • Random
  54. What is a zombie process in Unix?

    • A process that has finished but whose parent has not collected its exit status (correct)
    • A frozen process
    • A process using too much CPU
    • A virus
  55. What does the fork() system call do in Unix?

    • Splits a file
    • Creates a new child process that is a copy of the parent (correct)
    • Opens a network connection
    • Deletes a process
  56. What is an interrupt?

    • A program crash
    • A signal that makes the CPU pause and handle an event (correct)
    • A user logout
    • A disk error
  57. What is DMA (direct memory access)?

    • A type of RAM
    • A memory leak
    • Letting devices transfer data to memory without the CPU copying each byte (correct)
    • A scheduling algorithm
  58. What is kernel mode?

    • A mode for user apps
    • A mode for running games
    • Safe mode only
    • A privileged CPU mode where the OS can access all hardware (correct)
  59. What is a monolithic kernel?

    • A kernel with only one function
    • A kernel where most OS services run in kernel space together (correct)
    • A kernel written in one file
    • A microkernel
  60. What is a microkernel?

    • A very small computer
    • A kernel for phones only
    • A minimal kernel that runs most services in user space (correct)
    • A faulty kernel
  61. Which file permission notation means read, write and execute for the owner only on Linux?

    • 644
    • 777
    • 755
    • 700 (correct)
  62. What does the Linux command chmod do?

    • Changes file permissions (correct)
    • Changes directory
    • Changes owner only
    • Changes the shell
  63. What are the four Coffman conditions for deadlock?

    • Mutual exclusion, hold and wait, no preemption, circular wait (correct)
    • Paging, swapping, thrashing, caching
    • Starvation, aging, priority, fairness
    • Read, write, execute, delete
  64. What is deadlock avoidance?

    • Granting resources only if the system stays in a safe state (correct)
    • Restarting the OS
    • Killing all processes
    • Ignoring deadlocks
  65. What is a safe state?

    • A state after a reboot
    • A state where there is an order in which all processes can finish (correct)
    • A state with no running processes
    • A state with free memory only
  66. What is the difference between a counting semaphore and a binary semaphore?

    • They are identical
    • A counting semaphore can take any non-negative value; a binary one only 0 or 1 (correct)
    • A binary semaphore counts processes
    • A counting semaphore is a mutex
  67. What is the producer-consumer problem?

    • Allocating CPUs
    • Scheduling printers
    • Coordinating processes that share a fixed-size buffer (correct)
    • Selling software
  68. What is the dining philosophers problem used to illustrate?

    • Deadlock and resource sharing in concurrency (correct)
    • Network routing
    • Memory allocation
    • File systems
  69. What is demand paging?

    • Paging on user request
    • Loading the whole program at start
    • Loading a page into memory only when it is first accessed (correct)
    • Deleting unused pages
  70. What is the working set of a process?

    • Its threads
    • All pages on disk
    • The files it opened
    • The set of pages it has used recently (correct)
  71. What is copy-on-write?

    • Backing up memory
    • Sharing memory pages until one process writes, then copying them (correct)
    • Copying files on every write
    • Writing to two disks
  72. What is an inode in Unix file systems?

    • A file name
    • A structure storing a file's metadata and block locations (correct)
    • A network node
    • A directory only
  73. What is a hard link?

    • A shortcut to a path
    • A broken file
    • A network link
    • Another directory entry pointing to the same inode (correct)
  74. What is the difference between user-level and kernel-level threads?

    • They are identical
    • User-level threads are managed by a library; kernel threads are scheduled by the OS (correct)
    • Kernel threads are faster to create
    • User threads use more memory
  75. What is a spinlock?

    • A lock where a thread repeatedly checks until the lock is free (correct)
    • A lock on the disk spindle
    • A lock that sleeps immediately
    • A deadlock detector
  76. What is the purpose of RAID 1?

    • Mirroring data across disks for redundancy (correct)
    • Compressing data
    • Encrypting data
    • Striping data for speed only
  77. Which scheduling algorithm uses multiple queues where processes can move between them?

    • SJF
    • Round Robin only
    • Multilevel feedback queue (correct)
    • FCFS
  78. What does the elevator (SCAN) algorithm schedule?

    • Network packets
    • Memory pages
    • CPU time
    • Disk head movement (correct)
  79. What is a kernel panic?

    • A fatal error the kernel cannot safely recover from (correct)
    • A slow login
    • A user mistake
    • A full disk warning
  80. What is the purpose of the MMU?

    • Monitoring memory usage in Task Manager
    • Managing mouse input
    • Managing multiple users
    • Translating virtual addresses to physical addresses (correct)
  81. What is a context switch's main cost?

    • Disk space
    • Network bandwidth
    • Saving and restoring CPU state and flushing caches or TLB entries (correct)
    • Electricity only