Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

SYSC 4001 Assignment 2 Part 3

API simulator that implements fork and exec system calls on top of the interrupt simulator from A1.

What it does

Simulates an OS with fixed memory partitions that handles fork/exec syscalls. Tracks process control blocks (PCBs) and manages memory allocation for programs. Outputs execution logs and system status snapshots.

Running the code

Compile and run:

chmod +x build.sh
./build.sh
./bin/interrupts trace.txt vector_table.txt device_table.txt external_files.txt

Input files

  • trace.txt - main trace with CPU/SYSCALL/FORK/EXEC activities
  • vector_table.txt - ISR vector addresses
  • device_table.txt - device delays in ms
  • external_files.txt - available programs and their sizes
  • program*.txt - external program traces loaded by EXEC

Output files

  • execution.txt - timestamped execution log (CSV format)
  • system_status.txt - PCB/memory snapshots after each FORK/EXEC

Memory partitions

6 fixed partitions: 40, 25, 15, 10, 8, 2 MB Init process starts in partition 6 (2 MB, uses 1 MB)

Notes

  • FORK uses vector 2, EXEC uses vector 3
  • Child processes run before parent resumes
  • Loader time is 15ms per MB of program size

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages