Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please help with the following program (Using C or C++)! Create a C or C++ program that reads a list of process names and integer

Please help with the following program (Using C or C++)!

image text in transcribed

Create a C or C++ program that reads a list of process names and integer times from stdin/cin and simulates round-robin CPU scheduling on the list. The input is a list of lines each consisting of a process name and an integer time, as shown below ProcesSA 4 ProcessB 10 Read the list and represent it in a linked list data structure and use the alarm system call to schedule a timer interrupt every 2 seconds. The interrupt handler should pick the next process from the process list and write out how much time the process has left to execute, as shown below ProcesSA 4 Update the time left to execute by subtracting 2 seconds and returning it to the end of the queue. If the process runs out of time, the write something like ProcessA Finished then delete the process from the linked list. If we have no more processes left, you write a message saying No processes left And exit the program

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_2

Step: 3

blur-text-image_3

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

Securing SQL Server Protecting Your Database From Attackers

Authors: Denny Cherry

2nd Edition

1597499471, 978-1597499477

More Books

Students also viewed these Databases questions

Question

Understanding Group Leadership Culture and Group Leadership

Answered: 1 week ago