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?
Software that manages hardware resources and provides services to applications. Acts as intermediary between users/programs and physical hardware (CPU, memory, disk, I/O).
What is the difference between preemptive and non-preemptive scheduling?
Preemptive: OS can forcibly remove a running process to give CPU to another (context switching). Non-preemptive: process runs until it voluntarily yields control. Preemptive is fairer but has higher overhead.
Define context switching and name one cost.
Switching CPU execution from one process to another by saving/restoring registers and memory state. Costs: CPU cache invalidation, TLB flushes, memory overhead—all waste CPU cycles doing no useful work.
What is thrashing in virtual memory?
Excessive page faults where OS spends most time swapping pages to/from disk instead of executing processes. Occurs when working set exceeds physical memory—system becomes CPU-starved.
Explain the trade-off between process isolation and inter-process communication (IPC).
Isolation (separate address spaces) prevents one process crashing others but requires expensive IPC (pipes, sockets, shared memory). Tight coupling (shared memory) is fast but one fault can cascade. Most OS choose isolation for stability.
What is the difference between a process and a thread?
Process: independent execution unit with own memory space, file descriptors, heap, stack. Thread: lightweight execution unit within a process sharing memory/resources. Threads are faster to create/switch but share memory (race condition risk).
Define mutual exclusion and name one synchronization primitive used to enforce it.
Ensuring only one process/thread accesses a critical section at a time, preventing data corruption. Primitives: mutex (mutual exclusion lock), semaphore, monitor, atomic operations—all prevent concurrent access.
What is deadlock and name one necessary condition.
Circular wait where processes hold resources and block waiting for resources held by others—system halts. Four conditions: mutual exclusion, hold-and-wait, no preemption, circular wait. All must be true; break one to prevent deadlock.
Explain the trade-off between page size in virtual memory.
Small pages: fine granularity, less internal fragmentation, more page table entries (memory overhead). Large pages: coarser granularity, more internal fragmentation, smaller page tables. Interviewers want: larger pages reduce overhead but waste memory.
What is the difference between user mode and kernel mode?
User mode: restricted CPU state, processes cannot execute privileged instructions or access hardware directly. Kernel mode: full CPU access, OS code runs here. Transition via system calls—expensive due to context switch and security checks.
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 →