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
Is designed to access a computer or operating system without the knowledge or permission of the user.
kramer

Answer:

Spyware

Explanation:

Spyware is a type of program that is installed with or without your permission on your personal computers to collect information about users, their computer or browsing habits tracks each and everything that you do without your knowledge and send it to remote user.

5 0
2 years ago
Oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo
mihalych1998 [28]

Answer:

ooooooooo[soooooooo ioooo egg vn

8 0
3 years ago
Which type of work is an electrical engineer most likely to do?
yKpoI14uk [10]

Answer:

B

Explanation:

design and analyze electrical devices

7 0
3 years ago
A computer ia a personal computer you can carry from place to place​
tester [92]

Answer:

laptop is portable and wireless

5 0
3 years ago
Read 2 more answers
Computers that are connected to each other, but not to the internet,
Sladkaya [172]

Answer:

The answer to this question is given below in the explanation section.

Explanation:

Computers that are connected to each other, but not to each other - is an intranet.

Because in intranet computers are connected to each other within an organization and don't connect to the internet. In the intranet, computers don't access globally. For example, in banking, the banking system can be accessed within the organization but not from outside as on the internet.

While it is noted that the Internet is a globally-connected network of computers that enables people to share information and communicate with each other. An intranet, on the other hand, is a local or restricted network that enables people to store, organize, and share information within an organization.

7 0
3 years ago
Other questions:
  • What is the best Graphics Card you can get in a Gaming Computer? Also what is the RAM do in a Comptuer
    6·1 answer
  • What type of software resides on a computer’s hard drive, and controls the CPU and all other activity between components?
    6·1 answer
  • Which of the following components does a typical two stroke engine contain
    7·2 answers
  • You plan to use the Fill Down feature on a formula in Excel and need to keep a cell reference the same. Which format allows you
    6·1 answer
  • The computer program that Josh is working on presents him with a sentence in which a word has been underlined. Josh has to indic
    9·1 answer
  • . Why use a sensitivity analysis?
    14·1 answer
  • What makes these Pokémon special?
    9·2 answers
  • Qr code is more developed than barcode​
    11·1 answer
  • Writers in our networked world enhance their credibility by
    5·1 answer
  • What data type would you use for a decimal number?* ​
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!