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: 5443
Experience:  B.Tech
20870358
Type Your Homework Question Here...
R.R. Jha is online now
A new question is answered every 9 seconds

Im writing a C program

Resolved Question:

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

Submitted: 1 year ago.
Category: Homework
Expert:  Raj replied 1 year ago.
Hi there,

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

Thank you
Customer: replied 1 year ago.

https://www.dropbox.com/s/hswtauypfg5dxls/r-roubin.c?m


 


https://www.dropbox.com/s/qnaz609h3uymbhq/Shelfish%20Round%20Robin.docx?m


 


can you please add comments so i can understand

Expert:  Raj replied 1 year ago.
How much time is left for deadline...
I am travelling at present...
Will leave you a message after reviewing your files...
Customer: replied 1 year ago.
I need it in 5-6 hours
Expert:  Raj replied 1 year ago.
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 1 year ago.
How long do you need to get it all done?
Customer: replied 1 year ago.
Relist: Other.
cant help within deadline
Expert:  R.R. Jha replied 1 year ago.
Hi,

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

hi..


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.


thanks

Expert:  R.R. Jha replied 1 year ago.
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 1 year ago.
Im in the Uk .. Can you please add as muxh comments as you can
Expert:  R.R. Jha replied 1 year ago.
Ok, that's a tight deadline, but I'll give it a go.
Expert:  R.R. Jha replied 1 year ago.
And please send the files again, it's showing error on dropbox.
Customer: replied 1 year 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:


 


https://www.dropbox.com/s/605lk08q5yhrms7/r-roubin.c?m


 


https://www.dropbox.com/s/3k1fsyqbuv2ojxm/Shelfish%20Round%20Robin.docx?m


 


https://www.dropbox.com/s/k81jdesf8km5rbm/lecture%2012.ppt?m

Expert:  R.R. Jha replied 1 year ago.
Received them, I'll try my best.
Customer: replied 1 year ago.
Hi.. How is it going?
Customer: replied 1 year ago.

can you please cancel the question

Expert:  R.R. Jha replied 1 year ago.
I was working on it. Might need some more time. Do you no longer need help with this?
Customer: replied 1 year ago.

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

Expert:  R.R. Jha replied 1 year ago.
Ok, I'll get back to you in a couple of hours.
Expert:  R.R. Jha replied 1 year ago.
Almost done. Do you have any sample output to verify the program?
Customer: replied 1 year 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


 


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.


 


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

Expert:  R.R. Jha replied 1 year ago.
Ok, I'll check my output, make corrections if any and get back to you.
Expert:  R.R. Jha replied 1 year ago.
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.


Thanks
Customer: replied 1 year ago.
Yes I think thats how it works, can you cancel the link after i dowload?
Expert:  R.R. Jha replied 1 year ago.
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 1 year ago.
Yes but i cant chrck it now as im busy ill chrck it in the next hour
Expert:  R.R. Jha replied 1 year ago.
THIS ANSWER IS LOCKED!
You can view this answer by clicking here to Register or Login and paying $3.
If you've already paid for this answer, simply Login.
R.R. Jha, Tutor
Category: Homework
Satisfied Customers: 5443
Experience: B.Tech
R.R. Jha and 4 other Homework Specialists are ready to help you
Customer: replied 1 year 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 ()

Expert:  R.R. Jha replied 1 year ago.
It's working as in ppt. I'll send the output and answer to your questions.
Customer: replied 1 year ago.

ok thanks

Expert:  R.R. Jha replied 1 year ago.
You're welcome
Customer: replied 1 year ago.
How is it going?
Customer: replied 1 year 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... Justanswer.com.
JustAnswer.com...has seen a spike since October in legal questions from readers about layoffs, unemployment and severance.
Web sites like justanswer.com/legal
...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
< Last | 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:

 
 
 
  • Manal Elkhoshkhany

    Tutor

    Satisfied Customers:

    4520
    More than 5000 online tutoring sessions.
< Last | Next >
  • http://ww2.justanswer.com/uploads/BU/BusinessTutor/2012-2-2_115741_Kouki2.64x64.jpg Manal Elkhoshkhany's Avatar

    Manal Elkhoshkhany

    Tutor

    Satisfied Customers:

    4520
    More than 5000 online tutoring sessions.
  • http://ww2.justanswer.com/uploads/LI/lindaus/2012-6-10_04811_IMG20120609164157.64x64.jpg Linda_us's Avatar

    Linda_us

    Finance, Accounts & Homework Tutor

    Satisfied Customers:

    3121
    Post Graduate Diploma in Management (MBA)
  • http://ww2.justanswer.com/uploads/ComputersGuru/2010-02-13_051118_Photo41.JPG LogicPro's Avatar

    LogicPro

    Engineer

    Satisfied Customers:

    3035
    Expert in Java C++ C C# VB Javascript Design SQL HTML
  • http://ww2.justanswer.com/uploads/lanis/2009-4-1_233717_phput9xef_c1pm.jpg Lani S.'s Avatar

    Lani S.

    Tutor

    Satisfied Customers:

    2457
    Registered Nurse, Internet Researcher, Private Tutor
  • http://ww2.justanswer.com/uploads/chooser77/2009-08-18_162025_Chris.jpg Chris M.'s Avatar

    Chris M.

    M.S.W. Social Work

    Satisfied Customers:

    2341
    Master's Degree, strong math and writing skills, experience in one-on-one tutoring (college English)
  • http://ww2.justanswer.com/uploads/JawaadAhmed/2009-6-27_12137_SIs_SHadi.jpg F. Naz's Avatar

    F. Naz

    Chartered Accountant

    Satisfied Customers:

    1975
    Experience with chartered accountancy
  • http://ww2.justanswer.com/uploads/JK/jkcpa/2011-1-16_182614_jkcpa.64x64.jpg Bizhelp's Avatar

    Bizhelp

    CPA

    Satisfied Customers:

    1873
    Bachelors Degree and CPA with Accounting work experience