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
The only way to print a photo is on a special glossy paper using professional printing services in a store
DaniilM [7]

i believe this is true


8 0
2 years ago
Read 2 more answers
Out of the following, find those identifiers, which cannot be used for naming Variables, Constants or Functions in a python prog
Alecsey [184]

Answer:1. Introduction to Python

1.1 A Simple Python Program

1.2 Creating and Running a Python Program

2. Virtual Data Storage

3. Statement Types

3.1 Input/Output Statements

3.2 The Assignment Statement

3.3 Control Statements

4. Another Example

5. Managing Complexity

5.1 Divide and Conquer

5.2 Using and Writing Functions

6. Object-Oriented Programming

6.1 What Is It?

6.2 Python and OOP

6.3 One More Example

6.4 What Have We Gained?

7. Graphical Programming

7.1 Graphics Hardware

7.2 Graphics Software

8. Conclusion

E X E R C I S E S

A N S W E R S T O P R A C T I C E P R O B L E M S

Explanation: I got you bruv.

7 0
3 years ago
Write an application that allows a user to enter the names and birth dates of up to 10 friends. Continue to prompt the user for
mylen [45]
Sorry I don’t know the answer I am really sorry
5 0
3 years ago
What are source data entry devices​
matrenka [14]

Answer:

<u><em>Source data entry devices are used for audio input, video input and to enter the source document directly to the computer. Source data entry devices do not require data to be typed-in, keyed-in or pointed to a particular location.</em></u>

Explanation:

7 0
2 years ago
Computer _____ begins with regular maintenance of the computer system such as firewalls, antivirus programs, defragmentation, de
Dima020 [189]
Computer checkup/maintenance. You forgot to mention windows updates, it is critical to perform that action as well cause of the recent ransomeware malware that is going around lately and Microsoft and other OS vendors yes even Apple have released patches to prevent it spreading even further. 
4 0
3 years ago
Other questions:
  • Which best defines the term patch?
    12·1 answer
  • Software can be distributed on the web. <br> a.true <br> b.false
    12·1 answer
  • A user can easily move to the end of a document by pressing the _____ key combination.
    10·2 answers
  • __________________ ensures that each row is uniquely identified by the primary key, which means that a proper search for an exis
    10·1 answer
  • 12. Kelly would like to know the average bonus multiplier for the employees. In cell C11, create a formula using the AVERAGE fun
    7·1 answer
  • Which of the following is true of how computers represent numbers?
    9·2 answers
  • Write the header file Stadium.h for a Stadium class. The Stadium class has the following data members: 1) an array of 1000 Seat
    7·1 answer
  • Someone plz answer
    8·1 answer
  • That’s what I have so far. I need help!
    5·1 answer
  • When working in outline mode, press __________ and click the eye icon to change only one layer back to preview mode.
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!