Question

In: Computer Science

This is a multiple answer question, meaning any of the 4 statements could be true. From...

This is a multiple answer question, meaning any of the 4 statements could be true. From O/S class

A semaphore, in its purest form (like the one we used in the Dining Philosopher's solution), is what

A busy waiting lock.

An atomic integer that has two functions it can use - one that increments it by 1 and one that decrements it by 1.

A Monitor

An atomic integer that can be changed to any value from any other value directly.

Solutions

Expert Solution

Semaphore is not a busy waiting lock. The semaphore has a data structure struct semaphore {int var;queue blockedq;};. The semaphore puts and releases processes with the help of the blocked queue and no process will continuously poll to check the resource is free or not

Yes semaphore is an atomic integer. It can only be incremented or decremented at a time. And there can be functions associated to each operation like putting process into a blocked queue or releasing the process from a blocked queue, etc.,.

It is not a monitor. Monitor is a thread container that will allow one thread to execute at any time. But semaphore is not a thread container and it will let more than one process or thread to access a resource based on its value.

It's atomic integer. But its value cannot be changed from any value to any value. Rather increment and decrement operations are only operations that are allowed.

Therefore only option (b) is true


Related Solutions

This is a multiple answer question. Meaning any number of the four could be true. This...
This is a multiple answer question. Meaning any number of the four could be true. This is from an O/S class We discussed in class the ability to create new processes in a Linux environment by way of the fork() function. What is true about this function? fork() takes a parameter which is the priority of the process that is going to be created It spawns a new process that is a child of the calling process. The child process...
QUESTION 4 Multiple Answer Select the answers that are true A taxpayer who files an innocent...
QUESTION 4 Multiple Answer Select the answers that are true A taxpayer who files an innocent spouse claim has a right to bring a petition to the Tax Court. A CT taxpayer submits his/her petition to tax court at an address located in Hartford CT If a taxpayer qualifies for S case forum, he cannot choose the regular tax court forum. If a taxpayer contests a collection matter (example levy), it will be known as a CDP, collection due process...
I do not understand this question could someone please answer and give meaning to this question....
I do not understand this question could someone please answer and give meaning to this question. MHC6305 Finanical Management. Compare and contrast cash accounting methodology and accrual accounting methodology in order to illustrate how each best works for different types of companies.
QUESTION 4 Which statements, if any, are true about the electrolysis of aqueous magnesium fluoride? Check...
QUESTION 4 Which statements, if any, are true about the electrolysis of aqueous magnesium fluoride? Check the box in front of each true statement. Magnesium will collect at the cathode. Magnesium will collect at the anode. Fluorine gas will collect at the cathode. Fluorine gas will collect at the anode. Hydrogen gas will collect at the cathode. Hydrogen gas will collect at the anode. Oxygen gas will collect at the cathode. Oxygen gas will collect at the anode. B. which...
Answer the following statements as true or false, then select the correct multiple -choice answer:   1.   If...
Answer the following statements as true or false, then select the correct multiple -choice answer:   1.   If dividends are declared during the year the company would close the dividend account by debiting retained          earnings and crediting the dividend account.   2.   A company that forgets to recognize depreciation for the year understates its income and assets.   3.   Prepaid insurance expense will have a zero balance on the after closing trial balance.   4.   Retained earnings on an adjusted trial balance is the beginning retained earnings for...
Please answer all questions Select from among the statements below any or all that are true....
Please answer all questions Select from among the statements below any or all that are true. A. An employee handbook can never serve as the basis for a claim by an employee against an employer. B. If an employee handbook states that it is not a contract, the employer is free to pick which provisions are enforceable. C. An employee handbook can never serve as the basis for a claim by an employer against an employee. D. If an employee...
Which of the following statements about "meaning" is true? A) Group of answer choices B) Point...
Which of the following statements about "meaning" is true? A) Group of answer choices B) Point of view is synonymous with meaning. C) Setting and action are unrelated to meaning in a story ENglish 1302 D) The subject of a story states its meaning E) Meaning is made up of separate themes
Which if, any, of these statements are true?
Which if, any, of these statements are true? (More than one may be true.) Assume the batteries are ideal.  Check all that apply.  A battery supplies the energy to a circuit.  A battery is a source of potential difference; the potential difference between the terminals of the battery is always the same.  A battery is a source of current; the current leaving the battery is always the same.
Answer TRUE or FALSE for each of these statements. Multiple comparison testing using the Bonferroni correction...
Answer TRUE or FALSE for each of these statements. Multiple comparison testing using the Bonferroni correction is only applied if we reject the null hypothesis in a one-way ANOVA. TRUEFALSE [1 pt(s)] Tries 0/1In the rank-sum test, when the magnitude of the test-statistic gets larger, the p-value gets smaller. TRUEFALSE [1 pt(s)] Tries 0/1A p-value of 0.001 indicates we should accept the alternative hypthesis. TRUEFALSE [1 pt(s)] Tries 0/1A regression model that is statistically significant according to an F-test establishes...
Question 4 [14]Explain the meaning of the term ‘rent seeking’ and illustrate graphically how it could...
Question 4 [14]Explain the meaning of the term ‘rent seeking’ and illustrate graphically how it could undermine efficiency in the economy. Subject: Governmental economics 20A
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT