Virtual Machines and Operating Systems: Structures
Virtual Machines
A virtual machine (VM) is software that emulates a computer system, capable of running programs like a physical computer. Initially, VMs were defined as “an efficient, isolated duplicate of a physical machine.” The definition has expanded to include virtual machines without direct correspondence to any real hardware.
Operating Systems
An operating system (OS) is a set of programs that integrate with hardware to facilitate user interaction and resource utilization. Key objectives include:
- Providing a convenient working environment.
- Efficiently using hardware.
- Distributing resources appropriately.
A real operating system must satisfy the following functions:
- Governing the system.
- Allocating resources.
- Managing and controlling program execution.
Monolithic Structure
Early operating systems often featured a monolithic structure, consisting of a single program with interlinked routines. Key features include:
- Final program construction from separately compiled modules linked together.
- Clearly defined link parameters between routines, potentially causing tight coupling.
- Lack of protections and privileges for accessing resource management routines (memory, disk, etc.).
These systems are typically custom-made, resulting in efficient and fast execution, but they lack flexibility for supporting diverse environments or applications.
Hierarchical Structure
As user needs and systems evolved, a more organized approach to operating system software emerged. This involved dividing the system into smaller, well-defined parts organized hierarchically.
This hierarchical structure, or levels, was first seen in systems like THE (Technische Hogeschool, Eindhoven), developed by Dijkstra for educational purposes. Systems like Multics and Unix also fall into this category. This structure can also be visualized as concentric rings.
Client-Server Structure (Microkernel)
The client-server model, also known as a microkernel, is a more recent approach to operating system design. It’s suitable for a wide range of computers, from large to small.
This system is general-purpose, providing services for various applications and performing activities similar to traditional operating systems. The core function (microkernel) is to establish communication between clients and servers. Processes can be both clients and servers. For example, an application program (client) might request a file access or I/O operation from a server. A client process can also act as a server for another client.
This paradigm offers flexibility, as the kernel provides only basic functions (memory, I/O, files, processes), while servers provide most services to users or programmers. These servers must have security and protection mechanisms, which are filtered by the kernel that controls the hardware. There are ongoing efforts to incorporate this paradigm into versions of UNIX.