1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Len [333]
3 years ago
9

Considering the following algorithm, which of the following requirements are satisfied?

Computers and Technology
1 answer:
Alisiya [41]3 years ago
4 0

Answer:

b) Bounded Waiting

Explanation:

int currentThread = 1;

bool thread1Access = true;

bool thread2Access = true;

thread1 { thread2 {

While (true) {

                   While (true)

                                   {

                     while(thread2Access == true)

                                       {

                                      while(thread1Access == true)

                                       {

                                            If (currentThread == 2) {

                                              If (currentThread == 1)

                                                {        

                                                  thread1Access = false; thread2Access = false;

                                                  While (currentThread == 2);

                                                 While (currentThread == 1);

                                                  thread1Access = true; thread2Access = true;

} }

/* start of critical section */ /* start of critical section */

currentThread = 2 currentThread = 1

… ...

/* end of critical section */ /* end of critical section */

thread1Access = false; thread2Access = false;

… ...

} }

} }

} }

It can be seen that in all the instances, both threads are programmed to share same resource at the same time, and hence this is the bounded waiting. For Mutual exclusion, two threads cannot share one resource at one time. They must share simultaneously. Also there should be no deadlock. For Progress each thread should have exclusive access to all the resources. Thus its definitely the not the Progress. And hence its Bounded waiting.

You might be interested in
What is the body of scientific knowledge based on?
ANTONII [103]
It depend on all such as guess ,observation ,hypothesis and etc
3 0
2 years ago
Read 2 more answers
Identify 5 internal and external hardware components of a server
UNO [17]

Answer:

Internal:

#CPU; That retrieves &execute instructions.

#Modem; Modulates& demodulates electric signals.

#RAM;Gives application a place to store &access data on a short time periods.

External:

#Mouse; Transmits commands and controlling movements.

#Moniter; Device used to display video output from computer.

#Printer; Accepts text, graphics to the paper.

Explanation:

Hope this will help you.

5 0
2 years ago
Ben chang noticed that his store was lagging in sales . He realized that his staff was not experienced enough . As the store man
dem82 [27]
Ben should set up a program to teach his staff about customer service, and communicating with clients. 
4 0
2 years ago
Read 2 more answers
Your license can be canceled if you __________
Elena L [17]
Its B i think hope this helps ! 
8 0
3 years ago
Read 2 more answers
How to remove negative feedback on amazon?
Svetlanka [38]
1. go back to the feedback you submitted
2.Locate the order, and then click remove 
3.select a reason for the removal and click to remove the feedback button.

(But why would you write a rude comment in the first place to begin with?)
3 0
3 years ago
Other questions:
  • Why is knowledge of percent composition important in the mining process?
    7·1 answer
  • While engineers work to create computers that can understand us emotionally, ________ are also evolving toward a more human appe
    12·1 answer
  • Which action could be used to determine if a host is compromised and flooding traffic onto the network?
    6·1 answer
  • Using the syntax in section 2.3, write a command delete_all_rights (p, q, s). this command causes p to delete all rights the sub
    13·1 answer
  • Which protocol is used by the client for microsoft networks and file and printer sharing for microsoft networks to communicate w
    10·1 answer
  • What is the safest way to install a new flash drive
    7·2 answers
  • What is the safest way to shut down a desktop or laptop computer?
    8·1 answer
  • Advancements in nuclear science have led to technological advances which are both harmful and beneficial. Which would be conside
    15·1 answer
  • Choose the term that matches each description.
    15·1 answer
  • The reason why our computers can get faster without getting bigger is because of...
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!