Once the computer boot process is over, the Operating System takes over.
But what exactly is an Operating System?
In the beginning, computers would run one program at a time.
Programmers would write programs on punched cards, and a designated computer operator would feed those cards to the machine, by hand.
With computers getting exponentially faster at executing programs, this whole process became ineffective. We needed a way for the machine to operate itself, and hence the birth of the OS.
Interface between the user and the computer hardware.
It is in charge of managing files, memory allocation, process execution, and handling input/output operations.
Dennis Ritchie and Ken Thompson, two engineers working on the MULTICS project, decided to work on their own Operating System.
The idea behind UNIX was to separate OS in two parts:
But how exactly do modern Operating Systems perform their functions?
The kernel is a computer program that embodies the core functionality of an OS. If the computer is on, it's always loaded in memory, facilitating software-hardware interactions.
The core functionality of an OS includes memory, process, file, and I/O management.
Other system utilities that are part of the OS, but not incorporated in the kernel itself, include networking protocols (SSH), the shell, security tools, etc.
The OS keeps track of which memory addresses are in use, and by which running program, allocating memory to new ones and, in turn, deallocating it when a program has finished executing.
A process is a program that was loaded into memory and is being executed by the CPU. A single process can be executed in different threads.
Threads within the same process share the same memory space. The same isn't true for processes running in the same machine.
So, how do they communicate?
Often processes need to communicate with each other. The OS kernel provides a few interprocess communication mechanisms, including:
Often the amount of processes running in the machine surpasses the number of CPU cores. When this happens, it's the OS's responsibility to allocate CPU time to each running process.
This is done by an OS module called the Scheduler.
Scheduling algorithms can be divided into nonpreemptive and preemptive.
The filesystem controls how data is stored and retrieved.
Without it, stored data would be one large body of information with no way of telling where one piece of data stops and the next one begins.
There are many different kinds of filesystems, each with different structure, rules, flexibility, etc.
For UNIX-like operating systems.
A computer terminal is an electronic or electromechanical hardware device that can be used for entering data into, and retrieving data from, a computer.
A package manager is a collection of software tools that automate the process of installing/uninstalling, upgrading, and configuring computer programs.
scoop install nodejs
brew install node