Skip to content

Simulates system calls, demonstrating OS handling of user requests for kernel services. Includes tests and additional files for various scenarios.

License

Notifications You must be signed in to change notification settings

machine-moon/syscall-simulator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Syscall Simulator

Description

A simple syscall simulator.

Usage

To run the simulator, use the following command:

./sim <trace_file> <vector_table_file> <output_file>

Makefile Instructions

Default Rule

To build the program use:

make

Running Specific Tests

To run specific tests, use the following commands:

make test1
make test2
make test3
make test4
make test5
# ... up to test20

Running All Tests

To run all tests, use:

make test

Cleaning Up

To remove the executable, object file, and ALL test execution files in, use:

make clean

Notes

  • Ensure you have make installed and properly configured.
  • Running tests together may appear to repeat randomness due to fast execution; run tests individually to see true randomness.

Analyzing Results

The analyze.py script can be used to generate pie charts and bar graphs from the execution results.

Usage

To analyze a single execution file and generate pie charts:

python3 analyze.py <execution_file>
# ... execution file is the output of the simulator

Example

python3 analyze.py ./path/to/execution1.txt
python3 analyze.py ./path/to/execution2.txt

The script will generate the following images:

  • execution_pie_charts.png: Pie charts showing the distribution of IO Time, CPU Time, and Overhead for each execution.
  • average_metrics_bar_graph.png: Bar graph showing the average metrics across the executions.

Optionally, you can display the charts while saving by uncommenting plt.show() in the script.

License

This project is licensed under the MIT License. See the LICENSE file for details.

About

Simulates system calls, demonstrating OS handling of user requests for kernel services. Includes tests and additional files for various scenarios.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published