Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Using C or C++, and a linked list structure, please complete the following... Create a C or C++ program that reads a list of process

Using C or C++, and a linked list structure, please complete the following... 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

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

Students also viewed these Databases questions

Question

Critical reasoning is an important antecedent to change.

Answered: 1 week ago