Unlock hundreds more features
Save your Quiz to the Dashboard
View and Export Results
Use AI to Create Quizzes and Analyse Results

Sign inSign in with Facebook
Sign inSign in with Google

Take the Operating Systems Fundamentals Quiz

Sharpen Your Understanding of OS Fundamentals

Difficulty: Moderate
Questions: 20
Learning OutcomesStudy Material
Colorful paper art displaying various operating systems symbols for a fundamentals quiz

Discover your readiness for real-world operating systems challenges with this OS fundamentals quiz filled with scenario-based questions. Perfect for students, developers, and IT professionals aiming to strengthen their core OS knowledge. You'll receive instant scoring and detailed explanations to reinforce learning. Explore the Operating Systems Knowledge Test or try the Operating Systems Knowledge Assessment for additional practice. All questions are fully editable in our quizzes editor to suit your study goals.

What is a process in an operating system?
A static file stored on disk
A network communication protocol
A program in execution
A hardware interrupt handler
A process is defined as a program in execution that includes the program counter, registers, and variables. It represents the dynamic behavior of executing code and associated resources. This distinguishes it from static files or hardware protocols.
What is the primary role of the CPU scheduler?
Handling device driver requests
Allocating memory blocks to processes
Managing file system metadata
Deciding the order in which processes access the CPU
The CPU scheduler determines which ready process in the queue will next use the CPU. It aims to optimize CPU utilization and system responsiveness. Other tasks like memory allocation and I/O handling are managed by different subsystems.
Which memory management technique divides memory into fixed-size frames and pages?
Paging
Swapping
Partitioning
Segmentation
Paging divides logical memory into pages and physical memory into frames of equal size, eliminating external fragmentation. Segmentation uses variable-sized segments and can lead to external fragmentation. Swapping and partitioning are different memory management methods.
What is the purpose of a semaphore in operating systems?
Formatting storage devices
Controlling access to shared resources
Managing virtual memory pages
Allocating CPU time slices
A semaphore is a synchronization primitive used to control concurrent access to shared resources by multiple processes or threads. It provides wait and signal operations to prevent race conditions. Other options relate to different OS functions.
What is the main purpose of a file system?
Organizing and managing how data is stored and retrieved
Allocating memory to running programs
Scheduling processes on the CPU
Encrypting network communications
A file system provides the structure and methods for storing, naming, and retrieving files on storage media. It handles metadata, directories, and allocation methods. CPU scheduling and memory allocation are handled by different OS subsystems.
In round-robin CPU scheduling, what happens when a process's time quantum expires?
It is moved to the waiting state
It continues running until it blocks
It is terminated immediately
It is preempted and placed at the end of the ready queue
Round-robin scheduling uses a fixed time quantum; when a process exhausts its quantum, the scheduler preempts it and places it at the back of the ready queue. This ensures fairness and responsiveness. Processes only move to waiting when they perform I/O or block for other reasons.
Which scheduling algorithm adjusts process priorities dynamically based on past CPU usage?
First-come, first-served
Fixed-priority scheduling
Shortest job first
Multilevel feedback queue scheduling
The multilevel feedback queue scheduling algorithm changes process priorities based on observed CPU bursts and behavior. It promotes I/O-bound processes and demotes CPU-bound ones to balance responsiveness and throughput. Other algorithms do not adjust priorities dynamically.
Which page replacement algorithm replaces the page that has not been used for the longest period of time?
First-In, First-Out (FIFO)
Optimal
Least Recently Used (LRU)
Most Recently Used (MRU)
LRU tracks page references and evicts the page that has gone the longest without being accessed, approximating the optimal algorithm. FIFO simply removes the oldest loaded page regardless of usage. MRU and Optimal follow different criteria.
Which type of fragmentation is minimized by segmentation?
Network fragmentation
File fragmentation
Internal fragmentation
External fragmentation
Segmentation allocates memory in variable-sized segments that match logical divisions of a program, thus reducing wasted space inside segments (internal fragmentation). It can still suffer from external fragmentation between segments. File and network fragmentation are unrelated.
Which file allocation method uses pointers in each block to link to the next block of the file?
Contiguous allocation
Indexed allocation
Extent-based allocation
Linked allocation
Linked allocation stores file blocks scattered on disk, with each block containing a pointer to the next block, forming a linked list. Contiguous requires sequential blocks, indexed uses a block of pointers, and extents allocate variable-length runs.
What is a key advantage of journaling file systems?
Faster recovery and consistency after a crash due to metadata logging
Complete elimination of fragmentation
Automatic encryption of file contents
Unlimited file size support
Journaling file systems write metadata changes to a journal before applying them, enabling quick crash recovery and consistent state. They do not inherently encrypt data, eliminate fragmentation entirely, or guarantee unlimited file sizes.
Which of the following is NOT one of the Coffman conditions necessary for deadlock?
Mutual exclusion
Hold and wait
No preemption
Concurrency
The four Coffman conditions for deadlock are mutual exclusion, hold and wait, no preemption, and circular wait. Concurrency is a general property of systems and not listed among those necessary conditions.
What is a race condition in concurrent programming?
A file system corruption scenario
A situation where the program outcome depends on unpredictable scheduling of threads
A buffer overflow vulnerability
A state where all processes are blocked
A race condition occurs when multiple threads or processes access shared data without proper synchronization, and the final result depends on the interleaving of operations. Deadlock, buffer overflows, and file corruption are different issues.
Which security mechanism enforces the principle of least privilege by specifying access rights to resources?
Password hashing
Public key encryption
Firewall
Access Control List (ACL)
An access control list specifies which users or processes have what permissions on a given resource, enforcing least privilege. Firewalls filter network traffic, encryption secures data, and hashing protects passwords.
Which I/O method allows devices to transfer data directly to memory without continuous CPU intervention?
Programmed I/O
Polling
Port-mapped I/O
Direct Memory Access (DMA)
DMA enables peripherals to read/write memory independently of the CPU, freeing it for other tasks. Polling and programmed I/O require the CPU to actively manage transfers, and port-mapped I/O refers to an addressing scheme.
In the Banker's algorithm, what defines a safe state?
Available resources exceed the total allocated resources
There exists a sequence of all processes where each can obtain its maximum resource needs with current available resources
No process is currently waiting for any resource
Circular wait condition has been eliminated
A safe state in the Banker's algorithm means the system can allocate resources in some order so that every process can eventually obtain its maximum requested resources and complete. It is about the existence of a safe sequence. Other options describe partial conditions but not the precise definition.
Which paging scheme uses a single global table entry per frame to reduce per-process memory overhead?
Segmented paging
Hashed page table
Hierarchical paging
Inverted page table
An inverted page table maintains one entry per physical frame containing (process, page) pairs, so memory overhead is reduced. Hierarchical paging uses multi-level per-process tables. Segmented paging and hashed page tables follow different structures.
What advantage do B+ trees provide for directory indexing in file systems like NTFS?
Elimination of inodes
O(log n) search time and balanced structure for large directories
Automatic journaling of data blocks
Guaranteed contiguous block allocation
B+ trees maintain a balanced tree structure that yields O(log n) lookup, insertion, and deletion times, beneficial for large directories. They do not enforce contiguous allocation or eliminate inodes and are unrelated to journaling data blocks.
Which security mechanism randomizes memory addresses at load time to mitigate certain exploit techniques?
Address Space Layout Randomization (ASLR)
Data Execution Prevention (DEP)
Stack canaries
Non-executable stack (NX bit)
ASLR randomizes the memory locations of code, stack, heap, and libraries to make return-oriented programming and buffer overflow exploits harder. Stack canaries and NX/DEP are other protection mechanisms but do not randomize addresses.
When is a spinlock preferable to a mutex in multiprocessor systems?
When threads need to sleep while waiting
When contention is high and threads should block
When critical sections are very short and lock hold times are minimal
When preemption must be supported
Spinlocks are efficient for very short critical sections on multiprocessor systems because they avoid the overhead of context switches. If locks are held longer or contention is high, blocking with mutexes is more efficient. Spinlocks do not support sleeping while waiting.
0
{"name":"What is a process in an operating system?", "url":"https://www.quiz-maker.com/QPREVIEW","txt":"What is a process in an operating system?, What is the primary role of the CPU scheduler?, Which memory management technique divides memory into fixed-size frames and pages?","img":"https://www.quiz-maker.com/3012/images/ogquiz.png"}

