Skip to content
Snippets Groups Projects
1_understanding_a_computer.Rmd 5.66 KiB
Newer Older
Laurent Modolo's avatar
Laurent Modolo committed
---
title: Understanding a computer
author: "Laurent Modolo"
output:
  rmdformats::downcute:
Laurent Modolo's avatar
Laurent Modolo committed
    self_contain: true
    use_bookdown: true
    default_style: "light"
    lightbox: true
    css: "./www/style_Rmd.css"
Laurent Modolo's avatar
Laurent Modolo committed
---

```{r include = FALSE}

if (!require("fontawesome")) {
  install.packages("fontawesome")
}
if (!require("klippy")) {
  install.packages("remotes")
  remotes::install_github("rlesur/klippy")
}
library(fontawesome)
knitr::opts_chunk$set(echo = TRUE)
knitr::opts_chunk$set(comment = NA)
klippy::klippy(
  position = c('top', 'right'),
  color = "white",
  tooltip_message = 'Click to copy',
  tooltip_success = 'Copied !')

```

<a rel="license" href="http://creativecommons.org/licenses/by-sa/4.0/">
<img alt="Creative Commons License" style="border-width:0" src="https://i.creativecommons.org/l/by-sa/4.0/88x31.png" />
</a>
Laurent Modolo's avatar
Laurent Modolo committed

Objective: understand the relations between the different components of a computer

Laurent Modolo's avatar
Laurent Modolo committed
# Which parts are necessary to define a computer ?
Laurent Modolo's avatar
Laurent Modolo committed

Laurent Modolo's avatar
Laurent Modolo committed
# Computer components
Laurent Modolo's avatar
Laurent Modolo committed

Laurent Modolo's avatar
Laurent Modolo committed
## CPU (Central Processing Unit)
Laurent Modolo's avatar
Laurent Modolo committed

![CPU](./img/amd-ryzen-7-1700-cpu-inhand1-2-1500x1000.jpg){width=100%}
Laurent Modolo's avatar
Laurent Modolo committed

Laurent Modolo's avatar
Laurent Modolo committed
## Memory
Laurent Modolo's avatar
Laurent Modolo committed

Laurent Modolo's avatar
Laurent Modolo committed
### RAM (Random Access Memory)
Laurent Modolo's avatar
Laurent Modolo committed

![RAM](./img/ram.png){width=100%}
Laurent Modolo's avatar
Laurent Modolo committed

Laurent Modolo's avatar
Laurent Modolo committed
### HDD (Hard Disk Drive) / SSD (Solid-State Drive)
Laurent Modolo's avatar
Laurent Modolo committed

![HDD](./img/SSD.jpeg){width=100%}
![SSD](./img/hdd.png){width=100%}
Laurent Modolo's avatar
Laurent Modolo committed

Laurent Modolo's avatar
Laurent Modolo committed
## Motherboard
Laurent Modolo's avatar
Laurent Modolo committed

![motherboard](./img/motherboard.jpg){width=100%}
Laurent Modolo's avatar
Laurent Modolo committed

Laurent Modolo's avatar
Laurent Modolo committed
## GPU (Graphical Processing Unit)
Laurent Modolo's avatar
Laurent Modolo committed

![GPU](./img/foundation-100046736-orig.jpg){width=100%}

Laurent Modolo's avatar
Laurent Modolo committed
## Alimentation
Laurent Modolo's avatar
Laurent Modolo committed

![Alim](./img/LD0003357907_2.jpg){width=100%}

---
Laurent Modolo's avatar
Laurent Modolo committed
# Computer model: universal Turing machine
![width:20% height:20%](./img/lego_turing_machine.jpg){width=100%}
Laurent Modolo's avatar
Laurent Modolo committed
# As simple as a Turing machine ?
Laurent Modolo's avatar
Laurent Modolo committed

![universal_truing_machine](./img/universal_truing_machine.png){width=100%}
Laurent Modolo's avatar
Laurent Modolo committed

- A tape divided into cells, one next to the other. Each cell contains a symbol from some finite alphabet.
- A head that can read and write symbols on the tape and move the tape left and right one (and only one) cell at a time.
- A state register that stores the state of the Turing machine, one of finitely many. Among these is the special start state with which the state register is initialized.
- A finite table of instructions that, given the state the machine is currently in and the symbol it is reading on the tape, tells the machine what to do.

---

