CS330: Operating Systems

Chapter 1 - Introduction to Operating Systems

Total Points: 100
Questions: 20
Time: 60 minutes
60:00
Question 1 5 points
Which of the following is NOT a primary goal of an operating system?
Question 2 3 points
True or False: The kernel is the core component of an operating system that manages system resources and provides basic services.
Question 3 5 points
In a multiprogramming system, what is the primary reason for keeping multiple programs in memory simultaneously?
Question 4 8 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.
Question 5 10 points
Explain the difference between batch systems and interactive systems. Provide at least two characteristics of each.

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 6 5 points
Which type of storage is the fastest but also the most expensive per byte?
Question 7 3 points
True or False: In a time-sharing system, each user has the illusion of having the entire computer to themselves.
Question 8 10 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
Question 9 5 points
What is the primary purpose of system calls?
Question 10 15 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.

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 11 3 points
True or False: User mode has restricted access to system resources and cannot execute privileged instructions.
Question 12 5 points
Which of the following best describes the concept of spooling?
Question 13 10 points
List and briefly explain four key services provided by an operating system to user programs.

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.

Additional acceptable answers: Error Detection, Resource Allocation, Protection and Security, Accounting

Question 14 6 points (3 each)
Complete the following statements:
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.
Question 15 5 points
What is the main advantage of using virtual machines?
Question 16 3 points
True or False: Cache memory is used to speed up access to frequently used data by storing copies closer to the CPU.
Question 17 5 points
Which component is responsible for selecting the next process to run on the CPU?
Question 18 8 points
Explain the concept of dual-mode operation in operating systems and why it is necessary for system protection.

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 19 5 points
What is the primary difference between a program and a process?
Question 20 3 points
True or False: Real-time operating systems guarantee that critical tasks will be completed within specified time constraints.

Exam Results

Score: 0/100
Percentage: 0%
Questions Correct: 0/20
F