BCS401 Operating System Semester IV · AY 2025-26 onward
Unit 1 · Introduction & OS Structure

Lecture 3: Classification: Batch & Interactive systems

Learning outcomes

  • Describe batch and interactive operating systems with examples.

Prerequisites

-- Lecture 1–2 basics: OS roles (resource manager / service provider) and OS services. -- Basic terms: CPU, memory, disk, I/O devices. -- Meaning of “job/program” and “execution”.

Lecture Notes

Main content

Classification — Batch, Interactive & Time-Sharing Systems


1) Why do we classify operating systems?

Different computing needs demand different OS behavior. Some environments want maximum throughput (finish many jobs), while others want quick response (fast interaction). Classification helps us choose the right OS style for the problem.


2) Batch Operating System

In a Batch OS, jobs are collected and executed one after another with no direct user interaction during execution. Typical examples: offline billing and payroll processing. Main drawback: high turnaround time and limited debugging interaction.

2.1 Key idea

  • Input is prepared as jobs (batch of programs/data).
  • Jobs wait in a queue and run in sequence (or as scheduled by the system).
  • User does not “talk” to the job while it is running.
  • Goal: high throughput (finish more work).

2.2 Typical characteristics

  • No interaction: job runs to completion (or error) without user input.
  • Turnaround time matters more than response time.
  • Scheduling is based on job order / device availability / priority.

2.3 Spooling (Batch-era performance booster)

Batch systems historically improved performance using spooling (Simultaneous Peripheral Operations On-Line). Spooling overlaps the input/output of one job with the computation of other jobs, keeping CPU and input/output devices busy at higher rates.

A key consequence is that spooling naturally leads to multiprogramming, described as the foundation of modern OS design.

Book-linked note:

The Atlas system is described as a batch operating system with spooling, where spooling helped schedule jobs based on availability of peripheral devices (tape units, readers, printers, etc.).

Real-world applications (Batch):
  • Monthly payroll processing and salary slips generation
  • Offline billing / invoice generation
  • Nightly bank reconciliation and report generation
  • Large data import/export jobs (end-of-day processing)

3) Interactive Operating System

In an Interactive OS, the user interacts with the system during program execution—typing commands, editing files, compiling, running, and seeing outputs quickly. Here the key goal is fast response time rather than only high throughput.

3.0 Interactive vs Time-Sharing (do not confuse)

Interactive and time-sharing are related, but not identical:

  • Interactive OS = the user is “in the loop” (request → response repeatedly). It can be single-user or multiuser.
  • Time-sharing OS = a classic multiuser interactive approach where CPU time is divided into time slices among many users/processes.
  • Rule to remember: Every time-sharing system is interactive, but every interactive system is not necessarily time-sharing.

3.1 Time-sharing as the common multiuser interactive approach

When many users/processes share the same machine (for example, a lab server), interactive systems are commonly implemented as time-sharing systems: the CPU switches rapidly among users/processes, giving the impression of a dedicated machine. CPU time is divided into small quanta (time slices), and interactive response is prioritized over batch throughput.

3.2 Key idea

  • User is in the loop: input → compute → output happens repeatedly.
  • Quick response: the system must respond in short time (seconds or less).
  • Fairness: no single user/program should monopolize CPU.
  • Preemption: the OS can interrupt a running task to keep the system responsive.

3.3 Internal requirements

  • Frequent context switching (switching between running tasks).
  • Good CPU scheduling to support responsiveness.
  • Memory support so multiple programs/users can stay active.
  • Protection/isolation becomes important in shared environments.

3.4 Multiprogramming relationship (bridge concept)

Interactive time-sharing typically relies on multiprogramming: multiple processes are kept in memory; when one waits for input/output, another can run—helping keep CPU utilization high.

Real-world applications:

Interactive (often single-user)

  • Desktop systems for editing, compiling, browsing (for example, Windows/macOS)
  • Mobile operating systems (interactive apps: messages, camera, maps)
  • Local development machine running IDE + compiler + browser

Time-sharing (multiuser interactive)

  • University Linux lab server with many student logins
  • Enterprise servers with many remote sessions (shell/SSH users)
  • Legacy mainframes / multi-terminal UNIX environments

4) Batch vs Interactive vs Time-Sharing — Quick Comparison

Aspect Batch System Interactive System Time-Sharing System
User interaction No interaction while job executes User interacts frequently during execution Many users interact concurrently (shared machine)
Main goal High throughput Fast response for the active user Fast response + fairness among many users
Performance metric Turnaround time (submit → complete) Response time (request → reply) Response time + fairness + acceptable overhead
Typical workload Large offline jobs Short cycles: edit/run/see output Many short interactive tasks from many users
Typical technique Job queues + spooling Preemptive multitasking + fast input/output Time slicing (quanta) + strong isolation/protection
Examples Payroll, offline billing Personal desktop/laptop use Lab servers, multiuser UNIX/Linux environments
Exam line (one-liner):

Batch maximizes throughput, Interactive maximizes fast user response, and Time-sharing is interactive computing extended to many users using time slices + fairness.


5) One simple diagram (Batch vs Interactive / Time-Sharing)

Batch System Jobs collected → queued → executed No interaction during execution Job Queue CPU executes jobs Interactive / Time-Sharing User request ↔ OS response (fast) Time-sharing: CPU time sliced among many users/tasks User / Terminal CPU time slices
Batch focuses on throughput and turnaround time. Interactive focuses on fast response. Time-sharing is interactive computing shared fairly among many users using time slices.

Worked Example

Worked Example: Payroll vs Student Lab Session

A) Batch OS Example — Monthly Payroll

  1. All employees’ data (attendance, salary rules) is collected.
  2. The payroll job is submitted as a batch run.
  3. System executes the job without user interaction until completion.
  4. Output reports are produced at the end.

Best fit because: no need for interactive steps; throughput and correctness matter most.

B) Interactive OS Example — Student compiling and running code

  1. Student edits code, saves file.
  2. Runs compile command and immediately sees errors/output.
  3. Fixes code and runs again (many short cycles).
  4. Multiple students use the server together; CPU is shared by time slicing.

Best fit because: quick response time is critical; system shares CPU fairly among users.

One-Page Summary

One-Page Summary — Batch & Interactive Systems

  • Batch OS: jobs are collected and executed without user interaction; suitable for payroll/offline billing; typically high turnaround time.
  • Spooling: overlaps I/O of one job with computation of others; improves performance and leads naturally to multiprogramming.
  • Interactive OS: user interacts during execution; response time is important.
  • Time-sharing: CPU switches rapidly among users/tasks; uses time slicing (quanta); prioritizes interactive response over batch throughput.
  • Core contrast:
    • Batch → throughput, turnaround time
    • Interactive → responsiveness, fairness, time slicing