• Advanced
  • About 12 min
  • 5 practice questions

Functions and types of operating systems

List the core functions of an operating system and tell batch, multiprogramming, time-sharing, real-time and multiprocessing systems apart.

If something looks wrong, please tell us.

The operating system (OS) sits between the user and the hardware. It decides who gets the CPU, memory and devices. Exams ask for its functions and for the type of OS that matches a description.

Core functions

  • Process management: deciding which program runs and when.
  • Memory management: allocating and freeing memory.
  • File management: organising files and folders.
  • Device management: controlling devices through drivers.
  • Security and user interface: protecting resources and providing a command line or graphical interface.

Types

Types of operating system
TypeIdeaExample use
BatchJobs with similar needs are grouped and run without user interactionPayroll runs
MultiprogrammingSeveral programs kept in memory; the CPU switches when one waits for input or outputBetter CPU use
Time-sharingEach user gets a small slice of CPU time in turn, so all feel served at onceMany users on one system
Real-timeMust respond within a strict time limitFlight control, medical monitors
MultiprocessingMore than one CPU works togetherHeavy computation
DistributedMany computers cooperate as one systemLarge networked services

Worked example 1: which type?

A system controlling an aircraft must react within milliseconds, and a late answer is a failure. This is a real-time operating system. A batch system would be unsuitable because it has no response deadline.

Worked example 2: time slices

A time-sharing system gives each of 20 users a slice of 50 milliseconds in turn. How long before a user gets another turn, ignoring switching time? The other 19 users use 19 x 50 = 950 ms, so a user waits 950 ms between the end of one slice and the start of the next. A full cycle is 20 x 50 = 1000 ms.

Batch: no interaction. Time-sharing: turns. Real-time: deadlines. Multiprocessing: many CPUs.

— Rule to remember

Key takeaways

  • Five core functions: process, memory, file, device, security/interface.
  • Real-time means deadlines; time-sharing means turns.
  • A full cycle = users x slice length.

Check your understanding

  1. 1. Deciding which program runs on the CPU next is part of:

    1. Memory management
    2. Process management
    3. File management
    4. Device management
    Show answer

    Answer: B. Process management decides which program runs and when.

  2. 2. Which type of operating system gives each user a small slice of CPU time in turn?

    1. Batch
    2. Real-time
    3. Distributed
    4. Time-sharing
    Show answer

    Answer: D. Time-sharing divides CPU time into slices so all users feel served at once.

  3. 3. A system controlling an aircraft must react within milliseconds. Which type of OS is needed?

    1. Real-time
    2. Batch
    3. Time-sharing
    4. Multiprogramming
    Show answer

    Answer: A. A real-time OS must respond within a strict time limit; a late answer is a failure.

  4. 4. With 10 users and a 100 ms time slice, how long is one full round?

    1. 100 ms
    2. 900 ms
    3. 1000 ms
    4. 110 ms
    Show answer

    Answer: C. Full round = users x slice = 10 x 100 = 1000 ms, which is 1 second.

  5. 5. In which type of OS are jobs with similar needs grouped and run without user interaction?

    1. Real-time
    2. Batch
    3. Time-sharing
    4. Multiprocessing
    Show answer

    Answer: B. A batch system runs grouped jobs, such as payroll runs, with no user interaction.

Sign in to keep track of the lessons you finish.

Next lesson → Processes and CPU scheduling

Privacy · Terms · Refunds · Delivery