CS Notes ๐Ÿ“š

Operating Systems

Most programs written by software engineers run on top of an operating system. Because of this, understanding how operating systems work internally can help in writing programs that are more efficient and performant.

Introduction

An operating system (OS) is software that manages a computerโ€™s hardware resources and provides services for users and the applications running on the system.

An OS mainly provides three important capabilities:

One of the key responsibilities of an operating system is resource allocation. Since system resources such as CPU time and memory are limited, the OS determines how these resources are distributed among running programs.

Another important responsibility is isolation. If one program crashes or contains a bug, it should not cause the entire system to fail. In addition, users should not be able to access or modify data belonging to other users.

At the same time, some programs need to interact with one another. To support this, the operating system provides mechanisms that allow processes to communicate safely when necessary.