Question

In: Computer Science

Understanding Operating Systems It seems, in this tough economy, people are resorting to borrowing books and...

Understanding Operating Systems

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 the "waitlist".  Note that for everyone's title, there could only be ONE borrower on the "waitlist" 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 "waitlist" when someone is borrowing

ii) Peter can update the "waitlist" 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 "waitlist" herself.  Otherwise, Peter, at the end of the day, should put it back on 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. 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.

Solutions

Expert Solution

Solution:

here is the solution,Thank you


Related Solutions

​It's tough to find out how much people​ earn, but in​ 2011, a magazine reported that...
​It's tough to find out how much people​ earn, but in​ 2011, a magazine reported that the average​ lawyer's salary in a country was $64,000. Suppose that today you interview a random sample of 55 lawyers in the country and find that the average salary is $75,275​, with a standard deviation of $82,694.Do you think the average​ lawyer's salary today is higher than that reported by the magazine in​ 2011? For this​ problem, assume alphaαequals=0.05. Let muμ be the population...
After a dismal start to 2019, the U.S. economy seems to be speeding up in the...
After a dismal start to 2019, the U.S. economy seems to be speeding up in the spring. Growth has appeared to speed up towards the end of the 1st quarter, and after such signs, economists have been ratcheting up their estimates for 1st quarter GDP. Positive areas include a resurgence in consumer spending, a declining U.S. trade deficit, and a solid labor market. Does the United States economy seem to be safe from a recession in the near future?
How to reach people when there seems to be a decline in captive audience and users...
How to reach people when there seems to be a decline in captive audience and users in the 20s - 30s demographic.
CSC241_FA20_01 Windows Server Operating Systems
CSC241_FA20_01 Windows Server Operating Systems
what is Cloud and IoT Operating Systems ?
what is Cloud and IoT Operating Systems ?
Understanding correlations in complex systems is crucial in the face of turbulence, such as the financial...
Understanding correlations in complex systems is crucial in the face of turbulence, such as the financial crisis of 2008. However, in complex systems such as financial systems, correlations are not constant but instead vary in time” (Preis, Kenett, Stanley, Helbing, & Ben-Jacob, 2012). In this module, we are moving back to the stock market. Reliable estimates of correlations are necessary to protect a portfolio. Looking at the last quarter of 2008, do you see any patterns between consumer confidence and...
Does someone have the answer to the Systems understanding aid, (SUA) ?
Does someone have the answer to the Systems understanding aid, (SUA) ?
. 1. In the Operating System zoo describe the 4 different types of Operating Systems and...
. 1. In the Operating System zoo describe the 4 different types of Operating Systems and describe them. 2. What is a process, when are they created and when are they terminated.
Imagine an economic situation, where people are increasingly borrowing more and spending more at a low...
Imagine an economic situation, where people are increasingly borrowing more and spending more at a low interest rate. Assets' values are also growing at a faster rate. However, the productivity of the businesses is growing at a fixed rate that is lower than the interest rate. Do you think this situation is sustainable? In the long run, how the lenders, borrowers, and businesses would be affected by such an economy?
2. One personality dimension that seems well recognized by most people is that of introversion-extroversion. Extroverts...
2. One personality dimension that seems well recognized by most people is that of introversion-extroversion. Extroverts are described as outgoing, sociable, and fun-loving, whereas introverts are described as reserved and less sociable. Because introverts seem more directed toward their own thoughts and ideas, we might suspect that introverts and extroverts may respond differently to external stimulation such as noise. To more fully investigate this issue, Standing, Lynn, and Moxness (1990) used a 2 ✕ 2 between-subjects design to vary personality...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT