Hi programmers, i need to have a code to produce a round robin algorithm.
Can you help me??

The requirements are that it must have:

A menu system with the options (1 input data manually-if option 1 is selected a)to read data from file, b)to enter data by hand, 2-automatic generation that will then be stored or read from a file data.txt)

2) To either read all data (processes) to generate a temp queue or read each process data from the file (data.txt)

3) Define a node to represent process control block (all info to deal with processes i.e. process id, NUT, AT..) each queues should read pointer which points to the next node.

(e.g. process id -> from the data.txt -> store info related to NUT -> status W-waiting, R-reading and F-completed)

4) function to sum the file and pick at data for nodes where AT matches. generate the nodes and add them to appropriate queue.

5) function to move a node to of one list to the bottom of the second list

6) function to move a node top of a list to the bottom

7) function that will traverse the list and incriment the priority

8) function to create a display for every literation of T

9) function to remove a node from the list

program must have 2 linked lists (a linked list called new with a loop to check if T matches from the file (data.txt) and scan process to pick the rows where T matches AT-arrival time. And the second linked list called ready where the nodes would be moved)

An example of program output:

T A B C
0 R W -
1 W R -
2 R W W
3 F R W
4 F W R
5 F R W
6 F F R
7 F F F

Each run should stop when all processes have F status; where T shows each unit cycle of time

PLEASE HELP..THANKS!

Recommended Answers

All 2 Replies

Man, this is getting boring! How many times do we have to tell folks that we do NOT do your homework for you! Make an effort. Post your code (with errors) and we may be able to help you, but until then... Have a nice day!

Getting a private auto-message for an sponsored post, and coming here to find homework.. just screwed my mood.

commented: Just came across this post. Sorry DaniWeb failed you :( We'll do better +32
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.