13.07.2015 Views

iAPX 286 Operating System Writers Guide 1983

iAPX 286 Operating System Writers Guide 1983

iAPX 286 Operating System Writers Guide 1983

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

IntelDATA SHARING, ALIASING, AND SYNCHRONIZATIONPL/M-<strong>286</strong> COMPILER 960-508 datePAGE 4959697989933222CALL FIX ALIAS PTR(@MESSAGE.DESCR2);END;CALL FREE MSG SPACE(BOX ID,@MESSAGE);EXCEP=OK; - -END RECEIVE_MESSAGE;1*******************************************************/100 1 END MAILBOX;MODULEINFORMATION:CODE AREA SIZECONSTANT AREA SIZEVARIABLE AREA SIZEMAXIMUM STACK SIZE193 LINES READo PROGRAM WARNINGS" PROGRAM ERRORSDICTIONARY SUMMARY:016EH0000H0000H0020H366D0D0D32D91KB MEMORY AVAILABLE6KB MEMORY USED (6%)OKB DISK SPACE USEDEND OF PL/M-<strong>286</strong> COMPILATIONFigure 5-7. Example of Mailbox Procedures (Cont'd.)Variations on the Mailbox ThemeSome of the features appropriate for semaphores are also appropriate for mailboxes, namely:• Conditional receive• Timed waitFor applications in which speed is not the overriding goal, mailboxes can substitute for semaphores. Amailbox is analogous to a semaphore, with the counter of a semaphore corresponding to the number ofmessages waiting at a mailbox. A mailbox with null messages is identical in function to a semaphore.Most applications that use mailboxes require different message formats (different data size, differentnumber of descriptors) for different communication channels. With dynamically created mailboxes,message format may be defined by parameters to the creation procedure, encoded in the mailbox, andinterpreted by the SEND_MESSAGE and RECEIVE_MESSAGE procedures.5-16 121960·001

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!