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 3 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 3 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 3 years ago.
How long do you need to get it all done?
Customer: replied 3 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 3 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 3 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 3 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 3 years ago.
Hi.. How is it going?
Customer: replied 3 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 3 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 3 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 3 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 3 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 other Homework Specialists are ready to help you
Customer: replied 3 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 3 years ago.

ok thanks

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

sorry it works my mistake.

thank you

JustAnswer in the News:

Ask-a-doc Web sites: If you've got a quick question, you can try to get an answer from sites that say they have various specialists on hand to give quick answers... seen a spike since October in legal questions from readers about layoffs, unemployment and severance.
Web sites like
...leave nothing to chance.
Traffic on JustAnswer rose 14 percent...and had nearly 400,000 page views in 30 days...inquiries related to stress, high blood pressure, drinking and heart pain jumped 33 percent.
Tory Johnson, GMA Workplace Contributor, discusses work-from-home jobs, such as JustAnswer in which verified Experts answer people’s questions.
I will tell you that...the things you have to go through to be an Expert are quite rigorous.

What Customers are Saying:

  • Wonderful service, prompt, efficient, and accurate. Couldn't have asked for more. I cannot thank you enough for your help. Mary C. Freshfield, Liverpool, UK
< Previous | Next >
  • Wonderful service, prompt, efficient, and accurate. Couldn't have asked for more. I cannot thank you enough for your help. Mary C. Freshfield, Liverpool, UK
  • This expert is wonderful. They truly know what they are talking about, and they actually care about you. They really helped put my nerves at ease. Thank you so much!!!! Alex Los Angeles, CA
  • Thank you for all your help. It is nice to know that this service is here for people like myself, who need answers fast and are not sure who to consult. GP Hesperia, CA
  • I couldn't be more satisfied! This is the site I will always come to when I need a second opinion. Justin Kernersville, NC
  • Just let me say that this encounter has been entirely professional and most helpful. I liked that I could ask additional questions and get answered in a very short turn around. Esther Woodstock, NY
  • Thank you so much for taking your time and knowledge to support my concerns. Not only did you answer my questions, you even took it a step further with replying with more pertinent information I needed to know. Robin Elkton, Maryland
  • He answered my question promptly and gave me accurate, detailed information. If all of your experts are half as good, you have a great thing going here. Diane Dallas, TX

Meet The Experts:

  • LogicPro



    Satisfied Customers:

    Expert in Java C++ C C# VB Javascript Design SQL HTML
< Last | Next >
  • LogicPro's Avatar



    Satisfied Customers:

    Expert in Java C++ C C# VB Javascript Design SQL HTML
  • Manal Elkhoshkhany's Avatar

    Manal Elkhoshkhany


    Satisfied Customers:

    More than 5000 online tutoring sessions.
  • Linda_us's Avatar


    Finance, Accounts & Homework Tutor

    Satisfied Customers:

    Post Graduate Diploma in Management (MBA)
  • Chris M.'s Avatar

    Chris M.

    M.S.W. Social Work

    Satisfied Customers:

    Master's Degree, strong math and writing skills, experience in one-on-one tutoring (college English)
  • F. Naz's Avatar

    F. Naz

    Chartered Accountant

    Satisfied Customers:

    Experience with chartered accountancy
  • Bizhelp's Avatar



    Satisfied Customers:

    Bachelors Degree and CPA with Accounting work experience
  • Seanna's Avatar



    Satisfied Customers:

    3,000+ satisfied customers, all topics, A+ work

Related Homework Questions