Which of the following is NOT a primary goal of an operating system?
Explanation: Compiling source code is the job of a compiler, not the operating system. The OS manages hardware resources, provides user interfaces, and ensures fair resource allocation among processes.
Question 23 points
True or False: The kernel is the core component of an operating system that manages system resources and provides basic services.
Explanation: This statement is TRUE. The kernel is indeed the core component that manages CPU scheduling, memory management, file systems, and other essential system resources.
Question 35 points
In a multiprogramming system, what is the primary reason for keeping multiple programs in memory simultaneously?
Explanation: Multiprogramming keeps multiple programs in memory to maximize CPU utilization. When one program is waiting for I/O, the CPU can switch to execute another program, reducing idle time.
Question 48 points (2 each)
Fill in the blanks with the appropriate terms:
1. The __________ is responsible for loading the operating system into memory during boot.
2. A __________ occurs when a program needs immediate attention from the CPU.
3. The __________ mode has unrestricted access to all system resources.
4. __________ is a technique where the CPU executes multiple processes concurrently by rapidly switching between them.
Explanation:
1. Bootstrap program/loader initializes the system and loads the OS.
2. Interrupts signal events requiring immediate CPU attention.
3. Kernel/supervisor mode allows full system access.
4. Time-sharing enables concurrent process execution through rapid switching.
Question 510 points
Explain the difference between batch systems and interactive systems. Provide at least two characteristics of each.
Grading Criteria:
- Clear definition of each system type (4 points)
- At least 2 characteristics for each (6 points)
Model Answer:
Batch Systems:
- Jobs are collected and processed in groups (batches) without user interaction
- No direct user interaction during job execution
- Characteristics:
1. High throughput - processes many jobs efficiently
2. Job scheduling is done automatically by the system
3. Suitable for repetitive, similar tasks
Interactive Systems:
- Users interact directly with the system in real-time
- Immediate feedback to user commands
- Characteristics:
1. Low response time - quick feedback to users
2. Supports multiple users simultaneously (time-sharing)
3. Suitable for tasks requiring user input/decisions
Question 65 points
Which type of storage is the fastest but also the most expensive per byte?
Explanation: CPU registers are the fastest storage in the memory hierarchy but also the most expensive per byte. They provide immediate access to data for the CPU but are limited in capacity.
Question 73 points
True or False: In a time-sharing system, each user has the illusion of having the entire computer to themselves.
Explanation: TRUE. Time-sharing systems switch between users so quickly that each user feels they have exclusive access to the system, even though resources are actually being shared.
Question 810 points (2 each)
Match each operating system component with its primary function:
Components:
1. Process Manager
2. Memory Manager
3. File System Manager
4. Device Manager
5. Security Manager
Explanation: Each OS component has specific responsibilities: Process Manager handles process lifecycle, Memory Manager controls RAM allocation, File System manages persistent storage, Device Manager controls hardware I/O, and Security Manager handles access control.
Question 95 points
What is the primary purpose of system calls?
Explanation: System calls provide the interface between user programs and the OS kernel, allowing programs to request services like file operations, process control, and memory management from the operating system.
Question 1015 points
Describe the evolution of operating systems from simple batch systems to modern multi-user, multitasking systems. Include at least three major milestones in this evolution and explain how each improved upon the previous generation.
Grading Criteria:
- Historical accuracy and progression (5 points)
- Description of at least 3 milestones (6 points)
- Explanation of improvements (4 points)
Model Answer:
Evolution of Operating Systems:
1. Simple Batch Systems (1950s):
- First generation of OS that automated job sequencing
- Jobs were collected in batches and processed sequentially
- Improvement: Eliminated manual intervention between jobs, increased efficiency
2. Multiprogrammed Batch Systems (1960s):
- Multiple jobs kept in memory simultaneously
- CPU could switch to another job when one was waiting for I/O
- Improvement: Better CPU utilization, reduced idle time, increased throughput
3. Time-Sharing Systems (1960s-1970s):
- Multiple users could interact with computer simultaneously
- CPU time divided among users with rapid switching
- Improvement: Interactive computing, better response time, multi-user support
4. Personal Computer OS (1980s):
- Designed for single users with user-friendly interfaces
- Introduction of GUIs (Graphical User Interfaces)
- Improvement: Accessibility to non-technical users, better usability
5. Modern Multitasking/Multi-user Systems (1990s-present):
- Advanced scheduling algorithms, virtual memory, networking
- Support for multicore processors and distributed computing
- Improvement: Enhanced performance, security, networking capabilities, and resource management
Question 113 points
True or False: User mode has restricted access to system resources and cannot execute privileged instructions.
Explanation: TRUE. User mode is designed to protect the system by restricting access to critical resources and privileged instructions. Only kernel mode can execute privileged operations.
Question 125 points
Which of the following best describes the concept of spooling?
Explanation: Spooling (Simultaneous Peripheral Operations On-Line) uses buffers to hold data for devices like printers, allowing the CPU to continue processing while I/O operations occur in the background.
Question 1310 points
List and briefly explain four key services provided by an operating system to user programs.
Grading Criteria:
- Listing 4 services (4 points)
- Brief explanation of each (6 points)
Model Answer:
1. Program Execution: The OS loads programs into memory, sets up execution environment, and manages program termination.
2. I/O Operations: Provides standardized interfaces for input/output operations, managing communication between programs and devices.
3. File System Manipulation: Offers services to create, read, write, delete files and directories, managing persistent storage.
4. Communication Services: Enables inter-process communication through shared memory, message passing, or network protocols.
1. The two main types of user interfaces provided by operating systems are __________ and __________.
2. __________ protection prevents one process from interfering with another process's memory space.
Explanation:
1. CLI (Command Line Interface) and GUI (Graphical User Interface) are the two main types of user interfaces.
2. Memory protection is crucial for system stability and security.
Question 155 points
What is the main advantage of using virtual machines?
Explanation: Virtual machines provide complete isolation between different OS environments, allowing multiple operating systems to run on the same physical hardware safely and independently.
Question 163 points
True or False: Cache memory is used to speed up access to frequently used data by storing copies closer to the CPU.
Explanation: TRUE. Cache memory is a smaller, faster memory that stores copies of frequently accessed data from main memory, reducing access time for the CPU.
Question 175 points
Which component is responsible for selecting the next process to run on the CPU?
Explanation: The scheduler selects which process should run next based on the scheduling algorithm. The dispatcher then performs the actual context switch to give control to the selected process.
Question 188 points
Explain the concept of dual-mode operation in operating systems and why it is necessary for system protection.
Grading Criteria:
- Definition of dual-mode (3 points)
- Explanation of user and kernel modes (3 points)
- Importance for protection (2 points)
Model Answer:
Dual-mode operation refers to the OS having two distinct modes of operation:
1. User Mode: Where user applications run with restricted privileges. Cannot access hardware directly or execute privileged instructions.
2. Kernel Mode: Where the OS kernel runs with full privileges. Can execute any instruction and access all hardware resources.
Why it's necessary:
- Protects the OS from errant user programs that could crash the system
- Prevents user programs from accessing other programs' memory
- Ensures critical system resources are managed only by the OS
- Mode bit in hardware tracks current mode and triggers trap on violations
Question 195 points
What is the primary difference between a program and a process?
Explanation: A program is a passive entity stored on disk (executable file), while a process is an active entity - a program in execution with associated resources like memory, CPU state, and open files.
Question 203 points
True or False: Real-time operating systems guarantee that critical tasks will be completed within specified time constraints.
Explanation: TRUE. Real-time operating systems are designed specifically to guarantee that time-critical tasks meet their deadlines. Hard real-time systems provide absolute guarantees, while soft real-time systems provide strong scheduling preferences.