ICS 433 · OPERATING SYSTEMS

Mini File System Simulator

60-SECOND WALKTHROUGH

Tell the story in four moves

  1. Model: each file is one FCB containing name, size, content and isUsed.
  2. Create: duplicate check, then first-fit allocation into the first free slot.
  3. Lifecycle: write → read/search → delete while the grid shows memory changes.
  4. Trade-off: O(n) lookup and RAM-only storage keep the OS concepts visible.
LIVE IN-MEMORY MODEL

See what the C program does inside RAM.

Every command updates the same 100-element FileControlBlock array used by the original C project.

ACTIVE FILES0 / 100
CONTENT STORED0 B
FREE SLOTS100
LOOKUPO(n)
COMMAND PATH
01
User / CLIraw command
02
main.cparse + dispatch
03
filesystem.cvalidate + operate
04
FCB array100 RAM slots
COMMAND CONSOLE

Run the file system

mfsRAM session · C99 behavior
01 / 08
Guided demoNext: create file1
MEMORY MAP

File Control Block array

RAM ONLY
FreeOccupiedActive operation
0.00% of content capacity used
FCB #00isUsed = 0
name char[50]
""
size int
0 bytes
content char[1024]
""
WHAT JUST HAPPENED?

Operation trace

create()
    C IMPLEMENTATION

    Code behind the action

    filesystem.c
    PROJECT LOGIC

    Why this design?

    01

    Fixed FCB array makes allocation and deallocation visible and predictable.

    02

    Linear search is simple and sufficient for a maximum of 100 files.

    03

    Bounds checks prevent name and content buffer overflow.

    NAIF'S CONTRIBUTION

    Designed the FCB structure and constants; implemented deleteFile, listFiles, and searchFile; performed boundary testing.