How JustAnswer Works:
  • Ask an Expert
    Experts are full of valuable knowledge and are ready to help with any question. Credentials confirmed by a Fortune 500 verification firm.
  • Get a Professional Answer
    Via email, text message, or notification as you wait on our site.
    Ask follow up questions if you need to.
  • 100% Satisfaction Guarantee
    Rate the answer you receive.
Ask R.R. Jha Your Own Question
R.R. Jha
R.R. Jha, Tutor
Category: Homework
Satisfied Customers: 5471
Experience:  B.Tech
Type Your Homework Question Here...
R.R. Jha is online now
A new question is answered every 9 seconds

Im writing a C program

This answer was rated:

Im writing a C program about a scheduling algorithm, Ive done a big part of it but i cant get it work properly and my deadline is tomorrow.

I can send the full info and my code

Hi there,

I will be helping you with the requirement.
Can you please post the files...

Thank you
Customer: replied 4 years ago.


can you please add comments so i can understand

How much time is left for deadline...
I am travelling at present...
Will leave you a message after reviewing your files...
Customer: replied 4 years ago.
I need it in 5-6 hours
I am sorry 5 - 6 hrs. is to less for the code to make it executable because it will take around 5- 6 hrs to first understand what you have implemented than I will have to see for the changes required.

So I will opt out for other experts to help you within your time frame.

Have a Good Day.
Customer: replied 4 years ago.
How long do you need to get it all done?
Customer: replied 4 years ago.
Relist: Other.
cant help within deadline

I'd be glad to help. I could finish it and send by tomorrow. Let me know if that works for you.
Customer: replied 4 years ago.


my deadline is tomorrow morning so it has to be ready by 7AM or 8AM maximum thats seven hours can you do it? I did most of it but I cant get it to work as I dont know how to deal with pointers that well.


Which time zone are you in?
I'll go through your code. I think I might have to start from scratch, by the first look of it.
Customer: replied 4 years ago.
Im in the Uk .. Can you please add as muxh comments as you can
Ok, that's a tight deadline, but I'll give it a go.
And please send the files again, it's showing error on dropbox.
Customer: replied 4 years ago.

I would really appreciate it if you can get it done in time, I'm going to bed know here are all the files:

Received them, I'll try my best.
Customer: replied 4 years ago.
Hi.. How is it going?
Customer: replied 4 years ago.

can you please cancel the question

I was working on it. Might need some more time. Do you no longer need help with this?
Customer: replied 4 years ago.

ok I will wait but it has to be done in a couple of hours as im past my deadline.

Ok, I'll get back to you in a couple of hours.
Almost done. Do you have any sample output to verify the program?
Customer: replied 4 years ago.

A display for 3 processes labelled A, B and C. Where

A requires 2 units of time NUT = 2, and arrival time AT = 0.

B requires 3 units of time NUT = 3, and arrival time AT = 0.

C requires 2 units of time NUT = 2, and arrival time AT = 2.


And the unit time allowed for each process UT = 1 with the two incremental factors ready_list = 2; accepted_list = 1


Note when two or more processes have an equivalent arrival times then queue them in the order they arrive i.e. 1st come 1st on the queue.


Assume processes are migrated from the ready_list to the accepted_list at the end of a timecycle



Your program should then display



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.


Finally your program should display the stats associated with each processes throughput, namely arrival time, start time, wait time, completion time, NUT, penalty ratio.

Ok, I'll check my output, make corrections if any and get back to you.
Ok, I got it working. Only difference from your output occurs when accepted queue is having a single process and a new process is about to be accepted. Then, old process in accepted queue runs again in next time slice because new process joins it at tail. This, toggles their W and R from the situation if new process were directly running on the accepted queue. This might change their wait and finish time by 1 time slice.

But I believe that serves the purpose of the simulation of a selfish round robin scheduler. If you're happy with that, I'd send the program.

Customer: replied 4 years ago.
Yes I think thats how it works, can you cancel the link after i dowload?
Yes, I'd do that as soon as I receive the rating. And just checked the code for the process schedule given in the powerpoint presentation you sent. It's giving the same output as the table in the ppt. So, I'm sure my code is working correctly. Should I send the file now?
Customer: replied 4 years ago.
Yes but i cant chrck it now as im busy ill chrck it in the next hour

You need to spend $3 to view this post. Add Funds to your account and buy credits.
R.R. Jha, Tutor
Category: Homework
Satisfied Customers: 5471
Experience: B.Tech
R.R. Jha and 2 other Homework Specialists are ready to help you
Customer: replied 4 years ago.

I dont think it working correctly its not behaving like in the ppt if you can fix that, also if you can add an option to load the info from a file.


here are some questions I have


void move_to_list(proces **list1, proces **list2); // what does the 2 ** mean?


get_process_list(&process_list, &quanta, &a_inc, &b_inc);// why & ?


(*accepted_list)->state[t_slice] = 'R'; // why ()

It's working as in ppt. I'll send the output and answer to your questions.
Customer: replied 4 years ago.

ok thanks

You're welcome
Customer: replied 4 years ago.
How is it going?
Customer: replied 4 years ago.

sorry it works my mistake.

thank you

Related Homework Questions