- 2073 Magh · 5 marks
OS as virtual machine; functions
Short answer
An OS is termed a virtual machine because it hides hardware complexity and presents abstractions like files, processes, and virtual memory. Its functions include process management, memory management, file management, I/O device management, protection and security, user interface, error handling, and resource accounting.
Why is an operating system termed a virtual machine? Briefly mention the functions of an operating system.
OS as a virtual (extended) machine
The raw hardware is hard to program: to read a disk block, a programmer must know the controller registers, command codes, motor start, seek, error codes and interrupts. The OS hides this complexity and presents a simpler, cleaner, imaginary machine (a virtual machine or extended machine) with abstractions such as files, processes, address spaces and sockets. A programmer just calls read(fd, buf, n) and does not care about the disk details. Thus the OS makes the real machine appear to be a more powerful machine that is easier to use. Moreover, each process believes it has its own CPU and memory (virtual CPU, virtual memory), although they are shared.
User program
| read(), write(), fork()
+----v------------------+
| Virtual machine | files, processes,
| (OS abstractions) | address spaces
+----+------------------+
| device registers, interrupts
+----v------------------+
| Real hardware |
+-----------------------+
Functions of an operating system
- Process management: creation, scheduling, synchronization, communication.
- Memory management: allocation, protection, virtual memory.
- File management: files, directories, access control.
- I/O device management: drivers, buffering, spooling.
- Protection and security, user interface (shell/GUI), error handling and resource accounting.
✓ Answer checked by Claude Opus 5.5 (high effort)
Related questions
- OS abstraction, extended machine, system call · Operating System, chapter 1
- Virtual machine structure and benefits · Operating System, chapter 1 · asked 2×
- OS as resource manager and extended machine · Operating System, chapter 1
- What is an OS; its functions · Operating System, chapter 1 · asked 2×
- Functions of OS and microkernel · Operating System, chapter 1
- File system vs virtual memory; contiguous allocation · Operating System, chapter 5
- Features of a typical operating system · Microprocessor, chapter 6 · asked 3×
- Operating system layers · Distributed System, chapter 3
- Digital switching system and its functions · Telecommunications, chapter 4
- Real-time system and real-time OS components · Software Engineering, chapter 4