![]() ![]() ![]() for each process on the scheduler's linked list, increase the waiting time.The function to increase the current time would: It should have a global currently_running_process variable, a global current_time variable, one function to increase the current time, and one function for the scheduler itself. My advice is, rewrite it from scratch instead of fixing it. C PROGRAMMING ROUND ROBIN SCHEDULING CODEI thought about rewriting it from scratch and just posting the resulting code but that's not going to help you with your homework. Mostly, if I were being paid to fix this code I'd simple throw it out and rewrite it from scratch to save time. no is not a boolean "yes/no" variable, checkprocess() doesn't check one process but checks all processes to see if all processes have finished, etc). ![]() However I spent 10 minutes trying to decipher your code and still don't really know what it thinks it's doing - there's no comments at all and the variable names and function names don't help (e.g. I'm sure there are many bugs (starting with not caring if the user wants to enter 11 or more processes even though your array of processes is limited to 10). Process.ratio = (float)process.turnaround / (float)process.burst Process.turnaround = process.wait process.burst Printf("\n\n Process Arrival Burst Waiting Finishing turnaround Tr/Tb \n") Printf("\n \n Enter the time slice of the CPU: ") Printf("\n \n Enter the number of processes: ") Here's my code, can anyone please help me fix it and get the above results? #include My output must be: Process AT BT WT TT FTÄ«ut I am not getting the correct results(WT
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |