📦Operating System

More in-depth information about roles of an OS.

An operating system forms a bridge between hardware of a computer and it's application software. This is because application software cannot directly communicate with computer hardware.

Hiding Complexity

True complexities of operations are hidden from end-users via Application Programming Interface (API).

Users can issue commands or navigate without having to know how they are carried out. Examples include:

  • Saving/Loading Files

  • Recording/Playing Sounds

  • Switching between several tasks

API

An API acts like a waiter in a restaurant: You, the user, look at a menu and give the waiter (the API) a request. Then the waiter takes the request to the kitchen (the OS), then the kitchen sends back a prepared dish via the waiter. And during all this process, you don't need to know how the dish was cooked.

Functions of an OS

Here are a few functions the OS is responsible for:

  • Memory management

  • Process scheduling

  • Backing store management

  • Peripheral IO management

Memory Management

A PC allows many programs to be running simultaneously. You are able to watch videos, write a program, download podcasts and have a crypto miner running in the background. The OS allocates memory to each of these processes.

When a system's RAM is full, the operating system uses disk space as a temporary storage solution, known as virtual memory, to accommodate the excess data. The program can then be reloaded when needed.

Process Scheduling

The OS Controls which programs can send data to the processor to be processed.

Instructions from various operations queue up, and the processor handles small parts of each operation in sequence, making it seem like programs are running simultaneously. This is multitasking.

The Scheduler

The scheduler is the OS module responsible for ensuring that process time is used as efficiently as possible.

There are many scheduling algorithms:

  • Round Robin — each process has use of the processor for a given time slice

  • Shortest job next

  • Priority system

Task Manager

In windows, you can use the task manager app to view all processes that are currently running and how much memory has been allocated to them.

Backing Store Management

The OS keeps track of where all files are being stored on the hard disk or external drives, and where spaces is free for it to be used if the user performs a save operation. There are many things that can be done with files, they can be listed, viewed, edited, moved, deleted, protected from unauthorized access and more! This shows the importance of store management.

IO Device Management

The OS communicates with I/O devices through I/O controller (component of the CPU). It also checks whether or not a output device is ready to use. Interrupts occur when Interrupts are also dealt-with by the OS under IO device management.

Interrupts occur when the processor receives a signal from hardware or software indicating that immediate attention is needed. Interrupts are also part of IO device management.

Last updated