Question
C PROGRAMMING PARSING FILE i am having trouble parsing this file in c. i',m trying to simulate a cpu scheduling algorithm that completes the execution
C PROGRAMMING PARSING FILE
i am having trouble parsing this file in c.
i',m trying to simulate a cpu scheduling algorithm that completes the execution multi threaded processes. I need to read in this data from a file and store in in order to complete the program. the file includes the number of processes, thread switch(time units to switch thread in same process), process switch(time units to switch to diffrent process). for each process there are number of threads, arrival time for each thread, number of cpu(number of cpu bursts each thread requires).
2 3 7 // number_of_processes thread_switch process_switch
1 4 // process_number(1) number_of_threads(1)
10 6 //thread_number(1) arrival_time(1) number_of_CPU(1)
1 15 400 //1 cpu_time io_time
2 18 200 //2 cpu_time io_time
3 15 100 //3 cpu_time io_time
4 15 400 //4 cpu_time io_time
5 25 100 //5 cpu_time io_time
6 240 //6 cpu_time
2 12 4 // thread_number(2) arrival_time(2) number_of_CPU(2)
1 4 150
2 30 50
3 90 75
4 15
3 27 4 1 4 400
2 810 30
3 376 45
4 652 4 28 7 1 37 100
2 37 100
3 37 100
4 37 100
5 37 100
6 37 100
7 37
2 2 10 3 1 150
2 24 5 3 22
2 1 1 1 50
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started