A mailbox memory is a RAM memory with the following feature. A full/empty bit, F/E, is associated

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 instructionimage text in transcribed

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.

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Related Book For  book-img-for-question

Computer Organization

ISBN: 9780072320862

5th Edition

Authors: V Carl Hamacher, Carl Hamacher, Zvonko G Vranesic, Safwat G Zaky

Question Posted: