Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribedimage text in transcribedSomeone 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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

PostgreSQL Up And Running A Practical Guide To The Advanced Open Source Database

Authors: Regina Obe, Leo Hsu

3rd Edition

1491963417, 978-1491963418

Students also viewed these Databases questions

Question

How do Excel Pivot Tables handle data from non OLAP databases?

Answered: 1 week ago