Expert
1620 Order Completed 95 % Response Time 204 Reviews Since 2014

Computer security homework helper in Leeds

Leeds, UK

 Alex N


Masters in Computer Science, Leeds Trinity University

Profession

Computer security homework helper in Leeds

Skills

Don’t know where to get the best computer security homework helper in Leeds? I am a master's graduate in computer science specialized in computer security. I have been offering computer security assignment help for the last 10 years. Over this period I have interacted with students from all corners of the world helping them score good grades. Even though I am based in Leeds you can hire me to help you regardless of your geographical location. Contact me today and have an easy time in college as I get you the right computer security assignment solutions.

Get Free Quote


 Your Order has been sent successfully. We will contact you as soon as possible.
Error: Please try again

Operating systems Programming

Design Document

The purpose of this document is to discuss the classes and objects and how they all work together to meet the requirements.

Counter

A counter represents a table where the servers will work. Each counter runs as a separate thread. They use a semaphore to make them force to wait. They will only proceed to work when a customer enters the waiting area. By then, they get notified and then proceed to serve the next customer from the waiting area. A counter will stop if all customers have been served on the entire duration of the simulation.

Waiting Area

A waiting area is where incoming customers will sit down and wait for them to be called. The waiting area is protected by a semaphore so that it is being accessed by one thread at a time (Counter and Customer Threads). Another purpose of a waiting area is to identify the next customer to be served when one of the counters becomes available. The next customer to be processed is the one with the smallest number of orders. Once they are picked by an available counter, they will leave the waiting area and go to the counter. Since the customer is still inside the shop, the number of customers in the shop will still remain the same. The number of customers in the shop will only decrease if the customer leaves the shop which happens when they have received all their orders.

Customer

A customer represents an individual person who goes into the shop to buy 1 to 20 burritos. Each customer runs as a separate thread. They come at a random time then go into the waiting area. They will be rejected from the waiting area if it is already full, otherwise, they go in and seat down and wait for a server to call them. Once a customer is called by a server, their orders will be processed but up to 3 burritos only. If there are more burritos left then they go back to the waiting area. Otherwise, they go to the cashier and do their payment. After the cashier, they leave the shop. The last customer that leaves the shop will trigger the exit point of the counter (Server) threads.

Cashier

The cashier is protected by a semaphore to be used by 1 customer at a time only. The cashier is where customers pay before they get out of the shop.

Main

The main class is the entry point of the program. The program can be run in 2 options. The first option is without arguments in which it will use the default configuration. The second option where we can use custom configuration values for simulation. The default configuration uses 3 counters, 15 customers, and a minimum of 1 burrito order per customer, a maximum of 20 burrito orders per customer, 15 customer limit in the waiting area, and the number of burritos each server can produce for each customer. The main class will create all threads and run them at the same time. The main class will wait for all these threads to finish before terminating.