Skip to content

Computer Science · Ch 1 — Computer System

Functions of Operating System

1.8.2

Functions of Operating System

Behind its user interface, the operating system performs the management services that keep the computer running. The reason the OS is called a resource manager is exactly this: it manages the different resources — main memory, CPU, I/O devices — so that each resource is used optimally and system performance does not deteriorate. Four management functions matter most: process, memory, file and device management.

(A) Process management

  • While a computer is operational, many tasks run simultaneously. A program is written to carry out tasks; a task in execution is called a process.
  • You can watch processes live: a system monitor program shows the processes currently executing — on some systems it is activated with Ctrl+Alt+Delete.
  • It is the OS's responsibility to manage all these processes and get multiple tasks completed in minimum time.
  • Since the CPU is the main resource of the computer system, allocating the CPU among processes is the most important service the OS provides.
  • In full, process management concerns: the management of multiple processes, the allocation of the resources they need, and the exchange of information among processes.

(B) Memory management

  • Primary (main) memory is limited, and multiple processes run at the same time — so memory must be dynamically (on-the-go) allocated and freed.
  • The core job: give (allocate) memory to a process when it needs it, and take (free) it back when the process finishes, all without affecting the other processes already residing in memory.
  • Once a process ends, the OS reclaims its memory space for re-utilisation.
  • In full, memory management concerns: managing main memory so that the maximum memory is utilised by the largest number of processes, while keeping track of every location in memory as either free or occupied.

(C) File management

  • Data and programs are stored as files in secondary storage.
  • File management covers the creation, updation, deletion and protection of these files in secondary memory.
  • Protection is crucial because multiple users can access the same computer system: there must be a mechanism that stops users from accessing files that belong to another user and have not been shared with them.
  • A clean division of labour to remember: the file management system manages secondary memory, while the memory management system handles main memory.

(D) Device management …