Consider the thirsty person problem given below: To drink, a thirsty person must have three things; water, ice and a glass. There are three thirsty people, each having a different one (and only one) of the three required items. A fourth person, a server has unlimited supply of all three items. If nobody is drinking, the server places two of the three items (chosen at random) onto table. Thirsty person who can make a drink from those two items will pick them up and drink a glass of ice water. When done, thirsty person will notify the server and the process will repeat. Write a process that will control the thirsty person and the server using semaphores. (i) What is a critical section in code? Explain the three properties that any solution to the Critical Section Problem should guarantee. Explain the role the Operating System plays in Garbage-In-Garbage-Out (GIGO).

Question

QUESTION THREE
Consider the thirsty person problem given below: To drink, a thirsty person must have three things; water, ice and a glass. There are three thirsty people, each having a different one (and only one) of the three required items. A fourth person, a server has unlimited supply of all three items. If nobody is drinking, the server places two of the three items (chosen at random) onto table. Thirsty person who can make a drink from those two items will pick them up and drink a glass of ice water. When done, thirsty person will notify the server and the process will repeat. Write a process that will control the thirsty person and the server using semaphores.
(i) What is a critical section in code?
Explain the three properties that any solution to the Critical Section Problem should guarantee.
Explain the role the Operating System plays in Garbage-In-Garbage-Out (GIGO).

Expert Answer

1 Rating

Want to see the step-by-step answer?

Check out a sample Q&A here.

Want to see this answer and more?

Experts are waiting 24/7 to provide step-by-step solutions in as fast as 30 minutes!*

*Response times may vary by subject and question complexity. Median response time is 34 minutes for paid subscribers and may be longer for promotional offers.
Tagged in
Engineering
Computer Engineering

Programing

Related Computer Engineering Q&A

Find answers to questions asked by students like you.

Q: What circumstances helped the IBM PC become so successful?

A: Circumstances helped the IBM PC become so successful: A Personal Computer (PC) is a digital compute...

Q: Find the minimized Boolean expression for the functions defined by the truth tables

A: Minimization of boolean functions: Boolean functions can be defined using the sum of products (SOP) ...

Q: Suppose that 16M × 16 memory built using 512K × 8 RAM chips and that memory is word addressable.1. a...

A: Since, the question contains multiple sub-parts we will answer first "3" sub-parts. If you want any ...

Q: Simplify the following functional expression using Boolean algebra and its identities. List the iden...

A: The identities of Boolean algebra that may be used for simplifying the given expression are:   ...

Q: Assume that you have 1 MT CPU. How many cycles will it take to execute these two threads? How many i...

A: The number of cycles it will take to execute two threads using 1 MT CPU is 9. Also, 7 issue slots ar...

Q: Given the flowchart below, what will be the final value of variable A if the following values for va...

A: Explanation: Passing the values to flow chart and computing their output value based on the flow ch...

Q: Q2. What impact will Bluetooth devices connected to mobile units have on the piconet?

A: Step 1: Introduction:- Bluetooth:- Bluetooth is a wireless network that is used to transfer the data...

Q: You are the network administrator for Slimjim, a peripheral device company. Thenetwork uses Linux, a...

A: Two commands are available to search manual pages. The manual pages in Linux are also known as man p...

Q: . Suppose we have 2 bytes of virtual memory and 28 bytes of physical main memory. Suppose the page s...

A: Given: Virtual memory size=210 Physical memory size=28 Size of the page=24.

Q: After typing the ls –F command, you see the following line in the output:-rw-r-xr- -    1 user1     ...

A: In this case, User1 has the read and write permission to the file, members of the root group have re...

Q: True or false? The TCP segment has a field in its header for rwnd .

A: Solution: True: TCP segment  contains field in the header  for rwnd because each and every TCP segme...

