What is an operating system?
- A. A text editor
- B. Software that manages hardware and provides services to programs (correct)
- C. A programming language
- D. A type of hardware
Which of the following is an operating system?
- A. Python
- B. Oracle
- C. Linux (correct)
- D. HTML
What is the kernel?
- A. A text file
- B. A type of virus
- C. A hardware chip
- D. The core component of the operating system (correct)
What is a process?
- A. A program in execution (correct)
- B. A file on disk
- C. A hardware device
- D. A network cable
Which CPU scheduling algorithm is non-preemptive?
- A. Round Robin
- B. Shortest Remaining Time First
- C. First Come First Serve (correct)
- D. Preemptive Priority
Which is the fastest memory in a computer?
- A. RAM
- B. Registers (correct)
- C. Hard disk
- D. SSD
Which is one of the four necessary conditions for deadlock?
- A. Preemption
- B. Starvation
- C. Fragmentation
- D. Mutual exclusion (correct)
How do threads of the same process differ from separate processes?
- A. Threads have separate address spaces
- B. Threads cannot run concurrently
- C. Threads share the process address space (correct)
- D. Threads do not use the CPU
What is virtual memory?
- A. Extra physical RAM chips
- B. A technique that uses disk space to extend usable memory (correct)
- C. A type of cache
- D. A graphics memory
Paging helps eliminate which problem?
- A. Deadlock
- B. Starvation
- C. Internal CPU errors
- D. External fragmentation (correct)
What is a semaphore used for?
- A. Process synchronization (correct)
- B. Disk formatting
- C. Memory allocation
- D. Printing
Round Robin scheduling uses which concept?
- A. Priority number
- B. Shortest job
- C. Time quantum (correct)
- D. Arrival order only
What is a context switch?
- A. Changing the screen resolution
- B. Saving one process state and loading another (correct)
- C. Switching off the CPU
- D. Restarting the OS
A page fault occurs when:
- A. The CPU overheats
- B. A file is deleted
- C. The disk is full
- D. The requested page is not in main memory (correct)
The Banker's algorithm is used for:
- A. Disk scheduling
- B. Memory paging
- C. Deadlock avoidance (correct)
- D. File encryption
What is Belady's anomaly?
- A. Page faults always decrease with more frames
- B. Page faults can increase when more frames are added (e.g. FIFO) (correct)
- C. CPU usage doubles
- D. Disk speed drops
What is thrashing?
- A. Excessive paging that causes very low CPU utilization (correct)
- B. Fast CPU execution
- C. A type of scheduling
- D. A disk format
What is a race condition?
- A. A fast CPU benchmark
- B. A scheduling algorithm
- C. Outcome depends on the timing of concurrent access to shared data (correct)
- D. A type of memory leak
Which page replacement algorithm replaces the page that will not be used for the longest time?
- A. Optimal (OPT) (correct)
- B. FIFO
- C. LRU
- D. Random
What is priority inversion?
- A. Giving all tasks equal priority
- B. Reversing the CPU clock
- C. Killing low-priority tasks
- D. A low-priority task holding a resource needed by a higher-priority task (correct)
Which of these is a mobile operating system?
- A. Android (correct)
- B. Photoshop
- C. Oracle
- D. Chrome browser
Which company develops macOS?
- A. IBM
- B. Google
- C. Microsoft
- D. Apple (correct)
Linux is an example of what kind of operating system?
- A. Mobile-only
- B. Closed-source only
- C. Embedded-only
- D. Open-source (correct)
What is a file system?
- A. The way an OS organizes and stores files on a disk (correct)
- B. A network protocol
- C. A list of programs
- D. A type of RAM
What is a device driver?
- A. A type of CPU
- B. Software that lets the OS communicate with hardware (correct)
- C. A network cable
- D. A person who fixes computers
What does multitasking mean?
- A. Using several monitors
- B. Having many users
- C. Typing quickly
- D. Running more than one program seemingly at the same time (correct)
What is booting?
- A. Shutting down the computer
- B. Installing apps
- C. Formatting a disk
- D. Starting up a computer and loading the operating system (correct)
Which program loads the OS kernel when the computer starts?
- A. Antivirus
- B. Bootloader (correct)
- C. Text editor
- D. Compiler
What is a GUI?
- A. A type of kernel
- B. A graphical user interface with windows and icons (correct)
- C. A storage device
- D. A command-line only interface
What is the command-line interface on Linux usually called?
- A. Desktop
- B. Browser
- C. Shell or terminal (correct)
- D. Explorer
Which of these manages files on Windows?
- A. Notepad
- B. File Explorer (correct)
- C. Paint
- D. Task Manager only
Which tool on Windows shows running programs and CPU usage?
- A. Task Manager (correct)
- B. Disk Cleanup
- C. File Explorer
- D. Control Panel
What is a thread?
- A. A user account
- B. A storage block
- C. A type of cable
- D. The smallest unit of execution within a process (correct)
What is the main job of memory management in an OS?
- A. Connecting to Wi-Fi
- B. Printing documents
- C. Cleaning the screen
- D. Allocating and freeing memory for programs (correct)
What is a system call?
- A. A function in a user library
- B. A phone call to support
- C. A request from a program to the OS kernel for a service (correct)
- D. A hardware interrupt only
What is the difference between a program and a process?
- A. A process is a program in execution (correct)
- B. A process is a file type
- C. They are the same
- D. A program is running; a process is stored on disk
What is a Process Control Block (PCB)?
- A. A file system block
- B. A memory cache
- C. A hardware chip
- D. A data structure the OS keeps for each process (correct)
Which are typical process states?
- A. Start, stop, pause only
- B. Active, deleted
- C. New, ready, running, waiting, terminated (correct)
- D. Open, closed, saved
What does the CPU scheduler do?
- A. Chooses which ready process runs next on the CPU (correct)
- B. Manages disk space
- C. Updates the OS
- D. Schedules meetings
What is First-Come, First-Served (FCFS) scheduling?
- A. Processes run in the order they arrive (correct)
- B. The shortest job runs first
- C. Processes take turns with time slices
- D. The highest priority runs first
What is Shortest Job First (SJF) scheduling known for?
- A. Being fair to long jobs
- B. Minimum average waiting time when burst times are known (correct)
- C. Using time slices
- D. Never causing starvation
What is starvation in scheduling?
- A. The CPU overheats
- B. A process waits indefinitely because others are always chosen first (correct)
- C. A process uses too much memory
- D. A process ends early
What technique prevents starvation in priority scheduling?
- A. Using FCFS only
- B. Lowering all priorities
- C. Aging, which raises the priority of waiting processes (correct)
- D. Killing old processes
What is the difference between preemptive and non-preemptive scheduling?
- A. They are identical
- B. Non-preemptive is always faster
- C. Preemptive can interrupt a running process; non-preemptive cannot (correct)
- D. Preemptive never switches
What is a time quantum?
- A. The fixed time slice each process gets in Round Robin (correct)
- B. The disk access time
- C. The boot time
- D. The total runtime of a process
What is a mutex?
- A. A file permission
- B. A type of process
- C. A lock that lets only one thread enter a critical section at a time (correct)
- D. A memory block
What is a critical section?
- A. The kernel's main loop
- B. An error handler
- C. The boot sector
- D. Code that accesses shared resources and must not run concurrently (correct)
What is internal fragmentation?
- A. A full hard drive
- B. A damaged disk
- C. Wasted space inside an allocated memory block (correct)
- D. Free memory split into small gaps between blocks
What is external fragmentation?
- A. Free memory split into small non-contiguous pieces (correct)
- B. A broken file
- C. Memory used by the kernel
- D. Wasted space inside a block
What does a page table do?
- A. Maps virtual page numbers to physical frame numbers (correct)
- B. Stores passwords
- C. Lists files on disk
- D. Schedules processes
What is the TLB?
- A. A scheduling queue
- B. A type of disk
- C. A cache of recent page table translations (correct)
- D. A file system table
What is swapping?
- A. Moving processes or pages between RAM and disk (correct)
- B. Changing the CPU
- C. Switching users
- D. Exchanging two files
Which page replacement algorithm removes the page used least recently?
- A. FIFO
- B. Optimal
- C. LRU (correct)
- D. Random
What is a zombie process in Unix?
- A. A process that has finished but whose parent has not collected its exit status (correct)
- B. A frozen process
- C. A process using too much CPU
- D. A virus
What does the fork() system call do in Unix?
- A. Splits a file
- B. Creates a new child process that is a copy of the parent (correct)
- C. Opens a network connection
- D. Deletes a process
What is an interrupt?
- A. A program crash
- B. A signal that makes the CPU pause and handle an event (correct)
- C. A user logout
- D. A disk error
What is DMA (direct memory access)?
- A. A type of RAM
- B. A memory leak
- C. Letting devices transfer data to memory without the CPU copying each byte (correct)
- D. A scheduling algorithm
What is kernel mode?
- A. A mode for user apps
- B. A mode for running games
- C. Safe mode only
- D. A privileged CPU mode where the OS can access all hardware (correct)
What is a monolithic kernel?
- A. A kernel with only one function
- B. A kernel where most OS services run in kernel space together (correct)
- C. A kernel written in one file
- D. A microkernel
What is a microkernel?
- A. A very small computer
- B. A kernel for phones only
- C. A minimal kernel that runs most services in user space (correct)
- D. A faulty kernel
Which file permission notation means read, write and execute for the owner only on Linux?
- A. 644
- B. 777
- C. 755
- D. 700 (correct)
What does the Linux command chmod do?
- A. Changes file permissions (correct)
- B. Changes directory
- C. Changes owner only
- D. Changes the shell
What are the four Coffman conditions for deadlock?
- A. Mutual exclusion, hold and wait, no preemption, circular wait (correct)
- B. Paging, swapping, thrashing, caching
- C. Starvation, aging, priority, fairness
- D. Read, write, execute, delete
What is deadlock avoidance?
- A. Granting resources only if the system stays in a safe state (correct)
- B. Restarting the OS
- C. Killing all processes
- D. Ignoring deadlocks
What is a safe state?
- A. A state after a reboot
- B. A state where there is an order in which all processes can finish (correct)
- C. A state with no running processes
- D. A state with free memory only
What is the difference between a counting semaphore and a binary semaphore?
- A. They are identical
- B. A counting semaphore can take any non-negative value; a binary one only 0 or 1 (correct)
- C. A binary semaphore counts processes
- D. A counting semaphore is a mutex
What is the producer-consumer problem?
- A. Allocating CPUs
- B. Scheduling printers
- C. Coordinating processes that share a fixed-size buffer (correct)
- D. Selling software
What is the dining philosophers problem used to illustrate?
- A. Deadlock and resource sharing in concurrency (correct)
- B. Network routing
- C. Memory allocation
- D. File systems
What is demand paging?
- A. Paging on user request
- B. Loading the whole program at start
- C. Loading a page into memory only when it is first accessed (correct)
- D. Deleting unused pages
What is the working set of a process?
- A. Its threads
- B. All pages on disk
- C. The files it opened
- D. The set of pages it has used recently (correct)
What is copy-on-write?
- A. Backing up memory
- B. Sharing memory pages until one process writes, then copying them (correct)
- C. Copying files on every write
- D. Writing to two disks
What is an inode in Unix file systems?
- A. A file name
- B. A structure storing a file's metadata and block locations (correct)
- C. A network node
- D. A directory only
What is a hard link?
- A. A shortcut to a path
- B. A broken file
- C. A network link
- D. Another directory entry pointing to the same inode (correct)
What is the difference between user-level and kernel-level threads?
- A. They are identical
- B. User-level threads are managed by a library; kernel threads are scheduled by the OS (correct)
- C. Kernel threads are faster to create
- D. User threads use more memory
What is a spinlock?
- A. A lock where a thread repeatedly checks until the lock is free (correct)
- B. A lock on the disk spindle
- C. A lock that sleeps immediately
- D. A deadlock detector
What is the purpose of RAID 1?
- A. Mirroring data across disks for redundancy (correct)
- B. Compressing data
- C. Encrypting data
- D. Striping data for speed only
Which scheduling algorithm uses multiple queues where processes can move between them?
- A. SJF
- B. Round Robin only
- C. Multilevel feedback queue (correct)
- D. FCFS
What does the elevator (SCAN) algorithm schedule?
- A. Network packets
- B. Memory pages
- C. CPU time
- D. Disk head movement (correct)
What is a kernel panic?
- A. A fatal error the kernel cannot safely recover from (correct)
- B. A slow login
- C. A user mistake
- D. A full disk warning
What is the purpose of the MMU?
- A. Monitoring memory usage in Task Manager
- B. Managing mouse input
- C. Managing multiple users
- D. Translating virtual addresses to physical addresses (correct)
What is a context switch's main cost?
- A. Disk space
- B. Network bandwidth
- C. Saving and restoring CPU state and flushing caches or TLB entries (correct)
- D. Electricity only