Use XSI message queues to implement a request system with two classes of requests: normal priority and high priority.Design the server to handle high-priority requests beforenormal-priority requests.

What will be an ideal response?


One solution is shown in Figure54. The problem is that it doesn’t work on FreeBSD 8.0 and Mac OS X 10.6.8, because these platforms don’t implement msgrcv properly.Byspecifying ?2for the type argument in the msgrcv call, we aresupposed to be returned the ?rst message on the queue with amessage type that is the lowest value less than or equal to ??type??.Looking at the FreeBSD and Mac OS X source code shows us that the kernel implementation of msgrcv simply returns the ?rst message on the queue with a type that is less than or equal to ??type??. Using two separate queues is a possible alternative, but we would need a more complicated design, because if the server wants to block on one queue, the server has no way to be noti?ed when messages areplaced on the other queue. In this case, we could use some other noti?cation mechanism, such as a semaphore or a condition variable and a mutex, and signal the server whenever a message is placed on either of the queues.
image
12548

Computer Science & Information Technology

You might also like to view...

A ________ can display a user-friendly list that is either linked to another field in a related table or a

value list Fill in the blank(s) with correct word

Computer Science & Information Technology

To show a "hidden" row one (1 ) or a "hidden" column A

A) use only a Ribbon command with arrows . B) scroll to the left. C) type A1 in the name box and then press "Enter" D) scroll to the right.

Computer Science & Information Technology

?The word shown in bold is spelled correctly in the following sentence.Megan took three courses online.

Answer the following statement true (T) or false (F)

Computer Science & Information Technology

What specific process in application development removes a resource that is no longer needed?

A. deprovisioning B. version control C. change management D. baselining

Computer Science & Information Technology