Skip to content

University project about cpu scheduler simulator, in wich i added a multicor functionality. It is intente as a Round-Robin scheduler.

Notifications You must be signed in to change notification settings

spyrash/Multi_Core-CPU-Simulator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 

Repository files navigation

Fake OS Simulation Project

Description

The project implements a simulation of a fictitious operating system (Fake OS). The system includes the management of processes, CPU bursts, and IO bursts. The implemented scheduler is a round-robin scheduler on multiple cores.

Requirements

  • GCC Compiler (GNU Compiler Collection)
  • Linux or UNIX-like operating system

Compilation

To compile the program, execute the following command in the project directory:

gcc -o sched_sim linked_list.c fake_os.c fake_process.c sched_sim.c -std=gnu99 -Wall

Execution

The program accepts input files specifying the sequence of events for each process. Example input file:

PROCESS 1 0
CPU_BURST 1
IO_BURST 30
CPU_BURST 1
IO_BURST 30
CPU_BURST 1
IO_BURST 30
CPU_BURST 1

To run the program, use the following command:

./sched_sim <file_process1> <file_process2> ... <file_processN>

Where <file_process1>, <file_process2>, ..., <file_processN> are the input files for individual processes.

Testing

In the test folder, there are input files for testing. To run the tests, use the following command:

./sched_sim test/*

Technical Specifications

The operating system simulator is implemented in the C programming language. Linked list management is implemented in the linked_list.c library. The main program sched_sim.c initializes the fictitious operating system, loads processes, and starts the simulation. The schedulers are implemented in the schedRR function in sched_sim.c using a round-robin algorithm. The time quantum for each core can be adjusted in the srr_args.quantum variable in sched_sim.c. Process input files follow a specific format, as shown in the test examples. For further details on the code's functionality, refer to the source code in the linked_list.c, fake_os.c, fake_process.c, and sched_sim.c files.

About

University project about cpu scheduler simulator, in wich i added a multicor functionality. It is intente as a Round-Robin scheduler.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published