Question: A mailbox memory is a RAM memory with the following feature. A full/empty bit, F/E, is associated with each memory word location. The instruction is

A mailbox memory is a RAM memory with the following feature. A full/empty bit, F/E, is associated with each memory word location. The instructionPUT RO,BOXLOC, WAITSEND

is executed indivisibly as follows. The F/E bit associated with mailbox memory location BOXLOC is tested. If it is 0, denoting empty, then the contents of register RO are writ- ten into BOXLOC, F/E is set to 1, denoting full, and execution continues with the next sequential instruction. Otherwise (that is, for F/E = 1), no operations are performed and execution control is passed to the instruction at location WAITSEND in program memory.

(a) Give an appropriate definition for the instruction GET RO,BOXLOC, WAITREC that is complementary to the PUT instruction.

(b) Suppose two tasks, T and T2, running on different processors in a multiprocessor system, pass a stream of one-word messages from T to T2 using PUT and GET instructions on a shared mailbox memory unit. Write program segments for T and T2 in assembly-language style that accomplish the same thing on a shared-memory multiprocessor system that does not have a mailbox memory unit but does have a TAS instruction as described in Section 12.6.1.

PUT RO,BOXLOC, WAITSEND

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Organization Development Questions!