Control the concurrency of your solution

Assignment Help Operating System
Reference no: EM131238048

Design and Programming Assignment Operating Systems

This is an open book assignment and you may use the course materials and peer reviewed sources. However, this excludes the use of any other people and all materials that are not peer reviewed. You must cite all references.

Description

For this problem you must use Java's semaphore class. Your implementation for this problem must only use the semaphore methods to control the concurrency of your solution (IE. acquire and release).

Consider a small take-out food restaurant called Burrito Brothers. This very popular establishment offers a VERY-TASTY burrito. There are three servers that own a private beef area, a cheese area, and a tortilla area (IE. Each server has their own ingredients in an infinite supply). Additionally there are three shared counter locations, a shared cash register and a shared waiting area that can accommodate up to 15 customers. By law the shop has a maximum customer capacity of 15.

A customer cannot enter the shop if it is filled to capacity. If the there is room a customer will gain access to the shop. Each customer will enter the shop with an order of one to 20 burritos. As soon as a server is free, the customer that has the shortest order is served next.

A server is either servicing a customer or waiting. Each server will make (at most) three burritos at time for a given customer. Once a server has obtained all ingredients, a burrito can be made. When a customer's entire order is finished, the customer pays a cashier and leaves the shop. Since there is only one cash register, only one patron may pay at a time. However, in the event that a customer's entire order has not been filled by the server at the completion of the current counter visit the customer must reenter the waiting area. The waiting area is organized by the shortest order next.

Implement a solution to this problem as a Java application using the Java semaphore class for synchronization. Your zip file must expand into a single directory and your application must compile at the command prompt using javac *.java. Output must include the arrival of each customer and each state transition: leaving full shop, entering shop with an order of m burritos, customer standing, getting service from server n, paying, and leaving. Each customer is represented by a corresponding thread and each server in your implementation is also represented by a unique Java thread. All customers and servers exist within a single application.

The finished assignment must include the following (submitted to Blackboard as a ZIP file that extracts to a single level directory for this problem):

- A detailed design document fully describing your work. This must be a clear and concise document that rigorously addresses the decisions and design elements that support your solution to this concurrency and synchronization problem. See the Methodology, Design, and Writing link in My Course Content in Blackboard for design elements. You must pay close attention to maintaining a consistent flow in form. The document must be well written and should be proofread for detail and accuracy. Use double spacing throughout the document and the font should be Times Roman or a similar serif typeface. Use citation to provide evidence of your analysis. Citations and references should be in APA format. Use 12 point for the body of the text.

- The Java Burrito Brothers Implementation
o The Java Source Code
o Class files
o The system must compile using the command: javac *.java. The system must run using the command: java Burrito <optional parameters>.
o Output from a run of your application.

Reference no: EM131238048

Questions Cloud

Explain why a school violence prevention program : Describe features you would most want the program to have, citing at least four specific examples of programs or intervention strategies that apply to the level you have chosen. Be sure to include the aspects to avoid in designing your program.
Draw the lewis structure for formaldehyde : Draw the Lewis structure for formaldehyde, H2CO, a compound whose odor is known to most biology students because of its use as a preservative. Show a structure with dots only, and then show one with both dots and dashes.
Brief literature review of the research topic : A business research topic. Strengthen and improve initial proposal. A brief literature review of the research topic. Produce 2 to 3 pages on background information on your research topic
Describe the original miranda case : Describe the original Miranda case and the statements required for making a valid Miranda warning. - Explain under what circumstances Miranda rights are triggered.
Control the concurrency of your solution : Your implementation for problem must only use the semaphore methods to control the concurrency of your solution - This must be a clear and concise document that rigorously addresses the decisions and design elements that support your solution to thi..
How do products change when this reactant is in short supply : What is absorbed during bond breaking but liberated during bond formation? Name the two products of the complete combustion of hydrocarbons. What is the other reactant, and how do the products change when this reactant is in short supply?
Budget be spent on a website developer : How should you address the president's suggestion that the entire budget be spent on a website developer?
Class human resource emerging issues : 1) What effect does a diverse workforce have on employee engagement? 2) How are Millennials different from Baby Boomers when it comes to employee engagement?
Is the reaction exothermic or endothermic : What term applies to the substances at point A?

Reviews

Write a Review

Operating System Questions & Answers

  Can anyone think of any computer related product

Did you feel reluctant to continue using it or did you make an effort to locate a similar product more in tune with your expectations?

  Microsoft traditional and current name resolution approaches

Determine Microsoft traditional name resolution approaches and Microsoft current name resolution approaches also discuss the differences between them?

  Organization institutionalizes policies

The answer gives the learner with an understanding of management's role in the development and enforcement of data security policies, standards, practices, precess and guidelines.

  Implement a separate memory component

Generate 10,000 requests using the request generation component, and for each request, invoke the appropriate function of the Memory component for each of the memory allocation/deallocation techniques.

  What is the overall big-o of this algorithm?

What is the overall Big-O of this algorithm?

  Marginal and average cost curves

n a competitive market place (pure competition) is it possible to continually sell your product at a price above the average cost of production.

  Identify a trend that could influence the development

Identify a trend that could influence the development of future operating systems

  Information-level design for college requirements

Database at college is needed to support following requirements. Complete information-level design for this set of requirements. Use your own experience to find out any constraints you require which are not stated in problem

  Question about sarbanes oxley act in the us

Sarbanes-Oxley Act in the United States has greatly increased the compliance obligations of publicly traded corporations.

  Do you think that files are stored in consecutive sectors

All files may grow dynamically during execution without giving the operating system any advance information about their ultimate size. Do you think that files are stored in consecutive sectors? Explain.

  As computers have evolved the complexity of operating

write 400-600 words that respond to the following questions with your thoughts ideas and comments. this will be the

  Components and functions of a linux operating system

Define the necessary components and functions of a Linux operating system.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd