-
What is an operating system?
- Answer: An operating system is software that manages hardware resources and provides services for computer programs.
-
What is the difference between kernel and user mode?
- Answer: Kernel mode has full access to hardware, while user mode has restricted access for running applications.
-
What are processes and threads?
- Answer: A process is an executing instance of a program, while a thread is the smallest unit of execution within a process.
-
What is multitasking?
- Answer: Multitasking is the ability of an OS to execute multiple processes or threads concurrently.
-
What is a deadlock?
- Answer: A deadlock occurs when two or more processes are blocked, waiting for each other to release resources, causing them to remain stuck indefinitely.
-
What are the different types of scheduling algorithms?
- Answer: Common scheduling algorithms include First-Come, First-Served (FCFS), Round Robin (RR), Shortest Job First (SJF), and Priority Scheduling.
-
What is virtual memory?
- Answer: Virtual memory allows the OS to use disk storage as additional memory, enabling programs to run even if physical RAM is full.
-
What is a page fault?
- Answer: A page fault occurs when a program tries to access data not currently in memory, requiring the OS to load it from disk.
-
What is the difference between a process and a thread?
- Answer: A process is an independent program with its own memory space, while a thread is a unit of execution within a process.
-
What is a semaphore?
- Answer: A semaphore is a synchronization mechanism used to control access to a shared resource by multiple processes.
-
What is a system call?
- Answer: A system call is a request made by a program to the OS to perform an operation that the program cannot do directly.
-
What is a file system?
- Answer: A file system is a way of organizing and storing files on a disk, enabling efficient data access and management.
-
What is a deadlock prevention strategy?
- Answer: Deadlock prevention involves ensuring that at least one of the necessary conditions for a deadlock cannot occur, such as by avoiding circular wait conditions.
-
What is context switching?
- Answer: Context switching is the process of saving the state of a running process and restoring the state of a different process to enable multitasking.
-
What is a race condition?
- Answer: A race condition occurs when multiple processes or threads access shared resources simultaneously, leading to unpredictable results.
-
What is the difference between hard and soft real-time systems?
- Answer: Hard real-time systems require strict deadlines, while soft real-time systems allow some flexibility in meeting deadlines.
-
What are the different types of operating systems?
- Answer: Types include batch OS, time-sharing OS, distributed OS, real-time OS, and network OS.
-
What is a file descriptor?
- Answer: A file descriptor is an integer handle used by the OS to identify and manage open files.
-
What is the difference between a monolithic kernel and a microkernel?
- Answer: A monolithic kernel runs all OS services in kernel space, while a microkernel runs only basic services, with other services running in user space.
-
What is paging in an OS?
- Answer: Paging is a memory management scheme that divides physical memory into fixed-sized blocks called pages, allowing non-contiguous memory allocation.
-
What is a process control block (PCB)?
- Answer: A PCB is a data structure that contains information about a process, such as its state, program counter, and memory pointers.
-
What is swapping in an OS?
- Answer: Swapping is the process of moving data between physical memory and secondary storage to free up memory space for other processes.
-
What is a fork system call?
- Answer: The fork system call creates a new process by duplicating the calling process.
-
What is the difference between a mutex and a semaphore?
- Answer: A mutex is used to provide mutual exclusion, ensuring only one process can access a resource at a time, while a semaphore is a signaling mechanism for managing resource access.
-
What is the role of an interrupt in an operating system?
- Answer: Interrupts allow the OS to immediately handle high-priority tasks, pausing ongoing operations and resuming them after handling the interrupt.
-
What is the difference between a hard link and a symbolic link?
- Answer: A hard link points directly to the data on disk, while a symbolic link is a reference to another file.
-
What is a shell in the context of an operating system?
- Answer: A shell is a command-line interface that allows users to interact with the operating system by typing commands.
-
What is a system process?
- Answer: A system process is a background process that is essential for the operating system's functions, such as managing hardware resources.
-
What is thrashing?
- Answer: Thrashing occurs when the OS spends more time swapping data between memory and disk than executing actual processes, severely degrading system performance.
-
What are threads and how are they different from processes?
- Answer: Threads are smaller units of execution within a process, sharing the same memory space, while processes are independent programs with their own memory.