Question 2s Flashcards
Describe the modular kernel methodology of operating system design, including any benefits of this approach. Name an operating system which implements this design.
The modular approach combines the benefits of both the layered and microkernel design techniques. The kernel needs only to have the capability to perform the required function and how to communicate between modules The kernel can have sections with well-defined, protected interfaces, a desirable property found in layered systems. Benefit- each process operates independently(Linux)
Describe with the aid of a diagram the Linux process state model
- Running – it is the current process in the system or its ready to run waiting to be assigned one of the CPUS 2. Waiting - a process is waiting for an event to occur or for a system resource. can be interrupted by signals and uninterruptible waiting processes 3. Stopped - a process has been stopped, usually by receiving a signal. For instance, a process that is being debugged. 4. Zombie - a process is dead, it has been halted
Briefly explain the role a Process Control block plays in a context switch in an operating system
A context switch is the mechanism to store and restore the state or context of a CPU in Process Control block so that a process execution can be resumed from the same point at a later time. Using this technique, a context switcher enables multiple processes to share a single CPU. Context switching is an essential part of a multitasking operating system features.
PID Process ID
PPID Parent process ID
Explain by what mechanism, and for what reasons, the switch from user mode to kernel mode takes place in an operating system.
The switch is usually caused by one of the following:
Fault (a page or some other exception caused by executing an instruction
Interrupt (a keyboard interrupt or i/o finishing)
Trap (a system call.
Explain the concept of multi-threaded processes, and how they differ from single threaded processes.
Multi-threaded processes allow the execution of multiple parts of a program at the same time. These are lightweight processes available within the process. Single threaded process contain the execution of instructions in a single sequence .
The multi-threaded processes can be implemented at user level or kernel levels.