1.2.
2 Different Types of OS(Multi-Programming,
Processing, Tasking OS)
1.2.2 Different Types of Operating Systems
(Multi-Programming, Multi-Processing, Multi-Tasking)
Multi-Programming Operating System
Definition
A Multi-Programming Operating System is designed to execute multiple programs
simultaneously by utilizing the CPU more efficiently. It switches between programs when
one program is waiting for I/O operations.
Characteristics
Characteristic Description
CPU Utilization Ensures high CPU usage by running multiple programs.
Job Pooling Maintains a pool of jobs for efficient scheduling.
Concurrency Multiple programs are loaded into memory and executed alternately.
No Interactivity Focuses on background processing rather than user interaction.
Working of Multi-Programming OS
1. Several jobs are loaded into the memory.
2. The OS selects a job and starts execution.
3. If the job waits for I/O, the CPU is allocated to another job.
4. This process repeats, ensuring no CPU time is wasted.
Advantages
1. High CPU Utilization: Keeps the CPU busy with minimal idle time.
2. Efficient Resource Allocation: Shares system resources effectively among jobs.
3. Reduced Waiting Time: Processes more jobs in less time.
Disadvantages
1. Complex Scheduling: Requires efficient algorithms to manage jobs.
2. Lack of User Interactivity: Users cannot interact during job execution.
3. Potential Deadlocks: Multiple jobs competing for resources can lead to deadlocks.
Applications
Batch job processing.
Database servers.
Diagram
Multi-Programming OS Workflow
Start
Load Multiple Jobs
Execute Job 1
Job 1 Waiting for I/O
Execute Job 2
Return to Job 1
End Execution
Multi-Processing Operating System
Definition
A Multi-Processing Operating System supports multiple CPUs (or cores) to execute
multiple processes simultaneously, improving the system's throughput and performance.
Characteristics
Characteristic Description
Multiple CPUs Uses two or more CPUs for simultaneous execution.
High Reliability Ensures system reliability by distributing tasks.
Parallel Processing Enables true parallel execution of processes.
Characteristic Description
Resource Sharing Shares system resources like memory across CPUs.
Working of Multi-Processing OS
1. Processes are divided into smaller tasks.
2. Tasks are assigned to different CPUs for execution.
3. CPUs execute tasks concurrently, improving throughput.
Advantages
1. High Performance: Executes tasks faster due to parallel processing.
2. System Reliability: A failure in one CPU doesn’t halt the entire system.
3. Scalability: Easily scales by adding more CPUs.
Disadvantages
1. Complex Architecture: Requires sophisticated design and management.
2. Costly: Higher hardware and maintenance costs.
3. Synchronization Overhead: Increases with multiple processors.
Applications
Supercomputers.
Real-time systems requiring high performance.
Diagram
Multi-Processing OS Workflow
Task Assigned to CPU
TaskAssigned
[Task Executed by CPU 1] [Task Executed by CPU 2]
CPU1 CPU2
Multi-Tasking Operating System
Definition
A Multi-Tasking Operating System allows a single CPU to execute multiple tasks or
processes concurrently by rapidly switching between them, creating the illusion of
simultaneous execution.
Characteristics
Characteristic Description
Time Sharing Allocates CPU time slices to each task.
Interactivity Provides user interaction during task execution.
Concurrency Executes multiple tasks alternately.
Preemptive Scheduling Uses scheduling algorithms to switch tasks.
Working of Multi-Tasking OS
1. Multiple tasks are loaded into memory.
2. Each task is allocated a specific time slice for execution.
3. Tasks are switched when their time slice expires.
Advantages
1. Enhanced Interactivity: Allows users to interact with multiple applications.
2. Efficient CPU Usage: Keeps CPU active with minimal idle time.
3. Faster Response Time: Quickly switches between tasks.
Disadvantages
1. CPU Overhead: Frequent task switching increases overhead.
2. Limited by Hardware: Performance depends on system resources.
3. Potential Conflicts: Concurrent tasks may lead to resource conflicts.
Applications
Personal computers.
Smartphones.
Comparison Table: Multi-Programming vs Multi-Processing vs
Multi-Tasking
Aspect Multi-Programming Multi-Processing Multi-Tasking
Execution Sequential with Parallel with multiple Concurrent
switching CPUs switching
User None None High
Interaction
Response Moderate High Fast
Time
Examples Batch systems Supercomputers Windows, Android
Summary Table
Type Definition Key Features Examples
Multi- Executes multiple CPU utilization, job Batch processing,
Programming programs alternately. pooling. databases.
Multi- Executes tasks using Parallel processing, Supercomputers,
Processing multiple CPUs. reliability. servers.
Multi-Tasking Allows multiple tasks Interactivity, Windows, macOS,
to run concurrently. preemptive Android.
scheduling.
Conclusion
These operating systems illustrate different methods of optimizing CPU and resource
usage to cater to diverse computational needs, from background processing to interactive
and high-performance environments. Each type serves a specific purpose, balancing
efficiency, interactivity, and cost.