<!–Converted with LaTeX2HTML 2022 (Released January 1, 2022) –> <HTML lang="en"> <HEAD> <TITLE>Contents of Other Interrupt-Based Optimizations</TITLE>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8"> <META NAME="viewport" CONTENT="width=device-width, initial-scale=1.0"> <META NAME="Generator" CONTENT="LaTeX2HTML v2022">
<LINK REL="STYLESHEET" HREF="MPTSK.css">
<LINK REL="previous" HREF="node16_mn.html"> <LINK REL="up" HREF="node14_mn.html"> <LINK REL="next" HREF="node18_mn.html"> </HEAD>
<BODY bgcolor="#ffffff" text="#000000" link="#9944EE" vlink="#0000ff" alink="#00ff00">
<H3><A ID="SECTION00045300000000000000"> Other Interrupt-Based Optimizations</A> </H3>
<P> In general, Mailbox can be tailored to take advantage of most any interrupt-driven resource. For example, personal computers waste most of their processing power waiting for keystrokes. Suppose we wanted to suspend tasks waiting for keyboard I/O, without modifying standard functions, like <I>scanf</I> (), which may access the keyboard. On the IBM PC, the keyboard is typically read through a ROM BIOS software interrupts. Also, the keyboard generates a hardware interrupt each time a key is pressed. By intercepting requests to read the keyboard, and signaling when a key is available (see figure), it is possible to put this idle time to more productive uses – like saving your work!
<P>
<DIV class="CENTER"><A ID="184"></A> <TABLE> <CAPTION class="BOTTOM"><STRONG>Figure:</STRONG> MPRES: Intercepting Interrupts (<EM>Advanced Optimizations</EM>)</CAPTION> <TR><TD><IMG STYLE="height: 314.00ex; " SRC="img31.png" ALT="