8000 GitHub - kael558/KernelSimulator
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

kael558/KernelSimulator

Repository files navigation

To see this readMe without all these lovely line breaks, go to the repo: https://github.com/kael558/KernelSimulator

Note: Accidently submitted ide specific files. Files necessary to run bat files are:

  • KernelSimulator.exe
  • cpu_scheduler.c
  • queue.c
  • queue.h
  • structs.h
  • inputs1, inputs2, inputs3 folders
  • outputs1, outputs2, outputs3 folders


This program simulates:
1.) Scheduling algorithms - FCFS, RoundRobin & Priority.
2.) Memory Management* - two different sets of partitions

*NOTE: It was not explicity stated in the assignment 2 document that a process remains in memory while doing IO. Therefore, I assume that IO has it's own memory, similar to a disk, as in the first assignment. So when a process is doing IO, it allows another process to run in the partition that it left.

Bat Files
test1.bat - simulates Part I. c). FCFS & Roundrobin and d). FCFS & Roundrobin - creates 4 output files
test2.bat - simulates all 3 scheduling algo's with all 6 input files (CPU, IO, CPU & IO bound 1 & 2) - creates 18 output files
test3.bat - simulates FCFS with 2 memory specs (mem1 & mem2 *see below) with all 5 input files - creates 12 output files


**Input**
Input filenames : input_____
Input syntax:
"PID arrival burst IO_freq IO_duration priority memory"
*IO_freq, IO_duration, priority, memory all may be omitted if desired.

Input examples: 1 0 20 4 1 1 200 //priority 1, memory req 200
2 0 20 4 1 2 250 //priority 2, memory req 250

1 0 20 1 200 //no IO, priority 1, memory req 200
2 0 20 2 250 //no IO, priority 2, memory req 250

Output
Output filenames : output_____
Output types:
1.) Transition - tick | pid | old_state | new_state

Memory
Memory Partitions:
TODO: have files containing partition info which can be specified on program run. E.g. load in mem1.txt which loads in those partition memory sizes
Tells the program which hardcoded partitions of memory to be used in the simulation
mem1 - 1 partition of "infinite" memory
mem2 - 4 partitions of 500, 250, 150, 100 (causes memory to be output)
mem3 - 4 partitions of 300, 300, 350, 50 (causes memory to be output)

USAGE
Usage syntax:
"KernelSimulator inputFile hasIO hasPriority hasMemory outputFile MemorySpecs SchedulingAlgo"

Usage examples:
"KernelSimulator input_CPUBound.txt false true true output_FCFS_CPUBound.txt mem1 FCFS"
Process input from input_CPUBound.txt.
Input does not contain data for IO but does contain data for priority and memory.
Simulates using FCFS & mem1 specifications.
Output into output_FCFS_CPUBound.txt

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
0