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]
4 years ago
9

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

Computers and Technology
1 answer:
Alisiya [41]4 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
Individuals who break into computer systems with the intention of doing damage are called​ _____________.
notka56 [123]
I think the answer is hackers
7 0
3 years ago
There is an increasing need for private security personnel because of declining resources for many government agencies and a sho
aivan3 [116]
<span>True
</span><span>There is an increasing need for private security personnel because of declining resources for many government agencies and a shortage of police officers in many communities due to lack of funding.

</span>
8 0
4 years ago
In a paragraph of no less than 125 words, explain what netiquette is and how it improves efficiency and productivity in the work
Ierofanga [76]

In very simple terms, netiquette is etiquette on the internet. It is a short form of network etiquette. It represents the importance of proper manners online. Common guidelines for good netiquette include being very courteous and avoiding instances of cyber-bullying. Although the specific protocols governing netiquette may differ depending on the forum being used, it is equally applicable to emails and surfing the internet, message boards, and chatting. In the workplace, netiquette implies that you have polite manners, and that you would want to build up relationships with people. By showing respect to your colleague through proper netiquette, it will show how productive you can be and as result, you will earn respect. Understanding netiquette in the workplace can save you from embarrassing moments. In sending job emails, for instance, always speak clearly and avoid using capitalized words, spelling errors, or slang.

8 0
4 years ago
NEED HELP NOW 12 POINTS!!!!!!
vlada-n [284]
The first one seems the most relivant
4 0
3 years ago
Read 2 more answers
The _________ attack exploits the common use of a modular exponentiation algorithm in RSA encryption and decryption, but can be
lions [1.4K]

Answer:

chosen ciphertext

Explanation:

Chosen ciphertext attack is a scenario in which the attacker has the ability to choose ciphertexts C i and to view their corresponding decryptions – plaintexts P i . It is essentially the same scenario as a chosen plaintext attack but applied to a decryption function, instead of the encryption function.

5 0
3 years ago
Other questions:
  • Samuel is working on decimal and binary conversion for his college project. He is using the binary number 111011 and wants to ex
    14·1 answer
  • For this lab you will find the area of an irregularly shaped room with the shape as shown above.
    7·1 answer
  • Given two variables firstInClass and secondInClass which have already been associated with values, write code which swaps the va
    9·1 answer
  • Consider the class ScopeTest defined this way:
    15·1 answer
  • Assume that month is an int variable whose value is 1 or 2 or 3 or 5 ... or 11 or 12. Write an expression whose value is "jan" o
    10·1 answer
  • Does Brainly have tutors?
    11·1 answer
  • A_____ handles all the instructions that it received from hardware and software which are available on the computer ​
    10·1 answer
  • Describe how serial data access finds data
    9·2 answers
  • What are some innovations that television has undergone since its original invention ?
    11·1 answer
  • Can anyone talk to me?
    9·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!