Podcast
Questions and Answers
Which of the following accurately describes the role of an operating system (OS)?
Which of the following accurately describes the role of an operating system (OS)?
- A type of hardware component that speeds up processing.
- System software that manages computer hardware and software resources. (correct)
- A programming language used to develop applications.
- A tool used exclusively for network configuration.
An operating system's ability to execute multiple programs seemingly simultaneously on a single processor by rapidly switching between them is known as:
An operating system's ability to execute multiple programs seemingly simultaneously on a single processor by rapidly switching between them is known as:
- Real-Time Processing.
- Multiprogramming.
- Multitasking. (correct)
- Multiprocessing.
Which type of operating system is designed to handle multiple active programs in memory at the same time, keeping the CPU busy by quickly switching between them?
Which type of operating system is designed to handle multiple active programs in memory at the same time, keeping the CPU busy by quickly switching between them?
- Multitasking OS.
- Multiprogramming OS. (correct)
- Real-Time OS.
- Batch OS.
An operating system that allows multiple CPUs to execute programs concurrently is referred to as a:
An operating system that allows multiple CPUs to execute programs concurrently is referred to as a:
Which of the following operating systems is designed to provide interactive use by multiple users who share CPU time and system resources?
Which of the following operating systems is designed to provide interactive use by multiple users who share CPU time and system resources?
In what type of operating system is it critical for the system to respond to inputs within a defined strict time limit?
In what type of operating system is it critical for the system to respond to inputs within a defined strict time limit?
Which type of OS processes jobs in groups without user interaction, making it suitable for repetitive tasks?
Which type of OS processes jobs in groups without user interaction, making it suitable for repetitive tasks?
Which function of an operating system is responsible for allocating resources like CPU time, memory space, and devices?
Which function of an operating system is responsible for allocating resources like CPU time, memory space, and devices?
Which of the following functions of an OS specifically involves directing system operations?
Which of the following functions of an OS specifically involves directing system operations?
What aspect of an operating system deals with the loading, running, and termination of processes?
What aspect of an operating system deals with the loading, running, and termination of processes?
What is the primary function of I/O Operations within an operating system?
What is the primary function of I/O Operations within an operating system?
What function of the operating system allows users to read, write, delete, and organize files on a storage device?
What function of the operating system allows users to read, write, delete, and organize files on a storage device?
Which OS function facilitates process interaction through shared memory or message passing?
Which OS function facilitates process interaction through shared memory or message passing?
Maintaining the consistency of a system's state is the primary goal of which OS function?
Maintaining the consistency of a system's state is the primary goal of which OS function?
Tracking the usage of system resources falls under which operating system function?
Tracking the usage of system resources falls under which operating system function?
An operating system's role in safeguarding users, processes, and data is known as:
An operating system's role in safeguarding users, processes, and data is known as:
Which type of operating system manages multiple computers to behave as a single, unified system?
Which type of operating system manages multiple computers to behave as a single, unified system?
What is the key characteristic of a Concurrent Operating System?
What is the key characteristic of a Concurrent Operating System?
What type of user interface involves interacting with a computer using typed commands?
What type of user interface involves interacting with a computer using typed commands?
Which type of interface relies on menus, icons, and mouse interactions for user input?
Which type of interface relies on menus, icons, and mouse interactions for user input?
What is the primary advantage of using a Command Line Interface (CLI) over a Graphical User Interface (GUI) for experienced users?
What is the primary advantage of using a Command Line Interface (CLI) over a Graphical User Interface (GUI) for experienced users?
What is a key benefit of OS virtualization?
What is a key benefit of OS virtualization?
Which type of hypervisor runs directly on the hardware without an underlying operating system?
Which type of hypervisor runs directly on the hardware without an underlying operating system?
What is a significant disadvantage of OS virtualization?
What is a significant disadvantage of OS virtualization?
Which of the following best describes the term 'resource contention' in the context of OS virtualization?
Which of the following best describes the term 'resource contention' in the context of OS virtualization?
Flashcards
Operating System (OS)
Operating System (OS)
System software that manages computer hardware and software resources.
Multitasking OS
Multitasking OS
An OS that runs multiple programs seemingly simultaneously on a single processor.
Multiprogramming OS
Multiprogramming OS
An OS that keeps multiple active programs in memory, switching between them to keep the CPU busy.
Multiprocessing OS
Multiprocessing OS
Signup and view all the flashcards
Time Sharing OS
Time Sharing OS
Signup and view all the flashcards
Real-Time OS (RTOS)
Real-Time OS (RTOS)
Signup and view all the flashcards
Batch OS
Batch OS
Signup and view all the flashcards
Resource Allocation
Resource Allocation
Signup and view all the flashcards
Control Program
Control Program
Signup and view all the flashcards
Program Execution
Program Execution
Signup and view all the flashcards
I/O Operations
I/O Operations
Signup and view all the flashcards
File System Manipulation
File System Manipulation
Signup and view all the flashcards
Communication
Communication
Signup and view all the flashcards
Error Detection
Error Detection
Signup and view all the flashcards
Accounting
Accounting
Signup and view all the flashcards
Protection
Protection
Signup and view all the flashcards
Distributed OS
Distributed OS
Signup and view all the flashcards
CLI
CLI
Signup and view all the flashcards
GUI
GUI
Signup and view all the flashcards
OS Virtualization
OS Virtualization
Signup and view all the flashcards
Hypervisor
Hypervisor
Signup and view all the flashcards
Type I (Bare Metal)
Type I (Bare Metal)
Signup and view all the flashcards
Type II (Hosted)
Type II (Hosted)
Signup and view all the flashcards
Deadlock
Deadlock
Signup and view all the flashcards
Banker's Algorithm
Banker's Algorithm
Signup and view all the flashcards
Study Notes
- An Operating System (OS) acts as system software, managing computer resources.
- An OS provides an interface between users and hardware.
- An OS operates in kernel or supervisor mode, having full access to system resources
Types of Concurrent OS
-
Concurrent OS manages multiple tasks simultaneously
-
Multitasking OS:
- Runs multiple programs on a single processor.
- Allocates time slices and manages memory and priorities.
- Examples include macOS X, Windows 2000, and Linux.
-
Multiprogramming OS:
- Has multiple active programs in memory at once.
- Keeps the CPU busy by switching between programs.
- Examples : Windows OS and UNIX OS.
-
Multiprocessing OS:
- Runs programs simultaneously using more than one CPU.
- Examples Windows NT, 2000, XP, and Unix.
-
Time Sharing OS:
- Allows multiple users to interactively share CPU time.
- Controls and schedules memory, CPU, and other resources.
- Examples: Multics, Unix
-
Real-Time OS (RTOS):
- Responds to input within a strict time limit.
- Used in mission-critical systems.
- Examples: Microsoft Azure RTOS, robots, and air traffic control.
-
Batch OS:
- Does not allow user interaction during job processing.
- Processes jobs in groups (batches).
- Suitable for repetitive tasks.
- Payroll systems and bank statements are examples.
Functions of an OS
- Resource Allocator: Manages CPU, memory, and devices.
- Control Program: Directs system operations.
- Program Execution: Loads, runs, and ends programs.
- I/O Operations: Manages input/output devices.
- File System Manipulation: Reads, writes, deletes, and organizes files.
- Communication: Facilitates process interaction using shared memory or messages.
- Error Detection: Maintains a consistent system state.
- Accounting: Tracks resource usage.
- Protection: Safeguards users, processes, and data.
Layers of OS
- The diagram depicts a layered OS architecture, starting from the hardware layer up to applications.
- The layers are, from bottom to top: Computer system hardware > Operating system > Utilities > Application Programs> End users
- A programmer interacts directly with the operating system through system calls and utilities.
Classifications of Operating Systems
- Distributed OS (Network OS):
- Manages multiple computers as a single system.
- Uses network connections.
- Shares resources like files and printers.
- Examples: Hadoop, Spark, Kubernetes
- Concurrent OS (Modern OS):
- Manages multiple tasks on a single computer.
- Includes several types of OS.
Command Line Interface(CLI) vs. Graphical User Interface (GUI)
- Command Line Interface (CLI): Interaction is done by typing commands
- Menu Driven Interface (MDI): Interaction is done by navigating through menus
- Graphical User Interface (GUI): interaction is done by using menus, icons, and mouse movements.
- CLI:
- Interface Type: Text-based.
- Ease of Use: Harder for beginners.
- Speed: Faster for experts.
- Resource Usage: Low
- Example: Linux Terminal, cmd
- GUI:
- Interface Type: Graphical (icons, windows).
- Ease of Use: User-friendly.
- Speed: Slower due to visuals.
- Resource Usage: High
- Example: Windows Desktop, macOS
- CLI:
Menu-Driven Interface (MDI)
- A user interface where users interact with the system by navigating through menus.
- Examples:
- ATM screens (e.g., "Withdraw Cash," "Check Balance").
- Old mobile phone UIs (e.g., Nokia menu).
- Command-line programs like Linux installers.
- School grading systems or library apps in CLI with numbered options
OS Virtualization
- Virtualization simulates hardware and software environments.
- OS Virtualization emulates the hardware to run multiple OS instances with full access to the hardware.
Hypervisors / Virtual Machine Monitors (VMM)
- Hypervisors are software that create and manage virtual machines (VMs).
- Type I (Bare Metal):
- Runs directly on hardware.
- Common in servers.
- Examples: Microsoft Hyper-V, Oracle VM Server, and Citrix Hypervisor.
- Type II (Hosted):
- Runs on top of a host OS.
- Common in personal computers.
- Examples: VirtualBox, VMware Workstation, and UTM.
Advantages of OS Virtualization:
- Resource Utilization: Efficient use of CPU, RAM, and storage. Server consolidation, dynamic resource allocation
- Cost Saving: Reduces hardware and power needs.
- Security & Isolation: VMs are separated and can use snapshots for rollback.
- Flexibility: Easy scaling, great for testing and development.
- High Availability: Supports live migration and clustering.
Disadvantages of OS Virtualization:
- Resource Overhead: Performance drop due to the virtualization layer.
- Licensing Costs: Some VM software requires payment.
- Security Risks: Hypervisor vulnerabilities and VM escape.
- Limited for I/O-intensive apps.
- Resource Contention: One VM can negatively affect others (Noisy Neighbor problem).
CPU Scheduling
- Importance & Aims of CPU Scheduling:
- Fairness: Ensures all processes receive a fair share of CPU time.
- Efficiency: Keeps the CPU busy, aiming for close to 100% utilization.
- Response Time: Reduces the time a system takes to respond.
- Turnaround Time: Minimizes the time between submission and completion.
- Throughput: Maximizes the number of jobs completed within a set time.
Types of CPU Scheduling:
- **Preemptive Scheduling:**
- The OS can interrupt a running process to switch to another.
- Ensures better responsiveness and fairness.
- Example Algorithms: Round Robin (RR), Multilevel Queue (MQ), Multilevel Feedback Queue (MFQ).
- **Non-Preemptive Scheduling:**
- Processes voluntarily release the CPU after completion.
- Examples: First Come First Serve (FCFS) / FIFO, Shortest Job First (SJF), Priority Scheduling.
Calculation Keywords:
- Burst time (TB) / CPU utilization / Execution time.
- Turnaround time (TT) - Average turnaround time.
- Waiting time (TW) - Average waiting time.
- Arrival time (TA).
- Exit time (TE).
Multilevel Queue Scheduling (MQ)
- Divides processes into different queues based on priority:
- System Processes (High Priority)
- Interactive Processes
- Student Processes
- Batch Processes (Low Priority)
Multilevel Feedback Queue (MFQ)
- Allows processes to move between queues.
- Processes are classified based on CPU burst time.
- If a process uses too much CPU time, it moves to a lower priority queue.
First Come First Serve (FCFS / FIFO)
- Simplest non-preemptive scheduling method.
- Processes are served in the order they arrive.
- Implemented using a FIFO queue.
- Can result in long average waiting times.
Shortest Job First (SJF)
- Chooses the process with the shortest CPU burst time.
- Optimal for minimizing average waiting time.
- Predicting future burst times is difficult.
- Ties are broken using FCFS.
Priority Scheduling
- Every process is assigned a priority value.
- The CPU is given to the process with the highest priority (lower number = higher priority, e.g. 0 is highest).
- If multiple processes share the same priority, FCFS is used to decide.
- Can be implemented in both preemptive and non-preemptive forms.
- Starvation can occur, where low-priority processes might never get CPU time.
- Aging is a solution that gradually increases the priority of waiting processes to avoid starvation.
Deadlock
- Deadlock occurs when two or more processes are waiting for each other to release resources, but none of them ever do.
- This causes the system to become stuck indefinitely.
Resources and Deadlock
- Processes request and use resources in three steps: Request → Use → Release.
- Types of Resources:
- Preemptable: Can be taken away without causing problems (e.g., memory).
- Non-preemptable: Cannot be taken without causing failure (e.g., printer).
Deadlock Example
- Process A holds a printer and requests a disk, and Process B holds a disk and requests a printer. Both are waiting for each other, resulting in a deadlock.
Deadlock Prevention – Condition by Condition
Condition | Prevention Strategy |
---|---|
Mutual Exclusion | Allow resources to be shared if possible (e.g., read-only files). |
Hold and Wait | Require processes to request all needed resources at once before running. |
No Preemption | if a process requests a resource which is unavailable, preempt all resources which the process currently holds. |
Circular Wait | Impose a global order on different resource types and require each process to request resources in this order |
Banker's Algorithm (Deadlock Avoidance)
- Step 1: Calculate the "Need" matrix. Need = Max - Allocation.
- Step 2: Compare Need ≤ Available to verify the system safe state
- Step 3: Simulate Resource Allocation and check to assume that the process can finish and release resources.
- The "Available" resources are updated as new available = Available + Allocation
Studying That Suits You
Use AI to generate personalized quizzes and flashcards to suit your learning preferences.