Concurrent Operating Systems

Choose a study mode

Play Quiz
Study Flashcards
Spaced Repetition
Chat to Lesson

Podcast

Play an AI-generated podcast conversation about this lesson
Download our mobile app to listen on the go
Get App

Questions and Answers

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:

  • 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?

  • 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:

<p>Multiprocessing OS. (C)</p> Signup and view all the answers

Which of the following operating systems is designed to provide interactive use by multiple users who share CPU time and system resources?

<p>Time-Sharing OS. (B)</p> Signup and view all the answers

In what type of operating system is it critical for the system to respond to inputs within a defined strict time limit?

<p>Real-Time OS (RTOS). (A)</p> Signup and view all the answers

Which type of OS processes jobs in groups without user interaction, making it suitable for repetitive tasks?

<p>Batch OS. (D)</p> Signup and view all the answers

Which function of an operating system is responsible for allocating resources like CPU time, memory space, and devices?

<p>Resource Allocator. (C)</p> Signup and view all the answers

Which of the following functions of an OS specifically involves directing system operations?

<p>Control Program. (B)</p> Signup and view all the answers

What aspect of an operating system deals with the loading, running, and termination of processes?

<p>Program Execution. (C)</p> Signup and view all the answers

What is the primary function of I/O Operations within an operating system?

<p>Managing input and output devices. (C)</p> Signup and view all the answers

What function of the operating system allows users to read, write, delete, and organize files on a storage device?

<p>File System Manipulation. (A)</p> Signup and view all the answers

Which OS function facilitates process interaction through shared memory or message passing?

<p>Communication. (B)</p> Signup and view all the answers

Maintaining the consistency of a system's state is the primary goal of which OS function?

<p>Error Detection. (A)</p> Signup and view all the answers

Tracking the usage of system resources falls under which operating system function?

<p>Accounting. (C)</p> Signup and view all the answers

An operating system's role in safeguarding users, processes, and data is known as:

<p>Protection. (D)</p> Signup and view all the answers

Which type of operating system manages multiple computers to behave as a single, unified system?

<p>Distributed OS. (C)</p> Signup and view all the answers

What is the key characteristic of a Concurrent Operating System?

<p>It manages multiple tasks on a single computer. (D)</p> Signup and view all the answers

What type of user interface involves interacting with a computer using typed commands?

<p>CLI (Command Line Interface). (A)</p> Signup and view all the answers

Which type of interface relies on menus, icons, and mouse interactions for user input?

<p>GUI (Graphical User Interface). (D)</p> Signup and view all the answers

What is the primary advantage of using a Command Line Interface (CLI) over a Graphical User Interface (GUI) for experienced users?

<p>Faster execution. (D)</p> Signup and view all the answers

What is a key benefit of OS virtualization?

<p>Improved resource utilization. (D)</p> Signup and view all the answers

Which type of hypervisor runs directly on the hardware without an underlying operating system?

<p>Type I (Bare Metal). (C)</p> Signup and view all the answers

What is a significant disadvantage of OS virtualization?

<p>Resource overhead. (C)</p> Signup and view all the answers

Which of the following best describes the term 'resource contention' in the context of OS virtualization?

<p>A situation where one virtual machine negatively impacts others due to excessive resource usage. (D)</p> Signup and view all the answers

Signup and view all the answers

Flashcards

Operating System (OS)

System software that manages computer hardware and software resources.

Multitasking OS

An OS that runs multiple programs seemingly simultaneously on a single processor.

Multiprogramming OS

An OS that keeps multiple active programs in memory, switching between them to keep the CPU busy.

Multiprocessing OS

OS where more than one CPU runs programs simultaneously, enabling true parallel processing.

Signup and view all the flashcards

Time Sharing OS

Controls and schedules memory, CPU, and other resources, allowing multiple users to share CPU time interactively.

Signup and view all the flashcards

Real-Time OS (RTOS)

An OS that responds to inputs within a strict, defined time limit, crucial for mission-critical systems.

Signup and view all the flashcards

Batch OS

An OS that processes jobs in groups without user interaction, suitable for repetitive tasks.

Signup and view all the flashcards

Resource Allocation

Allocates CPU, memory, and devices efficiently.

Signup and view all the flashcards

Control Program

Directs and coordinates system operations within the operating system.

Signup and view all the flashcards

Program Execution

Function of loading, running, and properly terminating programs.

Signup and view all the flashcards

I/O Operations

Function of managing input/output devices and their operations.

Signup and view all the flashcards

File System Manipulation

Includes reading, writing, deleting, and organizing files within a file system.

Signup and view all the flashcards

Communication

Enables processes to interact by using shared memory or messages.

Signup and view all the flashcards

Error Detection

Maintaining a consistent system state while detecting and handling errors.

Signup and view all the flashcards

Accounting

Tracking the usage of system resources for monitoring and billing.

Signup and view all the flashcards

Protection

Safeguarding users, processes, and data from unauthorized access and threats.

Signup and view all the flashcards

Distributed OS

Operating system that manages multiple computers as a single, unified system, utilizing network connections to share resources.

Signup and view all the flashcards

CLI

Command Line Interface: Interaction using commands.

Signup and view all the flashcards

GUI

Graphical User Interface: Interaction using menus, icons, and mouse.

Signup and view all the flashcards

OS Virtualization

Simulating hardware/software environments to run multiple OS instances as if they each have full access to the hardware.

Signup and view all the flashcards

Hypervisor

Software that creates and manages virtual machines (VMs).

Signup and view all the flashcards

Type I (Bare Metal)

Runs directly on hardware, common in servers.

Signup and view all the flashcards

Type II (Hosted)

Runs on top of a host OS, common in personal computers.

Signup and view all the flashcards

Deadlock

A situation where two or more processes are blocked indefinitely, waiting for each other to release resources.

Signup and view all the flashcards

Banker's Algorithm

Algorithm that avoids deadlock by simulating resource allocation to find safe sequence.

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
  • 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.

Quiz Team

Related Documents

More Like This

Concurrent Design Method Quiz
6 questions
Semáforos en sistemas concurrentes
42 questions
Use Quizgecko on...
Browser
Browser