Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

It seems, in this tough economy, people are resorting to borrowing books and dvds from the library rather than buying or renting from stores. Your

It seems, in this tough economy, people are resorting to borrowing books and dvds from the library rather than buying or renting from stores. Your library continues to thrive. You have expanded and added staff - besides you, you now have two library assistants, Peter and Jane. Peter is assigned to receive returned books, dvds and magazines, while Jane is in charge of lending out books and items.
As you only have a finite amount of titles to lend, you have also instituted a "Wait List" for your borrowers. If the book or dvd they're borrowing is not available, they will be put on "wait list". Note that for every one title, there could be only be ONE borrower on the "wait list" at a time.
Being new to your library, you must devise a system for Jane and Peter to follow so that:
i) Jane can check the "wait list" when someone is borrowing
ii) Peter can update the "wait list" when a book is returned
iii) If the book recently returned is immediately borrowed on the same day, Jane should be able to come to Peter to get the book and update the "wait list" herself. Otherwise, Peter, at the end of the day, should put it back to the shelf.
iv) Jane and Peter can generate a report summarizing the titles borrowed and returned that day.
The key here is Jane and Peter should be synchronized in what they are going to do. Device a solution (an algorithm, pen-and-paper approach, or series of steps) to enable this new process. A software is not a solution (ie - use an SQL database or a third party program). Apply methodologies such as test-and-set, Wait-and-signal and semaphores to assist you in synchronization.

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

Oracle Database 10g Insider Solutions

Authors: Arun R. Kumar, John Kanagaraj, Richard Stroupe

1st Edition

0672327910, 978-0672327919

More Books

Students also viewed these Databases questions