Repository navigation
Expand file tree
/
Copy pathPrj_File_System.html
More file actions
76 lines (68 loc) · 2.8 KB
/
Copy pathPrj_File_System.html
File metadata and controls
76 lines (68 loc) · 2.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
<!DOCTYPE html>
<html>
<head bgcolor="#848484">
<link rel="stylesheet" type="text/css" href="base.css">
<link rel="stylesheet" type="text/css" href="standardPage.css">
</head>
<body>
<section id = "Menu_Bar">
<section id = "Iteractive_Menu">
<ul>
<li><a href="Homepage.html">Home</a></li>
<li><a href="About.html">About</a></li>
<li>
<a href="#">Portfolio</a>
<ul id = "dropdown">
<li class = "dropdown_item"><a href="Education.html">Education</a></li>
<li class = "dropdown_item"><a href="Work_Experience.html">Work Experience</a></li>
<li class = "dropdown_item"><a href="Projects.html">Projects</a></li>
</ul>
</li>
<li><a href="Contact.html">Contact</a></li>
<li><a href="Login.html">Login</a></li>
</ul>
</section>
<script src = "menu_creator.js">
</script>
</section>
<section id = "Main_Body">
<section id = "margins">
<h1>File System</h1>
<div>
<hr></hr>
<div id = "Content">
<p>This was assignment was a group project that we were assigned in our
Operating Systems class, however the brunt of the work was done by me. The goal of this program is to simulate a
file system with an interface identical to the linux command line.
All commands such as mkdir, mvdir, cd, and others work just as if
you were navigating a file system on a command line.
</p>
<p>The file system is simulated by allocating a large fixed block of
memory to the program. The program then sets up the file descriptor
and root directory at the beginning of this memory. All created
directories and files are added contiguously to this memory.
</p>
<p>We chose to simulate a disk partition with the use of malloc on a char
array. We chose a size of 40,000,000 bytes (about 40MB), and we split
this up into blocks of size 5,000. The file system descriptor is at
the beginning of the memory (char array), and it takes up 2 blocks.
Directories each take up 1 block, and files take up 1 block for the
descriptors, and as many extra blocks as they need for data.
</p>
<p>We implemented files, directories, and the file system descriptor with
structs the contain all the information needed for each type. For
example, directories contain: name, top level, subitems[], subitem
types, and subitem count.
</p>
<p>Whenever files or directories were created, removed, or edited, we
had to make sure to apply the relevent changes to all of the
directories and descriptors that would be affected. A link to the Github
page of this project is provided below:
</p><br></br>
<a href="https://github.com/gabeharms/Simulated_File_System">File System</a><br></br>
<div>
</div>
</section>
</section>
</body>
</html>