Q: Describe each of the following functions of Excel: TRUNC(number, num_digits) ROUND(number, num_digit...

A: Function in Excel In Excel, different categories of functions are available. The various categories ...

Q: Before a computer can use a router, with what configuration information must it beprovided?a. routin...

A: Configuration information Router is a device used for transferring data from one network to another...

Q: What is normalization, and why is it necessary?

A: Normalization Normalization is an important part of relational database design. It is the process o...

Q: Which flip-flop gives a true representation of computer memory?

A: There are two broad categories of circuit, Combinational circuit Sequential circuit Basic Boolean...

Q: Q03. Write a program to shift an 08-bit data four bits right, and save the last result in register C...

A: Program to shift an 08-bit data four bits right Here assume data is in B register. Result will be st...

Q: Consider C programming and argue that- "if" statement is not mandatory to have in C programming, giv...

A: While loop: - In C, a while loop continuously executes a goal statement as long as a condition is va...

Q: Write the following two generic methods using bubblesort. The first method sorts the elements using ...

A: Programming Approach: Importing the package java.util.Comparator Defining the class Bubble_sort Def...

Q: Write a C program that reads two three-digit integers and then displays their product in the followi...

A: Declare integer variables to hold the two 3-digit numbers.   int num1, num2;   Declare integer varia...

Q: Heap  is used to implement the priorityqueue. Revise the implementation using a sorted array list to...

A: Introduction:- Heap is a special type of tree-based data structure. The data structure is defined as...

Q: When would you choose a CRC code over a Hamming code? A Hamming code over a CRC?

A: CRC code over Hamming code Cyclic Redundancy Check is a process used for checking errors in the tra...

Q: Write the command that can be used to answer the following questions. (Hint: Try eachout on the syst...

A: Commands used for the given questions: a. The command for the finding the files which contains the n...

Q: When compiling source code into a binary program, which command performs a systemcheck and creates t...

A: While compiling the source code make command is used to build executable Or binary program and libra...

Q: Suppose we are given the following subset of code words,created for a 7-bit memory word with one par...

A: Parity Bit: A parity bit is a control bit that is added to a data block in order to detect errors. I...

Q: How many megabytes are in 1 gigabyte?

A: In Computers, to measure a storage of a processor and virtual and real memory some special terms are...

Q: If you know a vehicle’s speed and the amount of time it has traveled, you can calculate the distance...

A: Form Design: View the Form Design in IDE. Set the Form Control properties in Properties window as f...

Q: Convert the following binary representations to its equivalent base ten form 1. 0110 2. 10000 3. 100...

A: 1. 0110: To convert the binary representation to its base ten representations, multiply every bit o...

Q: The operating system software is necessary for a computer to function. True or False?

A: Explanation: Operating system acts like an interface between the user and kernel. It plays the key ...

Q: With respect to Flynn’s taxonomy, where do systolic arrays fit? What about clusters of workstations?

A: Systolic arrays and clusters of workstations The systolic arrays belong to Multiple Instruction Sin...

Q: Compute the Hamming distance of the following code: 0000000101111111 0000001010111111

A: There are two codes 0000000101111111 and 0000001010111111: So, 0000000101111111 ⊕ 0000001010111111 =...

Q: Suppose a computer using fully associative cache has 224 bytes of byte-addressable main memory and a...

A: Size of tag and offset fields The memory with 224 bytes consists of 24 addressable bytes. Hence 24...

Q: what is AGP (Accelerated Graphics Port)

A: Accelerated Graphics Port (AGP): An accelerated AGP (Graphics Port) uses a point by point channel f...

Q: Q4.  Compare the usefulness and limitations of WMANs, WLANs, and WPANs.

A: WMAN stands for Wireless Metropolitan Area Network,WMAN helps users to create wireless connections o...

Q: Convert the following to the other canonical form: (a) F (x, y, z) = (1, 3, 7) (b) F (A, В, С, D) 3D...

A: Convert into canonical forms: a. F(x, y, z) = Σ(1, 3, 7)       Min-term is represented  mi, where 0 ...

Q: What are the limitations of synthetic benchmarks such as Whetstone and Dhrystone?

A: Limitations of the synthetic benchmarks such as Whetstone and Dhrystone and methods to overcome: S...

Q: A system implements a paged virtual address space for each process using a one-level page table. The...

A: 0x5F4 changed to decimal is 1524. 1524 address occurs on page 1 located at offset 500.Page 0 contain...

Q: Explain the three main types of cloud computing platforms.

A: Cloud computing: Cloud computing is a type of computing that relies on computer resource sharing ra...

Q: A digital computer has a memory unit with 24 bits per word. The instruction set consists of 150 diff...

A: Explanation: The size of the words present in memory unit is 24 bits or 3 bytes. The number of oper...

Q: Please post answer in Coral One lap around a standard high-school running track is exactly 0.25 mile...

A: Programming instruction: Declaring variable. Take input from the user. Call the function which conv...

Q: What is SETI, and how does it use the distributed computing model?

A: SETI stands for Search For Extra-Terrestrial Intelligence. The question of whether or not life exis...

Q: Character devices typically transfer data more quickly than block devices. True or False?

A: Block devices and character devices: Block devices are typically faster than that of the character...

Q: What is the name used to describe a user providing a user name and password to log into a system?a. ...

A: Explanation: Authentication is the process used to authenticate the user to provide access to a sys...