Question: Someone write comments to each line of code what is going in code. #include #include #include #include struct ProccessBlockList { int burstTime; [/Time to finish

Someone write comments to each line of code what is going incode. #include #include #include #include struct ProccessBlockList { int burstTime; [/Time toSomeone write comments to each line of code what is going in code.

#include #include #include #include struct ProccessBlockList { int burstTime; [/Time to finish a process execution char *state; //'Waiting', 'Ready'or 'Running' int Processin; // Unique identifier of a processes }; struct ProccessBlockList *pcb() { struct ProccessBlockList p; p.state="Ready"; p.burstTime=5; } struct ProccessBlockList addProcess(int PID) { struct ProccessBlockList pid; printf("\t\tEnter Burst Time for Process [%d] :: ",PID); scanf("%d",&(pid.burstTime)); pid. ProcessID = PID; return pid; } struct ProccessBlocklist updateProcessBlock(char *5) { struct ProccessBlockList st; st.state=S; return st; } struct ProccessBlockList executeProcess(struct ProccessBlockList b, int time) { printf("\t\t>>>>> ", b.ProcessID); b.state="Running"; printf("Process ID .: %d ", b.ProcessID); printf("Process State: %s ", b.state); printf("Burst Time :: %d ", b.burstTime); printf("Port No : %d ", rand()%5000); printf("File Descripter :: %d ", b.ProcessID); b.burst Time -= time; if(b.burst Time > 0) printf("Remaining Time :: %d ", b.burst Time); printf(" \t\t>>>>>> Save the PCB of Process %d >>>>>Process %d state is %s 0) { if(plist[i].burstTime >= timeslot) { plist[i].state; // Load the PCB of process number i plist[i] = execute Process(plist[i], timeSlot); //Run the Process t_time == timeSlot; //Decrement the Total Time } } } } return 0; }

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!