Learning Outcomes

  1. Identify key roles of process management and scheduling.
  2. Evaluate memory management methods like paging and segmentation.
  3. Analyze file system structures and storage allocation strategies.
  4. Demonstrate concurrency control and synchronization techniques.
  5. Apply security mechanisms to safeguard OS resources.
  6. Master device management and I/O operation principles.

Cheat Sheet

  1. Understand Process Management and Scheduling - Operating systems juggle multiple tasks like a circus performer, using scheduling algorithms such as First-Come, First-Served and Round Robin to distribute CPU time fairly! These methods prevent any program from hogging the processor and keep your system responsive. OpenStax: Fundamental OS Concepts
  2. Explore Memory Management Techniques - Memory can be overwhelming, but paging and segmentation slice it into manageable chunks so programs can quickly load and store data. Dive into how the OS uses tables and pointers to track every byte in RAM and avoid memory chaos. OpenStax: Memory Management
  3. Analyze File System Structures - File systems are like digital libraries where directory trees and allocation methods determine how data is organized and found. Study contiguous, linked, and indexed allocation to understand how files grow, shrink, and stay intact. ArXiv: File System Analysis
  4. Master Concurrency and Synchronization - When multiple threads or processes work together, the OS uses semaphores, mutexes, and monitors to prevent race conditions and data corruption. Learn how critical sections and locks keep your programs running smoothly without stepping on each other's toes! OpenStax: Concurrency Concepts
  5. Implement Security Mechanisms - Operating systems protect your data using user authentication, access control lists, and encryption to keep out unwanted guests. Explore how permissions and secure protocols guard resources from hackers and ensure only the right users get inside. Wikipedia: Operating System Security
  6. Grasp Device Management and I/O Operations - The OS speaks the language of hardware through device drivers, interrupts, and DMA to handle input/output smoothly. Discover how these layers translate your keystrokes and mouse clicks into actions on screen without missing a beat! OpenStax: I/O and Device Management
  7. Learn Virtual Memory Concepts - Virtual memory tricks your system into thinking it has more RAM by swapping pages to disk when needed, balancing speed and space. Understand page tables, swapping, and how to prevent thrashing so your applications run without hiccups. OpenStax: Virtual Memory
  8. Understand Deadlocks and Their Prevention - Deadlocks are like traffic jams in a system where processes wait forever for resources. Study the four Coffman conditions and use resource allocation graphs to spot and break these standstills before they stall your machine. CS Guide: Deadlocks
  9. Explore File System Implementation - Dive deeper into file system guts by learning about inodes, superblocks, and journals that keep data consistent and recoverable after crashes. These core structures act as the blueprint and safety net for all stored files. ArXiv: File System Implementation
  10. Study Operating System Structures - Compare monolithic kernels and microkernel designs to see how modularity, performance, and security trade off in OS architectures. Pick your favorite model and imagine building your own lean, mean operating machine. OpenStax: OS Architectures
Powered by: Quiz Maker