- What are the key management tasks of an operating system?
- The operating system manages the computer's resources, and each resource has its own management task. The key tasks are memory management, file management, security management, hardware or device management, input / output management and process management. The operating system also does error checking and recovery, and provides a user interface.
- What are the running, ready and blocked process states?
- A process is running when it has been given CPU time. It is ready when it is waiting in the ready queue for a slice of CPU time and could run. It is blocked when it is waiting for an I/O operation or other event.
- What scheduling routines does an operating system use to decide which process runs next?
- A scheduling routine decides which process gets the CPU next. In round robin each process in turn gets a fixed time slice. First come first served runs processes in the order they arrive, shortest job first runs the process with the shortest run time next, and shortest remaining time runs the process with the least time left to run.
- How does the kernel handle an interrupt?
- The kernel is the central component of the operating system, and it acts as the interrupt handler. It receives the signal when an interrupt is generated and checks its priority against the current process. It consults the interrupt dispatch table to find the routine, and saves the state of the interrupted process on the kernel stack. The state is restored once the interrupt is serviced.
- What is virtual memory and how does paging differ from segmentation?
- Virtual memory is an area of secondary storage used to temporarily extend the available memory, and it is used when RAM is running low. In paging, memory is divided into fixed size blocks called pages. In segmentation, the logical address space is broken into varying sized blocks called segments, and a segment map table maps logical addresses to physical addresses.
- Is disk thrashing the same as disk fragmentation?
- No. Disk thrashing is not disk fragmentation. It is frequent swapping of pages between main memory and virtual memory, which leads to a very high rate of hard disk access, so more time is spent swapping than processing data.