subject

Consider the following two functions, where A and B are arbitrary computations: f1(){P(s1);c1 = c1+1;if(c1==1)P(d);V(s1);A();P(s1); c1 = c1-1;if (c1 ==0) V(d);V(s1);}

f2(){P(s2);c2 = c2+1;if(c2==1)P(d);V(s2);B();P(s2); c2 = c2-1;if (c2 ==0)V(d);V(s2);}

Initially, s1=s2=d=1; c1=c2=0;

Assume that an unbounded number of processes are invoking either of the functions f1() aor f2().

How many invocations of the computation A() can proceed concurrently? What are the values of s1, c1, and d at that time?

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 04:00
Which of the following kinds of programs displays an online advertisement in a banner or pop-up window on webpages, email, or other internet service? e
Answers: 2
question
Computers and Technology, 22.06.2019 18:00
Martha is a healer, a healthcare provider, and an experienced nurse. she wants to share her daily experiences, as well as her 12 years of work knowledge, with people who may be interested in health and healing. which mode of internet communication can martha use?
Answers: 3
question
Computers and Technology, 22.06.2019 18:10
Assume that to_the_power_of is a function that expects two int parameters and returns the value of the first parameter raised to the power of the second parameter. write a statement that calls to_the_power_of to compute the value of cube_side raised to the power of 3 and that associates this value with cube_volume.
Answers: 1
question
Computers and Technology, 22.06.2019 18:30
Which of these options are the correct sequence of actions for content to be copied and pasted? select content, click the copy button, click the paste button, and move the insertion point to where the content needs to be inserted. click the copy button, select the content, move the insertion point to where the content needs to be inserted, and click the paste button. select the content, click the copy button, move the insertion point to where the content needs to be inserted, and click the paste button. select the content, move the insertion point to where the content needs to be inserted, click the copy button, and click the paste button.
Answers: 3
You know the right answer?
Consider the following two functions, where A and B are arbitrary computations: f1(){P(s1);c1 = c1+...
Questions
question
Mathematics, 25.06.2019 15:00
question
Mathematics, 25.06.2019 15:00
question
Mathematics, 25.06.2019 15:00
question
Mathematics, 25.06.2019 15:00
question
Mathematics, 25.06.2019 15:00
Questions on the website: 13722362