Components of OS Flashcards

1
Q

What is a Kernel?

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What are the primary functions of a Kernel?

A

1) Process Management, 2) Memory Management, 3) Device Management, 4) File System Management, 5) System Calls, 6) Security and Access Control.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What are the types of Kernels?

A

1) Monolithic Kernel, 2) Microkernel, 3) Hybrid Kernel, 4) Exokernel, 5) Nanokernel.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is a Monolithic Kernel?

A

A monolithic kernel runs all OS services (e.g., device drivers, file systems) in kernel space. Examples: Linux, Unix.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is a Microkernel?

A

A microkernel runs minimal services (e.g., IPC, scheduling) in kernel space, with other services in user space. Examples: MINIX, QNX.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is a Hybrid Kernel?

A

A hybrid kernel combines features of monolithic and microkernels. Examples: Windows NT, macOS XNU.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is the difference between User Mode and Kernel Mode?

A

User Mode restricts direct hardware access for applications, while Kernel Mode allows privileged access to hardware and critical operations.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is a System Call?

A

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().

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What is Process Management in the Kernel?

A

The kernel handles process creation, termination, scheduling, and context switching to manage CPU time and resources.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What is Memory Management in the Kernel?

A

The kernel allocates/deallocates memory, implements virtual memory (paging/swapping), and ensures memory protection between processes.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What is Virtual Memory?

A

Virtual memory allows the system to use disk space as an extension of RAM, enabling multitasking and preventing out-of-memory errors.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What is a Device Driver?

A

A device driver is kernel code that enables communication between the OS and hardware (e.g., printers, disks).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What is the role of the File System in the Kernel?

A

The kernel manages file creation, deletion, access permissions, and storage on disks (e.g., NTFS, ext4).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What is Inter-Process Communication (IPC)?

A

IPC allows processes to communicate using methods like pipes, shared memory, or message queues. Managed by the kernel.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What is a Context Switch?

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What are the components of an Operating System?

A

1) Kernel, 2) Process Manager, 3) Memory Manager, 4) File System, 5) Device Manager, 6) Security Module, 7) User Interface, 8) Networking.

17
Q

What is the role of the Process Manager?

A

The Process Manager handles process creation, scheduling, termination, and synchronization (e.g., using semaphores or mutexes).

18
Q

What is the role of the Memory Manager?

A

The Memory Manager allocates memory to processes, handles virtual memory, and prevents memory leaks or fragmentation.

19
Q

What is the role of the Device Manager?

A

The Device Manager controls hardware devices via drivers, handles I/O requests, and ensures fair resource allocation.

20
Q

What is the role of the Security Module?

A

The Security Module enforces user authentication, file permissions, encryption, and protection against malware.

21
Q

What is the role of the User Interface (UI)?

A

The UI allows users to interact with the OS, either through a Graphical User Interface (GUI) or Command-Line Interface (CLI).

22
Q

What is Thrashing in Memory Management?

A

Thrashing occurs when the system spends more time swapping pages between RAM and disk than executing processes, leading to performance degradation.

23
Q

What is a Deadlock?

A

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.

24
Q

What is the Banker’s Algorithm?

A

The Banker’s Algorithm is a deadlock avoidance algorithm that ensures safe resource allocation by simulating resource requests.

25
Q

What is the difference between Preemptive and Non-Preemptive Scheduling?

A

Preemptive scheduling allows the OS to interrupt tasks (e.g., Round Robin), while Non-Preemptive tasks run to completion (e.g., FCFS).

26
Q

What is a Zombie Process?

A

A zombie process is a terminated process that remains in the process table until its parent reads its exit status.

27
Q

What is an Orphan Process?

A

An orphan process is a child process whose parent has terminated, and it is adopted by the init process (PID 1).

28
Q

Why is Linux considered a monolithic kernel?

A

Linux runs all OS services (device drivers, file systems) in kernel space for performance, but supports loadable modules for flexibility.

29
Q

What is the role of the init process?

A

The init process (PID 1) is the first process started by the kernel and manages all other processes (e.g., starting/shutting down services).

30
Q

What is a Daemon Process?

A

A daemon is a background process that provides services (e.g., httpd for web servers). It has no controlling terminal.

31
Q

What is the difference between a Process and a Thread?

A

A process has its own memory space, while a thread shares memory with other threads in the same process. Threads are managed by the kernel or user-space libraries.

32
Q

What is the Global Interpreter Lock (GIL) in Python?

A

The GIL is a mutex that allows only one thread to execute Python bytecode at a time, limiting multithreading performance in CPU-bound tasks.

33
Q

What is a Real-Time Operating System (RTOS)?

A

An RTOS guarantees timely task completion. Examples include VxWorks (used in aerospace) and FreeRTOS (embedded systems).

34
Q

What is the role of the Bootloader?

A

The bootloader (e.g., GRUB) loads the kernel into memory during system startup and initializes hardware.

35
Q

What is the /proc file system?

A

The /proc file system is a virtual file system in Linux that provides runtime system information (e.g., processes, hardware) in a hierarchical format.

36
Q

What is Swap Space?

A

Swap space is a disk area used by the kernel to extend virtual memory when RAM is full. It stores inactive pages temporarily.