x86 Linux Kernel
Overview
The final project for ECE: 391 (Operating Systems) at the Univeristy of Illinois was to build a Linux Kernel in a group. My group decided to go above and beyond to place 2nd in the design competition in a class of 60+ teams. This class led to many late nights and my first ever all-nighter and this is my attempt to make me think it was worth it!Some Technicals
This was a huge project with a ton of instruction and documentation, but I'm going to focus on the filesystem of our kernel, as this was largely my responsibility. A filesystem is just a way that we interpret a mass of data. Data, on this low of a level is just all right next to eachother (nothing like files and folder just yet). Our kernel implemented a readable and writeable filesystem based on the following format:This way of organzing the filesystem makes things dynamic, allowing files to have different lengths, adding the (potential) ability to remove files, and not destroy memory with random gaps. Here, we organize the data in "data blocks," 4kB in size each. We then originate our filesystem with a "Boot Block" telling us how many files there are in the current system, how many data blocks they take up, and where to find each file. After that, each file is associated with an "inode," telling us where to find the data blocks for it's respective file. This is useful because then we don't need the data for each file all in a row, creating more dynamic memory. Finally, we have the data blocks!Kernel in Action
In this project, I also made a bunch of mini commands to help users interact with the filesystem! Above, we can see the "snano" command (simple nano) where to user can write to files at a specific location as shown! I also, implemented the "touch" command allowing users to add files into the filesystem.