←Back to Subject
Notes
Notes
Study material and explanations
Diagrams
Diagrams
Visualize concepts easily
Mnemonics
Mnemonics
Tricks to remember faster
One Night Prep
One Night Prep
Short and focused revision
Revision
Revision
Quick summary and key points
Important Questions
Important Questions
Practice most relevant questions
Notes

Types of Operating Systems: Batch, Multiprogramming, Multiprocessing & Time-Sharing

Study material and explanations for Unit 1

Types of Operating Systems: Batch, Multiprogramming, Multiprocessing & Time-Sharing

1. Overview of Operating System Types

Operating systems are classified based on how they manage the CPU, how many users they support simultaneously, and how quickly they respond to user inputs. In this section, we cover the first four foundational types of OS in your DAVV syllabus:

  1. Batch Operating System
  2. Multiprogramming Operating System
  3. Multiprocessing Operating System
  4. Time-Sharing (Multitasking) Operating System

2. Batch Operating System

In a Batch Operating System (popular in 1950s–60s mainframes), the user does not interact directly with the computer while their program is running.

Figure 1.4: How a Batch Operating System Works
Users 1, 2, 3Submit offline jobs (Punched Cards)
→
Computer OperatorSorts & groups similar jobs into Batches
→
Batch OSExecutes Batch 1 (FORTRAN), then Batch 2 (COBOL)

How It Works:

  • Each user prepares their job (Program + Input Data + Control Instructions) offline and hands it over to a human Computer Operator.
  • To avoid wasting time loading and unloading compilers repeatedly, the Operator groups jobs with similar requirements (e.g., all FORTRAN jobs together, all COBOL jobs together) into a Batch.
  • The Batch OS executes jobs in the batch one after another sequentially without any human intervention.

Advantages:

  • Eliminates idle setup time between consecutive jobs.
  • Multiple users can share an expensive mainframe computer.

Disadvantages:

  • CPU Starvation / Idle Time: Whenever the current job waits for slow I/O (printer or tape), the CPU sits completely idle!
  • Zero Interactive Debugging: If there is a small syntax error on line 5, the user only finds out the next day when the printed output is returned.

Real-World Examples Today:

  • Monthly Bank Statement generation, Electricity/Telephone Bill processing, and Payroll calculation systems still run as automated night batch jobs!

3. Multiprogramming Operating System

Why was Multiprogramming invented? In a Batch system, a single job cannot keep both the CPU and I/O devices busy at all times. Since I/O devices are thousands of times slower than the CPU, the CPU spends most of its time sitting idle waiting for I/O!

Multiprogramming solves this by keeping several jobs (programs) in Main Memory (RAM) simultaneously!

Figure 1.5: Memory Layout & CPU Switching in a Multiprogramming OS
RAMOperating System (Kernel)
Manages job switching
Job 1Waiting for Disk I/O
Paused for I/O → CPU immediately switches to Job 2!
Job 2Currently Executing on CPU
Keeps CPU 100% busy while Job 1 does I/O
Job 3Ready in RAM
Will get CPU if Job 2 also requests I/O

How It Works:

  1. The OS picks Job 1 from RAM and starts executing it on the CPU.
  2. As soon as Job 1 needs to wait for an I/O operation (like reading a file from disk), the OS does NOT wait—it immediately switches the CPU to Job 2 (which is already waiting in RAM)!
  3. When Job 2 needs I/O, the CPU switches to Job 3, and so on.
  4. Core Goal of Multiprogramming: Maximize CPU Utilization (never let the CPU sit idle as long as at least one job is ready to run!).

4. Time-Sharing (Multitasking) Operating System

A Time-Sharing Operating System is a logical extension of Multiprogramming.

  • In normal Multiprogramming, the CPU only switches from Job 1 to Job 2 when Job 1 voluntarily asks for I/O. What if Job 1 is doing heavy math for 2 hours without any I/O? All other users would freeze!
  • In a Time-Sharing OS, the CPU switches between multiple running jobs so rapidly (every few milliseconds) using a fixed time slice called a Time Quantum (or Time Slice) that every user feels like they have the entire computer to themselves!

Analogy: A Chess Grandmaster playing against 10 opponents simultaneously—walking around the table and making a move on each board every 5 seconds. Each player feels like they are playing a live one-on-one match!

Key Features of Time-Sharing OS:

  1. Interactive Computing: Users interact directly with their running program via keyboard/mouse and get an immediate response.
  2. Time Slice / Quantum: Each process gets a small fixed burst of CPU time (e.g., 10 ms to 100 ms). If it hasn’t finished when the timer expires, it is preempted and moved to the back of the queue (Round-Robin Scheduling).
  3. Core Goal of Time-Sharing: Minimize Response Time for interactive users.
  • Examples: UNIX, Linux, Windows, macOS.

5. Multiprocessing Operating System (Parallel Systems)

While Multiprogramming and Time-Sharing use a single CPU switching rapidly between tasks, a Multiprocessing Operating System uses two or more physical CPUs (or Multi-Core Processors) connected to the same computer system, sharing the system bus, clock, and RAM!

Figure 1.6: Two Types of Multiprocessing Systems
1. Asymmetric Multiprocessing (AMP)
  • Follows a Master-Slave relationship
  • One Master CPU runs the OS and assigns tasks to Slave CPUs
  • Simple to design, but if Master CPU fails, system halts
2. Symmetric Multiprocessing (SMP)
  • All CPUs are Equal Peers (No Master-Slave)
  • Every CPU runs its own copy/threads of the OS and picks tasks from a shared queue
  • Used in all modern Quad-Core / Octa-Core PCs & Servers!

3 Major Advantages of Multiprocessing Systems:

  1. Increased Throughput: With N processors working truly in parallel at the exact same instant, more work gets done in less time.
  2. Economy of Scale: Cheaper than buying N separate computers because all CPUs share the same power supply, RAM, and hard disks.
  3. Increased Reliability (Graceful Degradation / Fault Tolerance): If one processor fails in a 4-CPU system, the system does not crash—the remaining 3 CPUs take over its work and run at 75% speed!

6. Master Comparison: Multiprogramming vs Time-Sharing vs Multiprocessing

This comparison table is a must-write for 8-mark questions in DAVV BCA exams!

Basis Multiprogramming OS Time-Sharing (Multitasking) OS Multiprocessing OS
1. Number of CPUs 1 CPU (Single processor). 1 CPU (Single processor). 2 or more CPUs (Multiple processors/cores).
2. Primary Objective Maximize CPU Utilization (keep CPU busy when I/O occurs). Minimize Response Time (give fast interactive feedback to users). Maximize Throughput & Reliability via true parallel execution.
3. When Does CPU Switch? Switches only when the current process waits for I/O (Non-preemptive). Switches every few milliseconds when the Time Quantum expires (Preemptive). Multiple processes execute at the exact same instant on separate CPUs.
4. Execution Type Concurrent (Interleaved). Concurrent (Time-Sliced). True Parallel Execution.

💡 Exam Preparation Tips for DAVV BCA

  • Never confuse Multiprogramming (multiple programs in RAM on 1 CPU) with Multiprocessing (multiple CPUs/Processors in hardware).
  • Remember the two golden goals:
    • Multiprogramming Goal: Maximize CPU Utilization.
    • Time-Sharing Goal: Minimize Response Time.