Skip to main content

Extended machine, kernel, system call

Short answer

The OS as an extended machine hides hardware details by presenting files, processes, and virtual memory. A monolithic kernel runs all services in kernel mode; a microkernel keeps only IPC and scheduling in the kernel, with servers in user space. System calls provide a safe, controlled interface for user programs to invoke kernel services via TRAP.

Explain operating system as an extended machine. Distinguish between kernel and micro-kernel. Explain the purpose of system call.

Operating system as an extended machine

The bare hardware (processor, memory, disk, devices) is difficult to program: the programmer must know controller registers, command codes, and interrupt handling. The OS hides these details and presents a simpler, cleaner abstract machine (the extended machine or virtual machine) with abstractions such as files, processes and address spaces. For example, a program calls read(fd, buf, n) and the OS handles seek, DMA, interrupts and errors. So the OS "extends" the hardware by adding functions that the hardware does not provide, and makes programming easier and more portable.

Kernel vs micro-kernel

BasisKernel (monolithic)Micro-kernel
Services in kernel modeAll: file system, drivers, memory, networkOnly IPC, scheduling, basic memory
SizeLargeVery small
SpeedFast (direct calls)Slower (message passing)
ReliabilityA faulty driver can crash the systemFailure of a server is isolated
ExtensionNeeds kernel rebuildServers added in user space
ExampleLinux, traditional UNIXMach, QNX, MINIX 3

Purpose of system call

A system call is the interface by which user programs request services of the kernel. Its purposes are:

  • to let user programs perform privileged operations (I/O, file access, process creation) safely, since user code cannot execute them directly;
  • to provide a controlled entry into kernel mode (using TRAP), protecting the OS and other users;
  • to give a standard, hardware-independent interface (e.g. fork, open, read, write, exit) for application programs.

System calls fall in groups: process control, file management, device management, information maintenance and communication.

✓ Answer checked by Claude Opus 5.5 (high effort)

All Operating System chapter 1 questions →