subject

Class X has synchronized methods S1 and S2. Consider an instance xinstance of class X, consumer threads T1 and T2, and supplier thread T3, and the following sequence of actions on xinstance: Thread T1 enters method S1, and at some point issues a wait(), because T3 hasn't supplied yet Subsequently, thread T2 enters method S1, and at some point issues a wait(), because T3 hasn't supplied yet Finally, thread T3 enters method S2, fills in the supply, issues a notifyAll(), finishes and exits S2 Assume that T3's supply is sufficient for only one of the consumers, and that once T3 has finished executing S2 as above, it is terminated (i. e. it will not return to S2 again). But T1 and T2 are insatiable and will want to keep coming back to method S1 for more. Assume that there is no attempt by the application to safely terminate either T1 or T2, i. e. they are allowed to keep running. Required:
List ONE plausible sequence of thread states that T1 and T2 might go through, starting from the time they issue a wait(), as described above, up to the time when there will not be any more state changes.

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 03:00
State 7 common key's for every keyboard
Answers: 1
question
Computers and Technology, 23.06.2019 05:30
Sally is editing her science report about living things. she needs to copy a paragraph from her original report. order the steps sally needs to do to copy the text to her new document.
Answers: 1
question
Computers and Technology, 23.06.2019 20:00
What software programs are used to to create professional publication? a.) graphics programs b.) word processors c.) page layout programs d.) spreadsheet programs
Answers: 2
question
Computers and Technology, 24.06.2019 07:00
Why would a business likely use a java applet - to back up their data files for the business - to create a program that a customer can launch in their web browser - to create music on a powerpoint presentation - to organize files on their company directory
Answers: 3
You know the right answer?
Class X has synchronized methods S1 and S2. Consider an instance xinstance of class X, consumer thre...
Questions
Questions on the website: 13722367