Answered step by step
Verified Expert Solution
Question
1 Approved Answer
2 Suppose we have eight machines that we want to monitor with respect to their availability. We can keep track of them with an eight
Suppose we have eight machines that we want to monitor with respect to their availability. We can keep track of them with an eight bit BUSYNESS bit vector, where a bit is if the unit is free and if the unit is busy. The bits are labeled, from right to left, from to The BUSYNESS bit vector I corresponds to the situation where only units and are free and therefore available for work assignment.
Suppose work is assigned to unit We update our BUSYNESS bit vector by performing the logical AND, where our two sources are the current bit vector and the bit mask The purpose of the bit mask is to clear bit of the BUSYNESS bit vector, while leaving alone the values corresponding to all the other units. The result is the bit vector indicating that unit is now busy.
Suppose unit finishes its task and becomes idle. We can update the BUSYNESS bit vector by performing the logical OR of it with the bit mask The result is indicating that unit is now available.
Now based on the above data, answer the following questions.
Points
a What mask value and what operation would one use to indicate that machine is busy?
b What mask value and what operation would one use to indicate that machines and are longer busy? Note: this can be done with only one operation.
c What mask value and what operation would one use to indicate that all machines are busy?
d What mask value and what operation would one use to indicate that all machines are idle?
e Develop a procedure to isolate the status bit of machine as the sign bit. For example, if the BUSYNESS pattern is then the output of this procedure is If the BUSYNESS pattern is then the output is In general, if the BUSYNESS patrern is b b b b b b b b then the output is b Hint: What happens when you ADD a bit pattern to itself?
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started