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
Available positions in animation cannot be found on the internet. True False
Nadusha1986 [10]
False, many applications for certain jobs/careers can be found online nowadays. Sites such as craigslist, angie.com, care.com, even cartoon website job applications can be applied for via the internet. I conclusion, I believe the correct answer false.
7 0
3 years ago
Read 2 more answers
A(n) ________
nignag [31]

Answer:

Technical specification document

Explanation:

6 0
3 years ago
What is technology??
UkoKoshka [18]

Answer:

Technology is the skills, methods, and processes used to achieve goals. People can use technology to: Produce goods or services. Carry out goals, such as scientific investigation or sending a spaceship to the moon. Solve problems, such as disease or famine.

Explanation:

Good Luck!

3 0
3 years ago
Which one of the following UNIX utilities is purpose-built to quickly return the location (filepath) of files by querying a data
Galina-37 [17]

Answer:

a.locate

Explanation:

locate utility in Unix is used to quickly return the filepath of the file searched for.find also used to do the same work but it is not as fast as locate.

locate is faster than find because it does not read the filesystem to search the file infact it refers to the database to search the file and produces it's output and the database is created by updatedb command.

4 0
3 years ago
Every file on a storage device has a _______. (a.) name (b.) size (c.)both of the above (d.) none of the above
zmey [24]
The correct answer is: C: both of the above, i. e. name and size.
8 0
3 years ago
Other questions:
  • Compare and contrast how the roles of women and men in society are changing​
    14·1 answer
  • Which of these statements best describes an application programming interface?
    5·1 answer
  • A(n) __________ can include a computer's full operating system, applications, and system settings, including security and config
    7·1 answer
  • How to engage more underrepresented and under resourced students in stem programs?
    10·1 answer
  • What kind of energy transformation occurs in a gasoline-powered car?
    14·1 answer
  • 1. Extract title Write a function extract_title that takes one parameter, the filename of a GenBank formatted file, and returns
    14·1 answer
  • Disadvantages of Batch<br>operation system​
    5·1 answer
  • A technician has been dispatched to a customer site to diagnose an issue where the computer turns off intermittently. Upon arriv
    11·1 answer
  • Why do many experts recommand longer time horizonal if you are doing high risk investment
    7·1 answer
  • Determining Correct Date Function What function text would you use to put today's date and time in a cell? 0 =TODAYO =NOWO O NOW
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!