Operating systems - EduqasManaging resources

Operating systems control a computer’s resources and provide an interface for users to be able to communicate with these resources. Utility software helps to maintain the system.

Part ofComputer ScienceUnderstanding Computer Science

Managing resources

An is a collection (or suite) of that manages and controls a computer.

Common operating systems include:

  • Microsoft Windows
  • macOS
  • Linux
  • Android
  • iOS

Operating systems have many functions.

Interrupts

The ensures that the computer system runs smoothly and this is done by using interrupts. If the (CPU) is busy with a task and another event occurs, such as a mouse click or a key on the keyboard being pressed, an interrupt is the signal to the CPU to deal with the new action. For example, if a person is playing a video game and their phone rings, they typically pause the game, answer the call and then resume playing. This is the interrupt process that the CPU manages very quickly without it being noticed by the user.

Managing backing store

File handling and file maintenance are some of the most important tasks of an operating system. Filing systems such as are often used. These allow users to:

  • create, modify and delete files and folders
  • copy and duplicate files and folders
  • move files and folders
  • rename files and folders
  • sort items into different orders according to name, file type, date created and more
  • search for particular files and folders
  • restore deleted files
  • set access rights - such as read only or edit - to files

Memory management

Computer must be managed to ensure that:

  • more than one program can run at the same time
  • more than one document can be opened at the same time

One method of memory management is . Memory is broken up into fixed-size blocks known as .

Different operating systems use different page sizes. For example, memory pages in modern operating systems are typically four in size.

When a program is run it is loaded into memory. The operating system determines how much memory the program requires and allocates enough pages to hold it and its documents. When the program is closed the allocated pages are freed up for use by other programs.

The pages a program occupies may or may not be but this does not matter. The operating system knows how to access each page and the data held in them when needed.

Consider this example - Program A requires two pages. It is allocated pages 0 and 1. Program B requires three pages. It is allocated pages 2, 3 and 4.

Table with programs that have been loaded to memory and allocated pages

Program A now closes and program C now runs. Program C requires three pages. Pages 0 and 1 are now free, so program C is allocated pages 0, 1 and 5.

Table with programs that have been loaded to memory and allocated pages

Managing processes

The operating system makes sure that different processes can make use of the without conflicting with each other. Multitasking means to be able to run more than one program simultaneously.

Modern operating systems are multitasking in that they allow several programs to run side by side. It is not uncommon for a user to be music while entering text into a or streaming a video while making a of files.

Multitasking is possible only if:

  • the operating system can support multitasking
  • the computer has enough memory to hold more than one program in at the same time

In the past, computers with were unable to multitask - the operating systems of the day allowed only one program to run at a time. However, newer CLIs can handle multitasking, for example Linux (Linux is also distributed as a graphical user interface (GUI)).

Managing security

Operating systems also manage user access. They allow:

  • individual users to be created and deleted
  • access levels to be given to users, such as administrator rights or standard user rights
  • auditing (keeping a log) of files a user creates, accesses, edits and deletes