Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found
Select Git revision
  • main
1 result

Target

Select target project
  • gc_courses/sys-exploit/course
1 result
Select Git revision
  • main
1 result
Show changes
Commits on Source (3)
......@@ -10,9 +10,8 @@
<link rel="stylesheet" href="../../../dist/reveal.css">
<link rel="stylesheet" href="../../../dist/theme/white.css" id="theme">
<!-- Higlight theme with a fallback on local monokai in case of connexion pb -->
<link rel="stylesheet" href="../../../plugin/highlight/monokai.css" id="highlight-theme">
<link rel="stylesheet" href="https://highlightjs.org/static/demo/styles/googlecode.css" id="highlight-theme">
<!-- Higlight theme -->
<link rel="stylesheet" href="../css/googlecode.css" id="highlight-theme">
<!-- Add my own theme on top of classical reveal.js theme -->
<link rel="stylesheet" href="../css/mytheme.css">
......@@ -22,7 +21,7 @@
var link = document.createElement( 'link' );
link.rel = 'stylesheet';
link.type = 'text/css';
link.href = window.location.search.match( /print-pdf/gi ) ? '../../../css/print/pdf.css' : '../../../css/print/paper.css';
link.href = window.location.search.match( /print-pdf/gi ) ? '../../../css/print/pdf.scss' : '../../../css/print/paper.scss';
document.getElementsByTagName( 'head' )[0].appendChild( link );
</script>
</head>
......
......@@ -14,11 +14,9 @@
<link rel="stylesheet" href="../../../dist/reveal.css">
<link rel="stylesheet" href="../../../dist/theme/white.css" id="theme">
<!-- Higlight theme with a fallback on local monokai in case of connexion pb -->
<!-- TODO: the monokai fallback cannot be included has it conflicts on the struct keyword with other themes
check another way to make a fallback -->
<!-- <link rel="stylesheet" href="../../../plugin/highlight/monokai.css" id="highlight-theme"> -->
<link rel="stylesheet" href="https://highlightjs.org/static/demo/styles/googlecode.css" id="highlight-theme">
<!-- Higlight theme -->
<link rel="stylesheet" href="../css/googlecode.css" id="highlight-theme">
<!-- Add my own theme on top of classical reveal.js theme -->
<link rel="stylesheet" href="../css/mytheme.css">
......@@ -28,7 +26,7 @@
var link = document.createElement('link');
link.rel = 'stylesheet';
link.type = 'text/css';
link.href = window.location.search.match(/print-pdf/gi) ? '../../../css/print/pdf.css' : '../../../css/print/paper.css';
link.href = window.location.search.match(/print-pdf/gi) ? '../../../css/print/pdf.scss' : '../../../css/print/paper.scss';
document.getElementsByTagName('head')[0].appendChild(link);
</script>
<!--[if lt IE 9]>
......
......@@ -10,13 +10,22 @@
<link rel="stylesheet" href="../../../dist/reveal.css">
<link rel="stylesheet" href="../../../dist/theme/white.css" id="theme">
<!-- Higlight theme with a fallback on local monokai in case of connexion pb -->
<!-- <link rel="stylesheet" href="../../../plugin/highlight/monokai.css" id="highlight-theme"> -->
<link rel="stylesheet" href="https://highlightjs.org/static/demo/styles/googlecode.css" id="highlight-theme">
<!-- Higlight theme -->
<link rel="stylesheet" href="../css/googlecode.css" id="highlight-theme">
<!-- Add my own theme on top of classical reveal.js theme -->
<link rel="stylesheet" href="../css/mytheme.css">
<!-- Printing and PDF exports -->
<script>
var link = document.createElement('link');
link.rel = 'stylesheet';
link.type = 'text/css';
link.href = window.location.search.match(/print-pdf/gi) ? '../../../css/print/pdf.scss' : '../../../css/print/paper.scss';
document.getElementsByTagName('head')[0].appendChild(link);
</script>
<!-- TODO: move in mytheme -->
<style>
.reveal p {
......
......@@ -10,13 +10,21 @@
<link rel="stylesheet" href="../../../dist/reveal.css">
<link rel="stylesheet" href="../../../dist/theme/white.css" id="theme">
<!-- Higlight theme with a fallback on local monokai in case of connexion pb -->
<link rel="stylesheet" href="../../../plugin/highlight/monokai.css" id="highlight-theme">
<link rel="stylesheet" href="https://highlightjs.org/static/demo/styles/googlecode.css" id="highlight-theme">
<!-- Higlight theme -->
<link rel="stylesheet" href="../css/googlecode.css" id="highlight-theme">
<!-- Add my own theme on top of classical reveal.js theme -->
<link rel="stylesheet" href="../css/mytheme.css">
<!-- Printing and PDF exports -->
<script>
var link = document.createElement('link');
link.rel = 'stylesheet';
link.type = 'text/css';
link.href = window.location.search.match(/print-pdf/gi) ? '../../../css/print/pdf.scss' : '../../../css/print/paper.scss';
document.getElementsByTagName('head')[0].appendChild(link);
</script>
<!-- TODO: move in mytheme -->
<style>
.reveal p {
......@@ -55,7 +63,7 @@
<body>
<div class="reveal">
<div class="slides">
<section>
<h1>Mémoires partagées</h1>
<author>Guillaume Chanel</author>
......@@ -66,7 +74,7 @@
<section>
<h1>Memory-mapped file (Fichier en mémoire partagée)</h1>
</section>
<section>
<h2>Rappel</h2>
<div class="text-block">
......@@ -88,19 +96,19 @@
<li>partager des pages (données, instructions) entre plusieurs processus;</li>
<li>accéder aux données directement en mémoire (i.e. par pointeurs) plutôt que dans un fichier (i.e. par curseur)</li>
</ul>
<p><strong>Un tel fichier ne sera pas chargé intégralement en mémoire mais page par
page au fur et a mesure des fautes de page du processus.</strong></p>
</div>
</section>
<section>
<h2>Principe du "file mapping"</h2>
<p style="text-align:left; font-size: 0.8em;margin-bottom: 0px;">Deux processus peuvent partager un segment en y associant des espaces
d’adressage virtuel différents:</p>
<img src="img/shared_mem_mmap.svg" alt="Shared memory" height="500px">
</section>
<section>
<h2>Le "file mapping" en pratique</h2>
<div class="text-block" style="font-size: 0.8em">
......@@ -117,12 +125,12 @@
</ul>
</div>
</section>
<section>
<h2>open / close</h2>
<div style="font-size: 0.9em;">
<p>On peut ouvrir un fichier avec l'appel système suivant:</p>
<pre><code data-noescape data-trim>
int open(const char *pathname, int flags);
</code></pre>
......@@ -131,7 +139,7 @@
<li><code>flags</code> est un champ de bit indiquant le mode d'accès au fichier (<code>O_RDONLY, O_WRONLY, O_RDWR</code>);</li>
<li>retourne un entier représentant le fichier (descripteur de fichier), soit -1 en cas d'erreur (vérifier <code>errno</code>).</li>
</ul>
<p>On doit fermer un fichier avec l'appel système suivant:</p>
<pre><code class="c" data-noescape data-trim>
int close(int fd);
......@@ -144,7 +152,7 @@
<br>
<small>Note: la description de la fonction open est incomplète. Une <a href="http://cui.unige.ch/~chanel/prez/presentations/sys-exploitation/7.io/7.io.html#/ouvrir-un-canal-open">description complète</a> sera présentée plus tard.</small>
</section>
<section>
<h2>mmap</h2>
<pre><code data-noescape data-trim>
......@@ -160,7 +168,7 @@
</ul>
<img src="img/mmap.svg" alt="File mapping" style="border: none; box-shadow: none">
</section>
<section>
<h2>mmap</h2>
<pre><code data-noescape data-trim>
......@@ -182,10 +190,10 @@
</ul>
</div>
</section>
<section>
<h2>Exercice</h2>
<div class="text-block">
<p>L'objectif de cet exercice est de créer un processus qui:</p>
<ul>
......@@ -195,14 +203,14 @@
<p>On simule ainsi l'exécution d'un code externe un peu comme cela est fait pour une librairie partagée</p>
</div>
</section>
<section>
<h2>Exercice</h2>
<p style="font-size: 0.8em;">Le programme à charger est fournit en assembleur. Il faut le compiler avec <code>nasm</code> (voir Makefile).</p>
<pre style="font-size: 12px;"><code class="x86asm" id="ex-code-asm"></code></pre>
<pre style="font-size: 12px;"><code class="makefile" id="ex-code-asm-makefile" data-line-numbers="1-7|8-9"></code></pre>
</section>
<section>
<h2>Exercice</h2>
<p style="text-align: left;">Il faut donc:</p>
......@@ -221,14 +229,14 @@
</ul>
<p style="text-align: left; color: darkgray;">Pour aller plus loin: votre programme C devra rechercher les informations du segment et du point d'entrée directement dans le fichier executable.</p>
</section>
<section>
<h2>Exerice - correction</h2>
<pre style="font-size: 12px; height: 550px;"><code class="c" id="ex-code-asm-c"></code></pre>
</section>
</section>
<section data-markdown="shared_mem.md" data-separator-vertical="^\r?\n--\r?\n$"></section>
......
......@@ -14,9 +14,8 @@
<link rel="stylesheet" href="../../../dist/reveal.css">
<link rel="stylesheet" href="../../../dist/theme/white.css" id="theme">
<!-- Higlight theme with a fallback on local monokai in case of connexion pb -->
<!-- <link rel="stylesheet" href="../../../plugin/highlight/monokai.css" id="highlight-theme"> -->
<link rel="stylesheet" href="https://highlightjs.org/static/demo/styles/googlecode.css" id="highlight-theme">
<!-- Higlight theme -->
<link rel="stylesheet" href="../css/googlecode.css" id="highlight-theme">
<!-- Add my own theme on top of classical reveal.js theme -->
<link rel="stylesheet" href="../css/mytheme.css">
......@@ -26,7 +25,7 @@
var link = document.createElement('link');
link.rel = 'stylesheet';
link.type = 'text/css';
link.href = window.location.search.match(/print-pdf/gi) ? '../../../css/print/pdf.css' : '../../../css/print/paper.css';
link.href = window.location.search.match(/print-pdf/gi) ? '../../../css/print/pdf.scss' : '../../../css/print/paper.scss';
document.getElementsByTagName('head')[0].appendChild(link);
</script>
<!--[if lt IE 9]>
......
......@@ -14,11 +14,8 @@
<link rel="stylesheet" href="../../../dist/reveal.css">
<link rel="stylesheet" href="../../../dist/theme/white.css" id="theme">
<!-- Higlight theme with a fallback on local monokai in case of connexion pb -->
<!-- TODO: the monokai fallback cannot be included has it conflicts on the struct keyword with other themes
check another way to make a fallback -->
<!-- <link rel="stylesheet" href="../../../plugin/highlight/monokai.css" id="highlight-theme"> -->
<link rel="stylesheet" href="https://highlightjs.org/static/demo/styles/googlecode.css" id="highlight-theme">
<!-- Higlight theme -->
<link rel="stylesheet" href="../css/googlecode.css" id="highlight-theme">
<!-- Add my own theme on top of classical reveal.js theme -->
<link rel="stylesheet" href="../css/mytheme.css">
......@@ -28,7 +25,7 @@
var link = document.createElement('link');
link.rel = 'stylesheet';
link.type = 'text/css';
link.href = window.location.search.match(/print-pdf/gi) ? '../../../css/print/pdf.css' : '../../../css/print/paper.css';
link.href = window.location.search.match(/print-pdf/gi) ? '../../../css/print/pdf.scss' : '../../../css/print/paper.scss';
document.getElementsByTagName('head')[0].appendChild(link);
</script>
<!--[if lt IE 9]>
......
......@@ -23,7 +23,7 @@
var link = document.createElement('link');
link.rel = 'stylesheet';
link.type = 'text/css';
link.href = window.location.search.match(/print-pdf/gi) ? '../../../css/print/pdf.css' : '../../../css/print/paper.css';
link.href = window.location.search.match(/print-pdf/gi) ? '../../../css/print/pdf.scss' : '../../../css/print/paper.scss';
document.getElementsByTagName('head')[0].appendChild(link);
</script>
<!--[if lt IE 9]>
......
......@@ -22,7 +22,7 @@
var link = document.createElement('link');
link.rel = 'stylesheet';
link.type = 'text/css';
link.href = window.location.search.match(/print-pdf/gi) ? '../../../css/print/pdf.css' : '../../../css/print/paper.css';
link.href = window.location.search.match(/print-pdf/gi) ? '../../../css/print/pdf.scss' : '../../../css/print/paper.scss';
document.getElementsByTagName('head')[0].appendChild(link);
</script>
<!--[if lt IE 9]>
......
......@@ -13,22 +13,22 @@
<link rel="stylesheet" href="../../../dist/reveal.css">
<link rel="stylesheet" href="../../../dist/theme/white.css" id="theme">
<link rel="stylesheet" href="../../../plugin/highlight/zenburn.css" id="highlight-theme">
<!-- Add my own theme on top of classical reveal.js theme -->
<link rel="stylesheet" href="../css/mytheme.css">
<!-- Printing and PDF exports -->
<script>
var link = document.createElement('link');
link.rel = 'stylesheet';
link.type = 'text/css';
link.href = window.location.search.match(/print-pdf/gi) ? '../../../css/print/pdf.css' : '../../../css/print/paper.css';
link.href = window.location.search.match(/print-pdf/gi) ? '../../../css/print/pdf.scss' : '../../../css/print/paper.scss';
document.getElementsByTagName('head')[0].appendChild(link);
</script>
<!--[if lt IE 9]>
<script src="../../../lib/js/html5shiv.js"></script>
<![endif]-->
<!-- Include example directly in slide -->
<script type="text/javascript">
window.onload=function() {
......@@ -46,7 +46,7 @@
hljs.highlightBlock(element);
});
});
fetch('examples/pipes/consumer.c').then(function(response) {
response.text().then(function(text) {
element = document.getElementById('ex-pipes-consumer');
......@@ -54,7 +54,7 @@
hljs.highlightBlock(element);
});
});
fetch('examples/pipes/producer.c').then(function(response) {
response.text().then(function(text) {
element = document.getElementById('ex-pipes-producer');
......@@ -62,7 +62,7 @@
hljs.highlightBlock(element);
});
});
}
</script>
</head>
......@@ -70,15 +70,15 @@
<body>
<div class="reveal">
<div class="slides">
<section id="title-slide">
<h1 class="title">Pipes et FIFO</h1>
<p class="author">Guillaume Chanel</p>
<p class="author">Remerciements à Jean-Luc Falcone</p>
</section>
<!-- ######################## FIFO - PIPES ######################## -->
<section id="pipes-et-fifo" class="slide level2">
<h2>Rappel sur les pipes et FIFO</h2>
<div class="text-block">
......@@ -91,7 +91,7 @@
</ul>
</div>
</section>
<section>
<h2>Tubes anonymes</h2>
<p>On peut créer un canal de communication anonyme en utilisant:</p>
......@@ -103,7 +103,7 @@
<li>Pas d'accès aléatoire possible.</li>
</ul>
</section>
<section id="concepts" class="slide level2">
<h2>Concepts generaux des pipes</h2>
<div class="text-block">
......@@ -130,7 +130,7 @@
<p>Deadlock: si il y a plusieurs rendez-vous un processus peut en attendre un autre a une endroits alors que l'autre processus l'attends a un autre</p>
</aside>
</section>
<section id="commande-shell-mkfifo1" class="slide level2">
<h2>Pipe nommé: Commande <code>mkfifo(1)</code></h2>
<div class="text-block">
......@@ -146,17 +146,17 @@
<pre><code data-trim class="shell">
$ mkfifo -m 0640 /tmp/fifo1
$ ls -lh /dev > /tmp/fifo1
$ more /tmp/fifo1 # Dans un autre shell
</code></pre>
</fieldset>
<aside class="notes">
<p>Insiter sur le fait que le processus ls est bloqué dans que aucun processus n'est connecté à la sortie du pipe</p>
</aside>
</section>
<section id="fonction-posix-mkfifo2" class="slide level2">
<h2>Fonction POSIX <code>mkfifo(2)</code></h2>
<p>On peut créer un FIFO avec l'appel système:</p>
......@@ -168,7 +168,7 @@
<li>Pas d'accès aléatoire possible.</li>
</ul>
</section>
<section id="exemple-prod" class="slide level2">
<h2>Exemple - <a href="examples/pipes/producer.c">producer</a></h2>
<pre><code id="ex-pipes-producer" class="c" style="font-size:70%;height:50vh;max-height:100vh">Include example there (see script)</code></pre>
......@@ -177,14 +177,14 @@
<p>A noter que si c'est au consomateur de supprime le fifo</p>
</aside>
</section>
<section id="exemple-cons" class="slide level2">
<h2>Exemple - <a href="examples/pipes/consumer.c">consumer</a></h2>
<pre><code id="ex-pipes-consumer" class="c" style="font-size:70%;height:50vh;max-height:100vh">Include example there (see script)</code></pre>
</section>
</div>
</div>
<!-- Initialize reveal.js with common configuration -->
<!-- TODO find a way to have chalkboard script included from the config to avoid redundancy in each presentation -->
<script src="../../../plugin/reveal.js-plugins/chalkboard/plugin.js"></script>
......
......@@ -37,14 +37,25 @@ F. Secteur angulaire
Premier disque dur conçu en 1956 pour le super-computer IBM 305 Ramac
- Capacité : 4.8MB <!-- .element font-size="5" -->
<div class="cols">
<div>
- Capacité : 4.8MB
- 50 plateaux de 60cm (24"), contenant chacun 100 pistes/faces, contenant chacune 5 secteurs de 100 octets
- Débit : 8.8KB/sec.
- Vitesse : 1200 tours/min.
- 2 têtes lecture/écriture, 1 sec. pour passer d'un plateau à l'autre
- Prix du système complet : $33'200/mois
![](images/IBM-305-RAMAC.jpg)<!-- .element width="40%" -->
</div>
<div>
![](images/IBM-305-RAMAC.jpg)<!-- .element width="100%" -->
</div>
</div>
--
......@@ -175,4 +186,3 @@ reste très simple :
- On peut lire/écrire des blocs adressés logiquement, mais on est encore loin d'un FS <!-- .element: class="fragment" data-fragment-index="0" -->
- Comment à partir de ces opérations simples, peut-on construire un FS ? <!-- .element: class="fragment" data-fragment-index="2" -->
- Pour cela, il est nécessaire de comprendre l'allocation des blocs de données ainsi que l'organisation sur disque d'un FS <!-- .element: class="fragment" data-fragment-index="3" -->