Skip to main content

System call; monolithic and VM architecture

Short answer

A system call is the interface for user programs to request kernel services via a trap instruction. Monolithic architecture runs the entire OS in kernel mode as a single binary with direct procedure calls. Virtual machine architecture uses a hypervisor to create VMs running guest OSs; system calls trap to guest OS, privileged instructions trap to hypervisor.

What is a system call? Explain in brief the following architectures of operating system: i) Monolithic architecture ii) Virtual machine.

A system call is the programming interface through which a user program requests a service from the operating system kernel (for example, to open a file or create a process). It switches the CPU from user mode to kernel mode using a TRAP instruction.

i) Monolithic architecture

The entire OS is a single large program running in kernel mode. All components (process, memory, file system, device drivers) are compiled into one binary and call each other directly. Only a minimal structure exists: a main procedure that handles the system call, a set of service procedures that carry it out, and utility procedures shared by the services.

 User programs
 ------------- system call (trap)
 +------------------------+
 | main routine           |
 | service procedures     |
 | utility procedures     |
 +------------------------+
 | Hardware               |

It is fast (no layer overhead) but difficult to maintain, and a bug anywhere can crash the system. Examples: original UNIX, MS-DOS.

ii) Virtual machine architecture

A virtual machine monitor (hypervisor) runs on the bare hardware and creates several exact copies of the hardware (virtual machines). Each VM can run its own guest OS. A program's system call traps to the guest OS in its own VM; when the guest OS executes privileged instructions (such as I/O), these trap to the monitor, which emulates them. The design gives full isolation between VMs and allows several different OSs on one computer (examples: IBM VM/370, VMware, VirtualBox).

✓ Answer checked by Claude Opus 5.5 (high effort)

All Operating System chapter 1 questions →