Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

-- please guys all of these in java by using ubuntu -- NOTE : PLEASE USE THE METHODS ( notifyAll() , wait() ) without use

-- please guys all of these in java by using ubuntu --

NOTE : PLEASE USE THE METHODS ( notifyAll(), wait() ) without use import semaphore

NOTE : PLEASE USE THE METHODS ( notifyAll(), wait() ) without use import semaphore

NOTE : PLEASE USE THE METHODS ( notifyAll(), wait() ) without use import semaphore

NOTE : PLEASE USE THE METHODS ( notifyAll(), wait() ) without use import semaphore

NOTE : PLEASE USE THE METHODS ( notifyAll(), wait() ) without use import semaphore

NOTE : PLEASE USE THE METHODS ( notifyAll(), wait() ) without use import semaphore

image text in transcribed

From what you have learned in lab, construct a multithreaded program to simulate the print jobs of a printer, one job at a time, your program should include the following: - A shared object called a Buffer that is initially empty. - Set1 of threads, to put data in the buffer (Write Jobs) with 1/2 second delay. - Set2 of threads, to read data from the buffer (Read Jobs) with one second delay. - The Buffer should be empty upon exiting the program. - You should not allow reading jobs from the buffer if there is none existing. - You should not allow writing new jobs if the buffer is full (say have a maximum of 20 jobs) - Deal with race conditions. - Avoid deadlocks. Use the following main class and the sample output as a guide to complete the tasks above, Assignment group: Your choice of working by yourself or in groups of four. Submission: - The source Java files for the classes in your program - A document file that includes your names \& IDs plus a summary explaining what you have done in your program formatted as follows, - Where the race condition is happening in the program and why, - How you dealt with the race condition, - Why and how the deadlock happened and how it was avoided

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

Database Processing Fundamentals Design And Implementation

Authors: KROENKE DAVID M.

1st Edition

8120322258, 978-8120322257

More Books

Students also viewed these Databases questions

Question

Explain all drawbacks of application procedure.

Answered: 1 week ago