Title Text

Title Text

PRE-PROGRAMMING

OPERATING SYSTEMS

computer boot process

Booting Process

Once the computer boot process is over, the Operating System takes over. 

 

But what exactly is an Operating System?

NEXT

The evolution of operating systems

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.

A Little history

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.

What is an operating system?

FUNCTIONALITY EVOLUTION TIMELINE

UNIX

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:

  • Kernel (the core functionality)
  • Other tools that can be bundled with the kernel, without being part of it.

Modern OPERATING SYSTEMS TIMELINE

NEXT

But how exactly do modern Operating Systems perform their functions?

MODERN OPERATING SYSTEMS

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.

KERNEL vs. System utilities

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. 

Memory management

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.

ProcessES VS. 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:

  • Files
  • Message Queues
  • Signals
  • Shared Memory
  • Pipes/Sockets
  • Semaphores

INTERPROCESS COMMUNICATION

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.

PROCESS EXECUTION MANAGEMENT

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.

FILE SYSTEM

For UNIX-like operating systems.

FILE SYSTEM HIERARCHY STANDARD

the terminal

TERMINAL EVOLUTION

A computer terminal is an electronic or electromechanical hardware device that can be used for entering data into, and retrieving data from, a computer.

EXERCISE - Some COMMANDS

PACKAGE MANAGERS

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

Operating Systems

By Soraia Veríssimo

Operating Systems

  • 1,870