Operating Systems · Unit 1
Operating System Fundamentals
Exam-focused notes for Operating System Fundamentals (Operating Systems, BIT204): what the TU syllabus asks and how it has actually been tested, with 7 solved past questions from this unit.
Operating System Fundamentals in short
An operating system (OS) is the main software that runs a computer. It manages the hardware and gives programs a safe, simple way to use it. Without an OS, every program would have to control the disk, screen and memory by itself.
What this unit covers
- Definition and purpose of operating systems
- Operating system as extended machine
- Operating system components
- Types of operating systems
- Batch systems
- Time sharing systems
- Real time systems
- Virtual machines and system protection
Operating system components
2082 · 5 marks
Explain about operating system components in brief. [5]
Batch systems
2082 · 5 marks
Explain about batch system and time sharing operating systems. [5]
Virtual machines and system protection
2082 · 5 marks
What is virtual machine? Discuss about system protection. [2+3]
Show solved answerHide answer
Virtual Machine and System Protection
Virtual Machine (2 marks)
A virtual machine (VM) is a software emulation of a physical computer system that provides a virtual environment in which an operating system or application can run as if it were running on dedicated physical hardware.
A virtual machine creates an illusion of a complete hardware system (including CPU, memory, storage, and network interfaces) on top of actual physical hardware. Multiple virtual machines can run simultaneously on a single physical machine, each isolated from the others.
Key characteristics:
- Each VM runs its own operating system (called guest OS)
- The underlying physical machine runs a host OS or hypervisor
- VMs are isolated from each other, providing security and stability
- Examples: VMware, VirtualBox, Hyper-V
+------------------+ +------------------+
| Guest OS 1 | | Guest OS 2 |
+------------------+ +------------------+
| Virtual Machine Monitor (VMM) |
+----------------------------------------+
| Physical Hardware |
+----------------------------------------+
System Protection (3 marks)
System protection refers to mechanisms and policies used by an operating system to control access to resources (CPU, memory, I/O devices, files) and prevent unauthorized or accidental interference between processes and users.
Goals of System Protection:
- Prevent unauthorized access to system resources
- Ensure each process accesses only what it is permitted to
- Detect and prevent errors that could compromise system integrity
Key Concepts in System Protection:
1. Protection Domains
- A protection domain defines a set of resources and the access rights (read, write, execute) a process has over those resources.
- A process operates within a domain and can only access objects permitted in that domain.
- Domains can be associated with users, processes, or procedures.
2. Access Matrix
- An access matrix is a model for protection where:
- Rows represent domains (users/processes)
- Columns represent objects (files, devices)
- Entries define allowed operations (read, write, execute)
| Domain | File A | File B | Printer |
|---|---|---|---|
| D1 | Read | Read/Write | -- |
| D2 | -- | Read | Write |
3. Dual Mode Operation
- Hardware support for protection through user mode and kernel mode
- Privileged instructions can only execute in kernel mode
- Prevents user processes from directly accessing hardware
4. Memory Protection
- Ensures a process cannot access memory belonging to another process or the OS
- Implemented using base and limit registers or paging/segmentation
5. CPU Protection
- Timer interrupts prevent a process from monopolizing the CPU
- The OS regains control after a set time interval
Summary:
System protection ensures controlled access, isolation, and integrity of resources, making the system reliable and secure for multiple users and processes.
Types of operating systems
2079 · 10 marks
What are the different types of operating system? Differentiate between Real time and Batch OS.[10]
Show solved answerHide answer
Types of Operating Systems and Difference Between Real-Time and Batch OS
Types of Operating Systems
An Operating System (OS) is system software that manages hardware and software resources and provides services to computer programs. Operating systems are classified into the following types:
1. Batch Operating System
- Jobs with similar requirements are grouped (batched) together and executed without user interaction.
- A job scheduler picks jobs from the batch and submits them to the CPU one by one.
- Example: Early IBM mainframe systems, payroll processing.
2. Time-Sharing (Multitasking) Operating System
- CPU time is shared among multiple users/processes simultaneously.
- Each process gets a small time slice (quantum) in a round-robin fashion.
- Provides fast response time and interactive use.
- Example: UNIX, Linux, Windows.
3. Real-Time Operating System (RTOS)
- Designed to process data and respond within a strict, guaranteed time constraint (deadline).
- Used in time-critical applications.
- Example: Air traffic control, medical devices, missile guidance systems, VxWorks.
4. Distributed Operating System
- Manages a group of independent computers and makes them appear as a single system to the user.
- Resources (CPU, memory, storage) are distributed across multiple machines.
- Example: LOCUS, Amoeba.
5. Network Operating System
- Provides features to manage data, users, groups, security, and applications over a network.
- Each machine has its own local OS but can share resources over the network.
- Example: Windows Server, Novell NetWare.
6. Multiprocessor Operating System
- Supports systems with more than one CPU sharing the same memory and I/O devices.
- Increases throughput and reliability.
- Example: Symmetric Multiprocessing (SMP) systems.
7. Embedded Operating System
- Designed to operate on small machines (embedded systems) with limited resources.
- Highly specialized and resource-efficient.
- Example: Android (mobile), FreeRTOS, Windows CE.
8. Mobile Operating System
- Designed specifically for smartphones and tablets.
- Manages mobile hardware such as touchscreen, GPS, camera.
- Example: Android, iOS.
Difference Between Real-Time OS and Batch OS
| Basis | Real-Time OS (RTOS) | Batch OS |
|---|---|---|
| Definition | An OS that processes tasks and produces results within a strict time deadline. | An OS that collects jobs into batches and processes them sequentially without user interaction. |
| Response Time | Extremely fast and guaranteed (microseconds to milliseconds). | Response time is slow and not guaranteed; depends on queue length. |
| User Interaction | Minimal or no user interaction during execution; but system reacts to real-world events. | No user interaction once the batch is submitted. |
| Deadline | Strict deadlines must be met (missing a deadline can cause system failure). | No concept of strict deadlines; jobs are processed as resources become available. |
| Priority | Tasks are assigned priorities; high-priority tasks preempt lower ones. | Jobs are processed in the order they are batched (FCFS or similar). |
| Scheduling | Priority-based, preemptive scheduling is used. | Non-preemptive, sequential scheduling is used. |
| Types | Hard RTOS (strict deadlines) and Soft RTOS (flexible deadlines). | Simple batch and multiprogrammed batch. |
| CPU Utilization | CPU utilization may not be maximum; correctness and timing are more important. | Aims for maximum CPU utilization. |
| Error Handling | Must handle errors immediately and reliably. | Errors are reported after job completion; job may be skipped. |
| Applications | Medical devices, missile systems, air traffic control, robotics. | Payroll processing, bank statements, weather forecasting data processing. |
| Complexity | More complex due to timing constraints and event-driven nature. | Relatively simpler to design and implement. |
| Example Systems | VxWorks, FreeRTOS, QNX. | Early IBM OS/360, simple mainframe batch systems. |
Summary
Operating systems are classified based on how they manage processes, respond to users, and handle time constraints. Batch OS focuses on throughput and sequential job processing with no real-time constraints, while Real-Time OS focuses on correctness within strict time limits, making it essential for safety-critical and time-sensitive applications.
2078 · 5 marks
What is an operating system? Differentiate between time sharing and real time operating system. [5]
Definition and purpose of operating systems
2079 · 5 marks
What is an OS? Explain 3-state model of process with neat and clean diagram. [5]
Time sharing systems
0 · 5 marks
What does time sharing means in multiprogramming? Explain any three types of operating system structure. [5]
Make Unit 1 stick
Practice BIT204 with flashcards & quizzes