Flashcards · Operating Systems · Free
Operating Systems flashcards, generated for you.
Example Operating Systems study cards to learn from right now — then generate a full set from your own notes (plus a practice quiz) and export to Quizlet or Anki. Free, no account needed.
Example Operating Systems flashcards
What is an operating system (OS)?
Software that manages hardware resources and provides services to applications. Acts as intermediary between users/programs and physical hardware (CPU, memory, disk, I/O devices).
What is the difference between preemptive and non-preemptive scheduling?
Preemptive: OS can interrupt a running process and switch to another (higher priority). Non-preemptive: process runs until completion or voluntary yield. Preemptive ensures responsiveness but adds context-switch overhead.
Define context switching and name its cost.
Switching CPU execution from one process to another. Costs: saving/restoring registers and memory state, cache misses (TLB/L1/L2), lost CPU cycles. Higher frequency reduces responsiveness but hurts throughput.
What is thrashing in virtual memory?
Excessive page faults where OS spends more time swapping pages between RAM and disk than executing user code. Occurs when working set exceeds physical memory. Severely degrades performance.
Explain the trade-off between fairness and efficiency in scheduling.
Fairness: equal CPU time to all processes (round-robin). Efficiency: maximize CPU utilization and throughput (FCFS, SJF). Fair scheduling increases context switches (overhead); efficient scheduling may starve low-priority tasks.
What is a critical section and why do locks introduce deadlock risk?
Critical section: code where process accesses shared resource requiring mutual exclusion. Locks ensure only one process enters at a time, but circular wait for multiple locks (A holds lock1, waits lock2; B holds lock2, waits lock1) causes deadlock.
Compare synchronous I/O blocking vs. asynchronous non-blocking I/O.
Blocking: process waits (sleeps) until I/O completes, wasting CPU time but simpler. Non-blocking: process continues; OS notifies via callback/event when I/O done, higher throughput but complex. Trade-off: simplicity vs. resource utilization.
What does copy-on-write (COW) optimize?
Delays copying memory until a write occurs. Parent and child processes share read-only pages initially; only modified pages are copied. Reduces memory usage and fork() latency; costs: page fault overhead on first write, complexity.
Explain the trade-off between page size in virtual memory.
Large pages: fewer TLB misses, lower page table overhead, simpler. Small pages: better granularity, less internal fragmentation, fit working set better. Larger pages reduce miss rate but increase memory waste; smaller pages increase TLB misses.
What is the fundamental trade-off between isolation (protection) and performance in OS design?
Isolation: separate address spaces, privilege levels, context switches prevent interference but add overhead (syscall cost, TLB flushes, privilege transitions). Performance: shared resources, direct memory access are faster but expose security/stability risks. Kernel must balance security enforcement with minimal latency tax.
Make your own Operating Systems study set
Flashcards for related topics
Studying Operating Systems to build with AI? MindloomHQ turns it into real skills — structured courses, agent projects, and certificates.
Explore MindloomHQ →