]> oss.titaniummirror.com Git - tinyos-2.x.git/blobdiff - doc/html/tep108.html
get rid of +5 for rounding, change arg name in functions in CtpInfo to match the...
[tinyos-2.x.git] / doc / html / tep108.html
index 447e10310c452f5d9aa24122a7c65b1e5c63be96..d83626369e1a3f7f216f54084ed93efc35f8ba52 100644 (file)
@@ -3,38 +3,29 @@
 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-<meta name="generator" content="Docutils 0.5: http://docutils.sourceforge.net/" />
+<meta name="generator" content="Docutils 0.4: http://docutils.sourceforge.net/" />
 <title>Resource Arbitration</title>
 <meta name="authors" content="Kevin Klues  Philip Levis  David Gay  David Culler  Vlado Handziski" />
 <style type="text/css">
 
 /*
 :Author: David Goodger
-:Contact: goodger@python.org
-:Date: $Date$
-:Revision: $Revision$
-:Copyright: This stylesheet has been placed in the public domain.
+:Contact: goodger@users.sourceforge.net
+:date: $Date$
+:version: $Revision$
+:copyright: This stylesheet has been placed in the public domain.
 
 Default cascading style sheet for the HTML output of Docutils.
-
-See http://docutils.sf.net/docs/howto/html-stylesheets.html for how to
-customize this style sheet.
 */
-
-/* used to remove borders from tables and images */
-.borderless, table.borderless td, table.borderless th {
-  border: 0 }
-
-table.borderless td, table.borderless th {
-  /* Override padding for "table.docutils td" with "! important".
-     The right padding separates the table cells. */
-  padding: 0 0.5em 0 0 ! important }
+body {
+  font-family: Times;
+  font-size: 16px;
+}
 
 .first {
-  /* Override more specific margin styles with "! important". */
   margin-top: 0 ! important }
 
