Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In this case, we are simulating Prof. Gendreau s ( A retired CS Professor, Prof. Gendreau served UWL CS dept. for 3 6 years )

In this case, we are simulating Prof. Gendreaus (A retired CS Professor, Prof. Gendreau served UWL CS dept.
for 36 years) Office Hours. Students come to Prof. Gendreaus office hours for different purposes: ask a question,
advising help, or demo a project. For each of these types of visits, there is an amount of time it will take the
student to get help or demo. Each student has certain days when they can attend office hours, but all students
can attend at least one day a week. Prof. Gendreau also only has so much time for office hours before he needs
to leave to teach or go home, and has a schedule of office hours. He uses a FIFO strategy for meeting with
students. Your task is to simulate how Prof. Gendreau spends his office hours. You will calculate the total
number of students who have visited, the total amount of time spent helping students, the total time spent
waiting by the students, and the number of students who are still waiting at the end of the day. If a student
starts a visit and Prof. Gendreau has to leave before the visit is over, that student is not done and will need to
meet with Prof. Gendreau next time for the remaining amount of time.
1.2 Secondary Implementation - Priority
Now that you have a FIFO implementation you will notice that if a student with a long session with
Prof. Gendreau will cause everyone else to wait a long time. It may not be fair for a student who needs to
demo or who has an advising question to wait for such a long time. You will extend your implementation
to allow Prof. Gendreau to prioritize what visits he will attend to first, while the others will wait. You will
be able to specify which type of visit has high priority and the other two types will have lower priority. To
break a tie between two different visits of the same priority, you will use the arrival order (just like in FIFO).
Finally, you will run your code with the different priorities and discuss the costs and tradeoffs between
prioritizing the different types of visits and the original FIFO implementation. Your write up will consist of:
(1) a paragraph describing the two different algorithms used to schedule office hours (FIFO and Priority),
(2) a paragraph describing the advantages and disadvantages of a priority-based algorithm for scheduling
office hours, (3) argue for which algorithm you think is best for this particular problem and why. You will
include these paragraphs in a block comment at the top of your simulator.c file. Be sure to write in complete
sentences with proper grammar, punctuation and spelling, and make a well-reasoned argument. You are
encouraged to include examples from your runs or real life to support your claims.

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

Recommended Textbook for

Handbook Of Database Security Applications And Trends

Authors: Michael Gertz, Sushil Jajodia

1st Edition

1441943056, 978-1441943057

More Books

Students also viewed these Databases questions