259 lines
17 KiB
HTML
259 lines
17 KiB
HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
|
||
<head>
|
||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
|
||
<meta name="generator" content="Doxygen 1.9.8"/>
|
||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||
<title>Seyshell: compte_rendu_1</title>
|
||
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||
<script type="text/javascript" src="jquery.js"></script>
|
||
<script type="text/javascript" src="dynsections.js"></script>
|
||
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
||
<script type="text/javascript" src="search/searchdata.js"></script>
|
||
<script type="text/javascript" src="search/search.js"></script>
|
||
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||
</head>
|
||
<body>
|
||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||
<div id="titlearea">
|
||
<table cellspacing="0" cellpadding="0">
|
||
<tbody>
|
||
<tr id="projectrow">
|
||
<td id="projectalign">
|
||
<div id="projectname">Seyshell
|
||
</div>
|
||
</td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
<!-- end header part -->
|
||
<!-- Generated by Doxygen 1.9.8 -->
|
||
<script type="text/javascript">
|
||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||
var searchBox = new SearchBox("searchBox", "search/",'.html');
|
||
/* @license-end */
|
||
</script>
|
||
<script type="text/javascript" src="menudata.js"></script>
|
||
<script type="text/javascript" src="menu.js"></script>
|
||
<script type="text/javascript">
|
||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||
$(function() {
|
||
initMenu('',true,false,'search.php','Search');
|
||
$(document).ready(function() { init_search(); });
|
||
});
|
||
/* @license-end */
|
||
</script>
|
||
<div id="main-nav"></div>
|
||
<!-- window showing the filter options -->
|
||
<div id="MSearchSelectWindow"
|
||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
||
</div>
|
||
|
||
<!-- iframe showing the search results (closed by default) -->
|
||
<div id="MSearchResultsWindow">
|
||
<div id="MSearchResults">
|
||
<div class="SRPage">
|
||
<div id="SRIndex">
|
||
<div id="SRResults"></div>
|
||
<div class="SRStatus" id="Loading">Loading...</div>
|
||
<div class="SRStatus" id="Searching">Searching...</div>
|
||
<div class="SRStatus" id="NoMatches">No Matches</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
</div><!-- top -->
|
||
<div><div class="header">
|
||
<div class="headertitle"><div class="title">compte_rendu_1</div></div>
|
||
</div><!--header-->
|
||
<div class="contents">
|
||
<div class="textblock"><p align="right"></p>
|
||
<p><img src="../img/logo_isty.png" alt="Logo ISTY" width="180" class="inline"/> </p>
|
||
<h1><a class="anchor" id="autotoc_md0"></a>
|
||
Rapport d’analyse et de conception</h1>
|
||
<h2><a class="anchor" id="autotoc_md1"></a>
|
||
Projet Système 2025/2026 – Système de Gestion de Fichiers (SGF)</h2>
|
||
<p><b>Membres de l’équipe :</b></p><ul>
|
||
<li>CHOISY Alexis</li>
|
||
<li>DEGAT Teddy</li>
|
||
<li>DA SILVA FERREIRA Lucas</li>
|
||
<li>FOURNIE Baptiste</li>
|
||
<li>FATIHI Youssef</li>
|
||
</ul>
|
||
<p><b>Encadrante :</b> ABOUDA Dhekra <br />
|
||
<b>Date de remise :</b> 20 avril 2026</p>
|
||
<hr />
|
||
<h2><a class="anchor" id="autotoc_md3"></a>
|
||
Sommaire</h2>
|
||
<ul>
|
||
<li>I. Analyse des besoins de l’utilisateur</li>
|
||
<li>II. Définition du système à réaliser</li>
|
||
<li>III. Cahier des charges</li>
|
||
<li>IV. Structures de données prévues</li>
|
||
<li>V. Liste des fonctions principales</li>
|
||
<li>VI. Répartition des tâches</li>
|
||
<li>VII. Conclusion</li>
|
||
</ul>
|
||
<hr />
|
||
<h2><a class="anchor" id="autotoc_md5"></a>
|
||
I. Analyse des besoins de l’utilisateur</h2>
|
||
<h3><a class="anchor" id="autotoc_md6"></a>
|
||
1. Objectifs fonctionnels</h3>
|
||
<p>Le programme doit permettre à un utilisateur de :</p><ul>
|
||
<li>Interagir via un shell.</li>
|
||
<li>Gérer une arborescence de fichiers et répertoires (création, suppression, déplacement).</li>
|
||
<li>Manipuler le contenu des fichiers (lecture, écriture) via des primitives spécifiques.</li>
|
||
<li>Assurer la persistance des données par la sauvegarde/recharge du SGF sur le disque physique.</li>
|
||
</ul>
|
||
<h3><a class="anchor" id="autotoc_md7"></a>
|
||
2. Contraintes</h3>
|
||
<ul>
|
||
<li><b>Langage</b> : C uniquement.</li>
|
||
<li><b>Dates limites</b> : Rendu de l'analyse le 20 avril 2026, conception le 2 mai 2026, et final le 28 mai 2026.</li>
|
||
</ul>
|
||
<hr />
|
||
<h2><a class="anchor" id="autotoc_md9"></a>
|
||
II. Définition du système à réaliser</h2>
|
||
<h3><a class="anchor" id="autotoc_md10"></a>
|
||
1. Fonctionnement général</h3>
|
||
<p>Le système simule une partition de disque dur à travers un fichier. Il s'articule autour de trois couches:</p><ol type="1">
|
||
<li><b>Le Shell</b> : Analyse les commandes (<code>ls</code>, <code>mkdir</code>, etc.) et appelle les primitives.</li>
|
||
<li><b>Les Primitives</b> : Fonctions de bas niveau (<code>myopen</code>, <code>myread</code>) qui font le lien avec la structure interne.</li>
|
||
<li><b>Le SGF</b> : Gère l'organisation physique des i-nodes et des blocs de données.</li>
|
||
</ol>
|
||
<p><img src="../img/comment_ça_fonctionne.png" alt="illustration" class="inline"/></p>
|
||
<hr />
|
||
<h2><a class="anchor" id="autotoc_md12"></a>
|
||
III. Cahier des charges</h2>
|
||
<h3><a class="anchor" id="autotoc_md13"></a>
|
||
1. Description globale des fonctions</h3>
|
||
<table class="markdownTable">
|
||
<tr class="markdownTableHead">
|
||
<th class="markdownTableHeadLeft">Fonctionnalité </th><th class="markdownTableHeadLeft">Description </th></tr>
|
||
<tr class="markdownTableRowOdd">
|
||
<td class="markdownTableBodyLeft"><b>Shell</b> </td><td class="markdownTableBodyLeft">Gère les commandes <code>ls</code>, <code>mkdir</code>, <code>rmdir</code>, <code>cat</code>, <code>cp</code>, <code>rm</code>, <code>mv</code>. </td></tr>
|
||
<tr class="markdownTableRowEven">
|
||
<td class="markdownTableBodyLeft"><b>Gestion Inodes</b> </td><td class="markdownTableBodyLeft">Attribution et libération d'i-nodes pour fichiers et répertoires. </td></tr>
|
||
<tr class="markdownTableRowOdd">
|
||
<td class="markdownTableBodyLeft"><b>Gestion Blocs</b> </td><td class="markdownTableBodyLeft">Allocation de blocs de données (contigus ou non) pour le stockage. </td></tr>
|
||
<tr class="markdownTableRowEven">
|
||
<td class="markdownTableBodyLeft"><b>Arborescence</b> </td><td class="markdownTableBodyLeft">Gestion des répertoires comme des fichiers spéciaux listant des i-nodes. </td></tr>
|
||
<tr class="markdownTableRowOdd">
|
||
<td class="markdownTableBodyLeft"><b>Persistance</b> </td><td class="markdownTableBodyLeft">Sauvegarde de l'état complet du disque virtuel dans un fichier binaire. </td></tr>
|
||
<tr class="markdownTableRowEven">
|
||
<td class="markdownTableBodyLeft"><b>Superbloc (df)</b> </td><td class="markdownTableBodyLeft">Fournit les infos sur les blocs/inodes libres et l'espace disque. </td></tr>
|
||
</table>
|
||
<h3><a class="anchor" id="autotoc_md14"></a>
|
||
2. Fonctions bonus</h3>
|
||
<ul>
|
||
<li>Gestion de plusieurs utilisateurs simultanés.</li>
|
||
<li>Implémentation des filtres <code>grep</code> et <code>find</code>.</li>
|
||
<li>Gestion des droits d'accès et dates de modification sur les inodes.</li>
|
||
</ul>
|
||
<hr />
|
||
<h2><a class="anchor" id="autotoc_md16"></a>
|
||
IV. Structures de données prévues</h2>
|
||
<p>Le SGF utilise des structures à taille fixe pour simuler la partition .</p>
|
||
<div class="fragment"><div class="line"> </div>
|
||
<div class="line"><span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code hl_struct" href="structinode.html">inode</a> {</div>
|
||
<div class="line"> <span class="keywordtype">unsigned</span> <span class="keywordtype">short</span> <a class="code hl_variable" href="structinode.html#ab744b42f5d23ec542bd9897a4d15a5fa">perms</a>; <span class="comment">// rwxrwxrwx</span></div>
|
||
<div class="line"> <span class="keywordtype">char</span> <a class="code hl_variable" href="structinode.html#a2d0a5188e7dfbfcf2fa374a5fb348177">filetype</a>;</div>
|
||
<div class="line"> <span class="keywordtype">int</span> <a class="code hl_variable" href="structinode.html#aaeb4427c36772c74ae86c9510ee6a6b3">blocs</a>[<a class="code hl_define" href="const_8h.html#ad7140f3913ca85546efb2ded034d0af2">MAX_BLOCS</a>];</div>
|
||
<div class="line">} <a class="code hl_struct" href="structinode.html">inode</a>;</div>
|
||
<div class="line"> </div>
|
||
<div class="line"><span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code hl_struct" href="structbloc.html">bloc</a> {</div>
|
||
<div class="line"> <span class="keywordtype">char</span> <a class="code hl_variable" href="structbloc.html#a801f2e871d2e285480d31426e39e01a9">datas</a>[<a class="code hl_define" href="const_8h.html#a60fedb7550ff4e00d6c70dd2d257c154">MAX_BYTES_PER_BLOC</a>];</div>
|
||
<div class="line">} <a class="code hl_struct" href="structbloc.html">bloc</a>;</div>
|
||
<div class="line"> </div>
|
||
<div class="line"><span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code hl_struct" href="structdisk.html">disk</a> {</div>
|
||
<div class="line"> <span class="keywordtype">char</span> <a class="code hl_variable" href="structdisk.html#a60d62e18ebc1d2933bb952352397acda">owned_blocs</a>[<a class="code hl_define" href="const_8h.html#ad7140f3913ca85546efb2ded034d0af2">MAX_BLOCS</a>]; <span class="comment">// 1 si possédé par un inode, 0 si libre</span></div>
|
||
<div class="line"> <a class="code hl_struct" href="structinode.html">inode</a> <a class="code hl_variable" href="structdisk.html#a187c55f0919fa8f44cc442857cce3e8d">inodes</a>[<a class="code hl_define" href="const_8h.html#af58c11b86af508a573976185fb99170f">MAX_INODE</a>];</div>
|
||
<div class="line"> <a class="code hl_struct" href="structbloc.html">bloc</a> <a class="code hl_variable" href="structdisk.html#ad418fe421d1f081b29dcc7922608ca59">blocs</a>[<a class="code hl_define" href="const_8h.html#ad7140f3913ca85546efb2ded034d0af2">MAX_BLOCS</a>];</div>
|
||
<div class="line">} <a class="code hl_struct" href="structdisk.html">disk</a>;</div>
|
||
<div class="line"> </div>
|
||
<div class="line"><span class="comment">// pour 10 inode qui a 30 blocs de chacun 1024 octets, on a 30720 octets, soit</span></div>
|
||
<div class="line"><span class="comment">// 30,7 Ko sur le disque</span></div>
|
||
<div class="ttc" id="aconst_8h_html_a60fedb7550ff4e00d6c70dd2d257c154"><div class="ttname"><a href="const_8h.html#a60fedb7550ff4e00d6c70dd2d257c154">MAX_BYTES_PER_BLOC</a></div><div class="ttdeci">#define MAX_BYTES_PER_BLOC</div><div class="ttdef"><b>Definition</b> const.h:4</div></div>
|
||
<div class="ttc" id="aconst_8h_html_ad7140f3913ca85546efb2ded034d0af2"><div class="ttname"><a href="const_8h.html#ad7140f3913ca85546efb2ded034d0af2">MAX_BLOCS</a></div><div class="ttdeci">#define MAX_BLOCS</div><div class="ttdef"><b>Definition</b> const.h:3</div></div>
|
||
<div class="ttc" id="aconst_8h_html_af58c11b86af508a573976185fb99170f"><div class="ttname"><a href="const_8h.html#af58c11b86af508a573976185fb99170f">MAX_INODE</a></div><div class="ttdeci">#define MAX_INODE</div><div class="ttdef"><b>Definition</b> const.h:5</div></div>
|
||
<div class="ttc" id="astructbloc_html"><div class="ttname"><a href="structbloc.html">bloc</a></div><div class="ttdoc">Segment de données brutes à taille fixe stocké sur le disque virtuel.</div><div class="ttdef"><b>Definition</b> struct.h:36</div></div>
|
||
<div class="ttc" id="astructbloc_html_a801f2e871d2e285480d31426e39e01a9"><div class="ttname"><a href="structbloc.html#a801f2e871d2e285480d31426e39e01a9">bloc::datas</a></div><div class="ttdeci">char datas[MAX_BYTES_PER_BLOC]</div><div class="ttdef"><b>Definition</b> struct.h:37</div></div>
|
||
<div class="ttc" id="astructdisk_html"><div class="ttname"><a href="structdisk.html">disk</a></div><div class="ttdoc">Représentation globale en mémoire (Memory Mapping) de la structure logique du disque virtuel.</div><div class="ttdef"><b>Definition</b> struct.h:46</div></div>
|
||
<div class="ttc" id="astructdisk_html_a187c55f0919fa8f44cc442857cce3e8d"><div class="ttname"><a href="structdisk.html#a187c55f0919fa8f44cc442857cce3e8d">disk::inodes</a></div><div class="ttdeci">inode inodes[MAX_INODE]</div><div class="ttdef"><b>Definition</b> struct.h:48</div></div>
|
||
<div class="ttc" id="astructdisk_html_a60d62e18ebc1d2933bb952352397acda"><div class="ttname"><a href="structdisk.html#a60d62e18ebc1d2933bb952352397acda">disk::owned_blocs</a></div><div class="ttdeci">char owned_blocs[MAX_BLOCS]</div><div class="ttdef"><b>Definition</b> struct.h:47</div></div>
|
||
<div class="ttc" id="astructdisk_html_ad418fe421d1f081b29dcc7922608ca59"><div class="ttname"><a href="structdisk.html#ad418fe421d1f081b29dcc7922608ca59">disk::blocs</a></div><div class="ttdeci">bloc blocs[MAX_BLOCS]</div><div class="ttdef"><b>Definition</b> struct.h:49</div></div>
|
||
<div class="ttc" id="astructinode_html"><div class="ttname"><a href="structinode.html">inode</a></div><div class="ttdoc">Représente un index de fichier (Inode) au sein du SGF.</div><div class="ttdef"><b>Definition</b> struct.h:24</div></div>
|
||
<div class="ttc" id="astructinode_html_a2d0a5188e7dfbfcf2fa374a5fb348177"><div class="ttname"><a href="structinode.html#a2d0a5188e7dfbfcf2fa374a5fb348177">inode::filetype</a></div><div class="ttdeci">char filetype</div><div class="ttdef"><b>Definition</b> struct.h:26</div></div>
|
||
<div class="ttc" id="astructinode_html_aaeb4427c36772c74ae86c9510ee6a6b3"><div class="ttname"><a href="structinode.html#aaeb4427c36772c74ae86c9510ee6a6b3">inode::blocs</a></div><div class="ttdeci">int blocs[MAX_BLOCS]</div><div class="ttdef"><b>Definition</b> struct.h:27</div></div>
|
||
<div class="ttc" id="astructinode_html_ab744b42f5d23ec542bd9897a4d15a5fa"><div class="ttname"><a href="structinode.html#ab744b42f5d23ec542bd9897a4d15a5fa">inode::perms</a></div><div class="ttdeci">unsigned short perms</div><div class="ttdef"><b>Definition</b> struct.h:25</div></div>
|
||
</div><!-- fragment --><hr />
|
||
<h2><a class="anchor" id="autotoc_md18"></a>
|
||
V. Liste des fonctions principales</h2>
|
||
<h3><a class="anchor" id="autotoc_md19"></a>
|
||
Primitives Système</h3>
|
||
<ul>
|
||
<li>**<code>int create_inode(disk *disk, inode *parent, char inode_type, char *name)</code>** : Crée un fichier et retourne son inode.</li>
|
||
<li>**<code>int myread(int inode, char *buffer, int nombre)</code>** : Lit n octets depuis l'inode.</li>
|
||
</ul>
|
||
<h3><a class="anchor" id="autotoc_md20"></a>
|
||
Commandes Shell</h3>
|
||
<ul>
|
||
<li>**<code><a class="el" href="disk_8c.html#a9db73bc21d502f4b9231a7366070fcad" title="Commande système ls. Liste l'ensemble des éléments compris dans un répertoire.">do_ls()</a></code>** : Lit le répertoire actuel et affiche les noms et inodes associés.</li>
|
||
<li>**<code>do_mkdir(char *nom)</code>** : Crée un i-node de type répertoire et initialise les entrées . et ..</li>
|
||
</ul>
|
||
<hr />
|
||
<h2><a class="anchor" id="autotoc_md22"></a>
|
||
VI. Répartition des tâches</h2>
|
||
<p>L'équipe est divisée en groupe pour assurer l'intégration finale.</p>
|
||
<h3><a class="anchor" id="autotoc_md23"></a>
|
||
1. SGF & Stockage (Alexis et Youssef)</h3>
|
||
<ul>
|
||
<li>Initialisation et formatage du disque virtuel (inodes à 0).</li>
|
||
<li>Fonctions de sauvegarde/rechargement du SGF dans le fichier image.</li>
|
||
</ul>
|
||
<h3><a class="anchor" id="autotoc_md24"></a>
|
||
2. Primitives & I-nodes (Teddy et Baptiste)</h3>
|
||
<ul>
|
||
<li>Gestion de l'allocation des blocs et des i-nodes.</li>
|
||
<li>Développement des primitives mycreat, myopen, myread, mywrite.</li>
|
||
</ul>
|
||
<h3><a class="anchor" id="autotoc_md25"></a>
|
||
3. Shell & Commandes (Lucas et Alexis)</h3>
|
||
<ul>
|
||
<li>Création de l'interpréteur de commandes (processus fils et exec).</li>
|
||
<li>Implémentation des commandes ls, mkdir, cat, rm.</li>
|
||
</ul>
|
||
<h3><a class="anchor" id="autotoc_md26"></a>
|
||
Planning prévisionnel</h3>
|
||
<table class="markdownTable">
|
||
<tr class="markdownTableHead">
|
||
<th class="markdownTableHeadLeft">Phase </th><th class="markdownTableHeadLeft">Description </th><th class="markdownTableHeadLeft">Échéance </th></tr>
|
||
<tr class="markdownTableRowOdd">
|
||
<td class="markdownTableBodyLeft"><b>Phase 1</b> </td><td class="markdownTableBodyLeft">Analyse des besoins et structures de données </td><td class="markdownTableBodyLeft">20 avril 2026 </td></tr>
|
||
<tr class="markdownTableRowEven">
|
||
<td class="markdownTableBodyLeft"><b>Phase 2</b> </td><td class="markdownTableBodyLeft">Conception des algorithmes principaux </td><td class="markdownTableBodyLeft">2 mai 2026 </td></tr>
|
||
<tr class="markdownTableRowOdd">
|
||
<td class="markdownTableBodyLeft"><b>Phase 3</b> </td><td class="markdownTableBodyLeft">Développement du SGF et des primitives </td><td class="markdownTableBodyLeft">Mai 2026 </td></tr>
|
||
<tr class="markdownTableRowEven">
|
||
<td class="markdownTableBodyLeft"><b>Phase 4</b> </td><td class="markdownTableBodyLeft">Finalisation du Shell et tests de validation </td><td class="markdownTableBodyLeft">28 mai 2026 </td></tr>
|
||
<tr class="markdownTableRowOdd">
|
||
<td class="markdownTableBodyLeft"><b>Phase 5</b> </td><td class="markdownTableBodyLeft">Soutenance et remise du code source </td><td class="markdownTableBodyLeft">29 mai 2026 </td></tr>
|
||
</table>
|
||
<hr />
|
||
<h2><a class="anchor" id="autotoc_md28"></a>
|
||
VII. Conclusion</h2>
|
||
<p>Ce rapport constitue le socle de développement de notre Mini SGF. En respectant une séparation nette entre le stockage, les primitives et l'interpréteur, nous visons une architecture robuste conforme aux attentes. La prochaine étape sera la validation des algorithmes de lecture/écriture. </p>
|
||
</div></div><!-- contents -->
|
||
</div><!-- PageDoc -->
|
||
<!-- start footer part -->
|
||
<hr class="footer"/><address class="footer"><small>
|
||
Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.8
|
||
</small></address>
|
||
</body>
|
||
</html>
|