Laurent Modolo's avatar
Laurent Modolo committed
# Basic Input Output System (BIOS)
Laurent Modolo's avatar
Laurent Modolo committed

> Used to perform hardware initialization during the booting process (power-on startup), and to provide runtime services for operating systems and programs.

- comes pre-installed on a personal computer's system board
- the first software to run when powered on
- in modern PCs initializes and tests the system hardware components, and loads a boot loader from a mass memory device

---

Laurent Modolo's avatar
Laurent Modolo committed
# Unified Extensible Firmware Interface (UEFI)
Laurent Modolo's avatar
Laurent Modolo committed

Advantages:

- Ability to use large-disk partitions (over 2 TB) with a GUID Partition Table (GPT)
Laurent Modolo's avatar
Laurent Modolo committed
- CPU-independent architecture
- CPU-independent drivers
- Flexible pre-OS environment, including network capability
- Modular design
- Backward and forward compatibility

Disadvantages:

- More complex

---

Laurent Modolo's avatar
Laurent Modolo committed
# Operating System (OS)
Laurent Modolo's avatar
Laurent Modolo committed

> A system software that manages computer hardware, software resources, and provides common services for computer programs.

Laurent Modolo's avatar
Laurent Modolo committed
- The first thing loaded by the BIOS/UEFI
- The first thing on the tape of a Turing machine

Laurent Modolo's avatar
Laurent Modolo committed
## Kernel
Laurent Modolo's avatar
Laurent Modolo committed
> The kernel provides the most basic level of control over all of the computer's hardware devices. It manages memory access for programs in the RAM, it determines which programs get access to which hardware resources, it sets up or resets the CPU's operating states for optimal operation at all times, and it organizes the data for long-term non-volatile storage with file systems on such media as disks, tapes, flash memory, etc.

[Kernel](./img/220px-Kernel_Layout.svg.png){width=100%}
Laurent Modolo's avatar
Laurent Modolo committed

Laurent Modolo's avatar
Laurent Modolo committed
# UNIX
Laurent Modolo's avatar
Laurent Modolo committed
> Unix is a family of multitasking, multiuser computer operating systems that derive from the original AT&T Unix,

[![Unix history](./img/1920px-Unix_timeline.en.svg.png){width=100%}](https://upload.wikimedia.org/wikipedia/commons/b/b5/Linux_Distribution_Timeline_21_10_2021.svg)
Laurent Modolo's avatar
Laurent Modolo committed

The ones you are likely to encounter:
Laurent Modolo's avatar
Laurent Modolo committed
- [macOS](https://en.wikipedia.org/wiki/MacOS)
- [BSD (Berkeley Software Distribution) variant](https://www.freebsd.org/)
- [GNU/Linux](https://www.kernel.org/)

The philosophy of UNIX is to have a large number of small software which do few things but to them well.

Laurent Modolo's avatar
Laurent Modolo committed
# GNU/Linux
Laurent Modolo's avatar
Laurent Modolo committed

Linux is the name of the kernel which software, to get a full OS, Linux is part of the [GNU Project](https://www.gnu.org/).
Laurent Modolo's avatar
Laurent Modolo committed

The GNU with Richard Stallman introduced the notion of Free Software:
Laurent Modolo's avatar
Laurent Modolo committed
1. The freedom to run the program as you wish, for any purpose.
2. The freedom to study how the program works, and change it so it does your computing as you wish. Access to the source code is a precondition for this.
3. The freedom to redistribute copies so you can help others.
4. The freedom to distribute copies of your modified versions to others. By doing this you can give the whole community a chance to benefit from your changes. Access to the source code is a precondition for this.

You can find a [list of software licenses](https://www.gnu.org/licenses/license-list.html)
Laurent Modolo's avatar
Laurent Modolo committed

<video width="100%" controls>
 <source src="https://audio-video.gnu.org/video/TEDxGE2014_Stallman05_LQ.webm" type="video/webm">
  Your browser does not support the video tag.
</video>
Laurent Modolo's avatar
Laurent Modolo committed

GD's avatar
GD committed
See this [presentation](https://plmlab.math.cnrs.fr/gdurif/presentation_foss/-/blob/main/presentation/presentation_DURIF_foss.pdf) (in french) for a quick introduction about **software license** and **free/open source software**.
Laurent Modolo's avatar
Laurent Modolo committed

[Instead of installing GNU/Linux on your computer, you are going to learn to use the IFB Cloud.](./2_using_the_ifb_cloud.html)