-.last, .with-subtitle {
+.last {
   margin-bottom: 0 ! important }
 
 .hidden {
@@ -47,14 +38,9 @@ a.toc-backref {
 blockquote.epigraph {
   margin: 2em 5em ; }
 
-dl.docutils dd {
+dd {
   margin-bottom: 0.5em }
 
-/* Uncomment (and remove this text!) to get bold-faced definition list terms
-dl.docutils dt {
-  font-weight: bold }
-*/
-
 div.abstract {
   margin: 2em 5em }
 
@@ -62,18 +48,12 @@ div.abstract p.topic-title {
   font-weight: bold ;
   text-align: center }
 
-div.admonition, div.attention, div.caution, div.danger, div.error,
-div.hint, div.important, div.note, div.tip, div.warning {
+div.attention, div.caution, div.danger, div.error, div.hint,
+div.important, div.note, div.tip, div.warning, div.admonition {
   margin: 2em ;
   border: medium outset ;
   padding: 1em }
 
-div.admonition p.admonition-title, div.hint p.admonition-title,
-div.important p.admonition-title, div.note p.admonition-title,
-div.tip p.admonition-title {
-  font-weight: bold ;
-  font-family: sans-serif }
-
 div.attention p.admonition-title, div.caution p.admonition-title,
 div.danger p.admonition-title, div.error p.admonition-title,
 div.warning p.admonition-title {
@@ -81,14 +61,11 @@ div.warning p.admonition-title {
   font-weight: bold ;
   font-family: sans-serif }
 
-/* Uncomment (and remove this text!) to get reduced vertical space in
-   compound paragraphs.
-div.compound .compound-first, div.compound .compound-middle {
-  margin-bottom: 0.5em }
-
-div.compound .compound-last, div.compound .compound-middle {
-  margin-top: 0.5em }
-*/
+div.hint p.admonition-title, div.important p.admonition-title,
+div.note p.admonition-title, div.tip p.admonition-title,
+div.admonition p.admonition-title {
+  font-weight: bold ;
+  font-family: sans-serif }
 
 div.dedication {
   margin: 2em 5em ;
@@ -100,11 +77,9 @@ div.dedication p.topic-title {
   font-style: normal }
 
 div.figure {
-  margin-left: 2em ;
-  margin-right: 2em }
+  margin-left: 2em }
 
 div.footer, div.header {
-  clear: both;
   font-size: smaller }
 
 div.line-block {
@@ -120,7 +95,7 @@ div.line-block div.line-block {
 div.sidebar {
   margin-left: 1em ;
   border: medium outset ;
-  padding: 1em ;
+  padding: 0em 1em ;
   background-color: #ffffee ;
   width: 40% ;
   float: right ;
@@ -147,24 +122,31 @@ div.system-message p.system-message-title {
 div.topic {
   margin: 2em }
 
-h1.section-subtitle, h2.section-subtitle, h3.section-subtitle,
-h4.section-subtitle, h5.section-subtitle, h6.section-subtitle {
-  margin-top: 0.4em }
+h1 {
+  font-family: Arial, sans-serif;
+  font-size: 20px;
+}
 
 h1.title {
-  text-align: center }
+ text-align: center;
+ font-size: 32px;
+}
+
+h2 {
+ font-size: 16px;
+ font-family: Arial, sans-serif;
+}
 
 h2.subtitle {
   text-align: center }
 
-hr.docutils {
-  width: 75% }
-
-img.align-left {
-  clear: left }
+h3 {
+ font-size: 12px;
+ font-family: Arial, sans-serif;
+}
 
-img.align-right {
-  clear: right }
+hr {
+  width: 75% }
 
 ol.simple, ul.simple {
   margin-bottom: 1em }
@@ -222,9 +204,18 @@ pre.address {
   font-family: serif ;
   font-size: 100% }
 
+pre.line-block {
+  font-family: serif ;
+  font-size: 100% }
+
 pre.literal-block, pre.doctest-block {
   margin-left: 2em ;
-  margin-right: 2em }
+  margin-right: 2em ;
+  background-color: #eeeeee;
+  border-color: #000000;
+  border-width: thin; 
+  font-size: 14px
+}
 
 span.classifier {
   font-family: sans-serif ;
@@ -240,47 +231,47 @@ span.interpreted {
 span.option {
   white-space: nowrap }
 
+span.option-argument {
+  font-style: italic }
+
 span.pre {
   white-space: pre }
 
 span.problematic {
   color: red }
 
-span.section-subtitle {
-  /* font-size relative to parent (h1..h6 element) */
-  font-size: 80% }
+table {
+  margin-top: 0.5em ;
+  margin-bottom: 0.5em }
 
 table.citation {
-  border-left: solid 1px gray;
-  margin-left: 1px }
+  border-left: solid thin gray ;
+  padding-left: 0.5ex }
 
 table.docinfo {
-  margin: 2em 4em }
-
-table.docutils {
-  margin-top: 0.5em ;
-  margin-bottom: 0.5em }
+  margin: 2em 4em;
+}
 
 table.footnote {
-  border-left: solid 1px black;
-  margin-left: 1px }
+  border-left: solid thin black ;
+  padding-left: 0.5ex }
 
-table.docutils td, table.docutils th,
-table.docinfo td, table.docinfo th {
+td, th {
   padding-left: 0.5em ;
   padding-right: 0.5em ;
   vertical-align: top }
 
-table.docutils th.field-name, table.docinfo th.docinfo-name {
+th.docinfo-name, th.field-name {
   font-weight: bold ;
   text-align: left ;
-  white-space: nowrap ;
-  padding-left: 0 }
+  white-space: nowrap;
+  }
 
-h1 tt.docutils, h2 tt.docutils, h3 tt.docutils,
-h4 tt.docutils, h5 tt.docutils, h6 tt.docutils {
+h1 tt, h2 tt, h3 tt, h4 tt, h5 tt, h6 tt {
   font-size: 100% }
 
+tt {}
+
 ul.auto-toc {
   list-style-type: none }
 
@@ -300,7 +291,7 @@ ul.auto-toc {
 <tr class="field"><th class="docinfo-name">Type:</th><td class="field-body">Documentary</td>
 </tr>
 <tr><th class="docinfo-name">Status:</th>
-<td>Draft</td></tr>
+<td>Final</td></tr>
 <tr class="field"><th class="docinfo-name">TinyOS-Version:</th><td class="field-body">2.x</td>
 </tr>
 <tr><th class="docinfo-name">Authors:</th>
@@ -309,14 +300,6 @@ ul.auto-toc {
 <br />David Gay
 <br />David Culler
 <br />Vlado Handziski</td></tr>
-<tr class="field"><th class="docinfo-name">Draft-Created:</th><td class="field-body">28-Mar-2005</td>
-</tr>
-<tr class="field"><th class="docinfo-name">Draft-Version:</th><td class="field-body">1.6</td>
-</tr>
-<tr class="field"><th class="docinfo-name">Draft-Modified:</th><td class="field-body">2006-12-12</td>
-</tr>
-<tr class="field"><th class="docinfo-name">Draft-Discuss:</th><td class="field-body">TinyOS Developer List &lt;tinyos-devel at mail.millennium.berkeley.edu&gt;</td>
-</tr>
 </tbody>
 </table>
 <div class="note">
@@ -502,25 +485,6 @@ interface Resource {
   async command bool isOwner();
 }
 </pre>
-<p>The diagram below shows how a simple shared resource can be
-built from a dedicated resource by using the Resource interface
-provided by an arbiter:</p>
-<pre class="literal-block">
-         /|\                    /|\
-          |                      |
-          | Data Interface       | Resource
-          |                      |
---------------------------------------------
-|               Shared Resource            |
---------------------------------------------
-         /|\                    /|\
-          |                      |
-          | Data Interface       | Resource
-          |                      |
-----------------------      -----------
-| Dedicated Resource |      | Arbiter |
-----------------------      -----------
-</pre>
 <p>A client lets an arbiter know it needs access to a resource by
 making a call to request(). If the resource is free,
 SUCCESS is returned, and a granted event is signaled
@@ -548,6 +512,25 @@ check if it is the current owner of the resource.  This command is mostly
 used to perform runtime checks to make sure that clients not owning a resource
 are not able to use it.  If a call to isOwner fails, then no call
 should be made to commands provided by that resource.</p>
+<p>The diagram below shows how a simple shared resource can be
+built from a dedicated resource by using just the Resource interface
+provided by an arbiter.:</p>
+<pre class="literal-block">
+         /|\                    /|\
+          |                      |
+          | Data Interface       | Resource
+          |                      |
+--------------------------------------------
+|               Shared Resource            |
+--------------------------------------------
+         /|\                    /|\
+          |                      |
+          | Data Interface       | Resource
+          |                      |
+----------------------      ----------------
+| Dedicated Resource |      |    Arbiter   |
+----------------------      ----------------
+</pre>
 <p>An arbiter MUST provide exactly one parameterized Resource interface,
 where the parameter is a client ID, following the Service
 Instance pattern[3]_.  An arbitrated component SomeNameP MUST
@@ -577,11 +560,11 @@ interface ArbiterInfo {
 }
 </pre>
 <p>In contrast to the parameterized Resource interface provided by an arbiter,
-only a single ArbiterInfo interface is provided. Its purpose is
+only a single ArbiterInfo interface is provided.  Its purpose is
 to allow one to find out:</p>
 <ul class="simple">
 <li>Whether the resource for which it is arbitrating use is currently in use or not</li>
-<li>Which client is using it. †</li>
+<li>Which client is using it.</li>
 </ul>
 <p>One can view ArbiterInfo as an interface for obtaining global information about
 the use of a resource, while Resource can be viewed as an interface for obtaining
@@ -907,16 +890,18 @@ to grant requests made by its clients in an FCFS fashion.</p>
 <p>All of the default queuing policies provided in tinyos-2.x along with the
 respective arbitration components that have been built using them are
 given below:</p>
-<blockquote>
-<p>Queuing Policies:
-- FcfsResourceQueueC
-- RoundRobinResourceQueueC</p>
-<p>Arbiters:
-- SimpleFcfsArbiterC
-- FcfsArbiterC
-- SimpleRoundRobinArbiterC
-- RoundRobinArbiterC</p>
-</blockquote>
+<p>Queuing Policies:</p>
+<ul class="simple">
+<li>FcfsResourceQueueC</li>
+<li>RoundRobinResourceQueueC</li>
+</ul>
+<p>Arbiters:</p>
+<ul class="simple">
+<li>SimpleFcfsArbiterC</li>
+<li>FcfsArbiterC</li>
+<li>SimpleRoundRobinArbiterC</li>
+<li>RoundRobinArbiterC</li>
+</ul>
 <p>Keep in mind that neither the implementation of an arbiter nor its
 queuing policy can be used to explicitly restrict access to an
 underlying shared resource.  The arbiter simply provides a standardized