Final Exam Flashcards
(17 cards)
What are the main CPU scheduling algorithms?
FCFS, SJF, SRTF, Priority, Round Robin, Multilevel Queue
What is the difference between preemptive and non-preemptive scheduling?
Preemptive can interrupt a running process, non-preemptive cannot
What is context switching?
The process of storing and restoring the state (context) of a CPU so that multiple processes can share a single CPU
What are the four necessary conditions for a deadlock?
Mutual exclusion, hold and wait, no preemption, circular wait
Name strategies for handling deadlocks.
Prevention, avoidance, detection and recovery
What is a safe state in deadlock avoidance?
A state where the system can allocate resources in some order and still avoid deadlock
What is paging?
Dividing memory into fixed-size pages to manage memory efficiently
What is the difference between internal and external fragmentation?
Internal: wasted space within allocated memory. External: small holes between allocated memory blocks
What is a page table?
A data structure used to map virtual addresses to physical addresses
What is demand paging?
Loading pages into memory only when they are needed
What is the difference between a page fault and a segmentation fault?
Page fault: valid page not in memory; segmentation fault: accessing invalid memory
Name common page replacement algorithms.
FIFO, LRU, Optimal, Clock
Which page replacement algorithm has the lowest page fault rate?
Optimal (but it requires future knowledge)
What are the main components of a file system?
Files, directories, file control blocks (FCB), inodes
What is the difference between contiguous and linked allocation?
Contiguous: blocks are stored together; Linked: blocks contain a pointer to the next block
What is the goal of a distributed system?
To make a network of computers appear as a single coherent system
What is RPC (Remote Procedure Call)?
A protocol that allows a program to execute a procedure on another address space