Components of OS Flashcards
What is a Kernel?
The kernel is the core component of an operating system. It acts as a bridge between hardware and software, managing resources like CPU, memory, and devices.
What are the primary functions of a Kernel?
1) Process Management, 2) Memory Management, 3) Device Management, 4) File System Management, 5) System Calls, 6) Security and Access Control.
What are the types of Kernels?
1) Monolithic Kernel, 2) Microkernel, 3) Hybrid Kernel, 4) Exokernel, 5) Nanokernel.
What is a Monolithic Kernel?
A monolithic kernel runs all OS services (e.g., device drivers, file systems) in kernel space. Examples: Linux, Unix.
What is a Microkernel?
A microkernel runs minimal services (e.g., IPC, scheduling) in kernel space, with other services in user space. Examples: MINIX, QNX.
What is a Hybrid Kernel?
A hybrid kernel combines features of monolithic and microkernels. Examples: Windows NT, macOS XNU.
What is the difference between User Mode and Kernel Mode?
User Mode restricts direct hardware access for applications, while Kernel Mode allows privileged access to hardware and critical operations.
What is a System Call?
A system call is a request by a user program to the kernel for services like file I/O or process creation. Example: open()
, read()
, fork()
.
What is Process Management in the Kernel?
The kernel handles process creation, termination, scheduling, and context switching to manage CPU time and resources.
What is Memory Management in the Kernel?
The kernel allocates/deallocates memory, implements virtual memory (paging/swapping), and ensures memory protection between processes.
What is Virtual Memory?
Virtual memory allows the system to use disk space as an extension of RAM, enabling multitasking and preventing out-of-memory errors.
What is a Device Driver?
A device driver is kernel code that enables communication between the OS and hardware (e.g., printers, disks).
What is the role of the File System in the Kernel?
The kernel manages file creation, deletion, access permissions, and storage on disks (e.g., NTFS, ext4).
What is Inter-Process Communication (IPC)?
IPC allows processes to communicate using methods like pipes, shared memory, or message queues. Managed by the kernel.
What is a Context Switch?
A context switch is the process of saving the state of a running process and loading the state of another process. Managed by the kernel scheduler.
What are the components of an Operating System?
1) Kernel, 2) Process Manager, 3) Memory Manager, 4) File System, 5) Device Manager, 6) Security Module, 7) User Interface, 8) Networking.
What is the role of the Process Manager?
The Process Manager handles process creation, scheduling, termination, and synchronization (e.g., using semaphores or mutexes).
What is the role of the Memory Manager?
The Memory Manager allocates memory to processes, handles virtual memory, and prevents memory leaks or fragmentation.
What is the role of the Device Manager?
The Device Manager controls hardware devices via drivers, handles I/O requests, and ensures fair resource allocation.
What is the role of the Security Module?
The Security Module enforces user authentication, file permissions, encryption, and protection against malware.
What is the role of the User Interface (UI)?
The UI allows users to interact with the OS, either through a Graphical User Interface (GUI) or Command-Line Interface (CLI).
What is Thrashing in Memory Management?
Thrashing occurs when the system spends more time swapping pages between RAM and disk than executing processes, leading to performance degradation.
What is a Deadlock?
A deadlock occurs when two or more processes are blocked, waiting for resources held by each other. The four conditions are Mutual Exclusion, Hold and Wait, No Preemption, and Circular Wait.
What is the Banker’s Algorithm?
The Banker’s Algorithm is a deadlock avoidance algorithm that ensures safe resource allocation by simulating resource requests.