]> rtime.felk.cvut.cz Git - frescor/frsh-forb.git/commitdiff
Resource scheduler renamed to resource allocator
authorMichal Sojka <sojkam1@fel.cvut.cz>
Thu, 13 Nov 2008 13:53:29 +0000 (14:53 +0100)
committerMichal Sojka <sojkam1@fel.cvut.cz>
Thu, 13 Nov 2008 13:53:29 +0000 (14:53 +0100)
The new name is not so confusing as the old one.

30 files changed:
doc/Makefile [new file with mode: 0644]
doc/frsh-forb-arch.svg [moved from doc/dtm-architecture.svg with 97% similarity]
doc/negotiation.svg [moved from doc/contract-flow.svg with 85% similarity]
fres/Makefile.omk
fres/cbroker/Makefile.omk
fres/cbroker/dtm.idl
fres/cbroker/fcb.c
fres/cbroker/fcb.idl
fres/resalloc/Makefile [moved from fres/ressched/Makefile with 100% similarity]
fres/resalloc/Makefile.omk [new file with mode: 0644]
fres/resalloc/fra.idl [moved from fres/ressched/frs.idl with 74% similarity]
fres/resalloc/fra_generic.c [moved from fres/ressched/frs_generic.c with 77% similarity]
fres/resalloc/fra_generic.h [moved from fres/ressched/frs_generic.h with 78% similarity]
fres/resalloc/fres_vres.c [moved from fres/ressched/fres_vres.c with 100% similarity]
fres/resalloc/fres_vres.h [moved from fres/ressched/fres_vres.h with 87% similarity]
fres/resmng/frm.idl
fres/resmng/frm_generic.h
fres/ressched/Makefile.omk [deleted file]
frsh_api/Makefile.omk
frsh_api/frsh_contract.c
frsh_api/frsh_core.c
frsh_api/frsh_forb.h
resources/dummy/Makefile.omk
resources/dummy/fra_dummy.c [moved from resources/dummy/frs_dummy.c with 89% similarity]
resources/dummy/res_dummy.h
resources/dummy/res_dummy_idl.idl
resources/item/Makefile.omk
resources/item/fra_item.c [moved from resources/item/frs_item.c with 90% similarity]
resources/item/item.h
resources/item/tests/test_item.c

diff --git a/doc/Makefile b/doc/Makefile
new file mode 100644 (file)
index 0000000..72c0e87
--- /dev/null
@@ -0,0 +1,12 @@
+FIGS = $(wildcard *.svg)
+
+all: $(FIGS:%.svg=%.pdf)
+
+%.ps: %.svg
+       inkscape -P $@ $<
+
+%-page.pdf: %.ps
+       ps2pdf $< $@
+
+%.pdf: %-page.pdf
+       pdfcrop $< $@
similarity index 97%
rename from doc/dtm-architecture.svg
rename to doc/frsh-forb-arch.svg
index adebc2851da62178eaca60479d957751a0a749d0..b6033c69039d0f5cdfa4996cc4baccd91f707f6f 100644 (file)
      inkscape:zoom="1.0633221"
      inkscape:cx="526.18109"
      inkscape:cy="372.04724"
-     inkscape:current-layer="layer1"
+     inkscape:current-layer="g5379"
      inkscape:document-units="px"
      showgrid="false"
      inkscape:snap-global="false"
-     inkscape:window-width="1672"
-     inkscape:window-height="989"
-     inkscape:window-x="0"
+     inkscape:window-width="1272"
+     inkscape:window-height="963"
+     inkscape:window-x="1680"
      inkscape:window-y="0"
      inkscape:snap-intersection-line-segments="true"
      inkscape:object-paths="true"
          x="177.16187"
          style="font-size:20px;font-style:normal;font-weight:normal;text-align:center;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
          xml:space="preserve"><tspan
-           id="tspan5290"
-           y="379.10352"
-           x="180.34546"
-           sodipodi:role="line">Contract </tspan><tspan
            id="tspan2480"
+           y="379.10352"
+           x="177.16187"
+           sodipodi:role="line">Contract Broker</tspan><tspan
            y="404.10352"
            x="177.16187"
-           sodipodi:role="line">Broker</tspan><tspan
+           sodipodi:role="line"
+           id="tspan3686">Agent</tspan><tspan
            id="tspan3292"
            y="429.10352"
            x="177.16187"
-           sodipodi:role="line">(CB)</tspan></text>
+           sodipodi:role="line">(CBA)</tspan></text>
       <text
          id="text5292"
          y="533.09766"
            id="tspan6382"
            y="263.97168"
            x="354.08392"
-           sodipodi:role="line">Scheduler</tspan><tspan
+           sodipodi:role="line">Allocator</tspan><tspan
            id="tspan6384"
            y="288.97168"
            x="354.08392"
            id="tspan6390"
            y="122.81683"
            x="354.08392"
-           sodipodi:role="line">Scheduler</tspan><tspan
+           sodipodi:role="line">Allocator</tspan><tspan
            id="tspan6392"
            y="147.81683"
            x="354.08392"
          y="379.10352"
          id="text3287"><tspan
            sodipodi:role="line"
-           x="880.34546"
+           x="877.16187"
            y="379.10352"
-           id="tspan3289">Contract </tspan><tspan
+           id="tspan3291">Contract Broker</tspan><tspan
            sodipodi:role="line"
            x="877.16187"
            y="404.10352"
-           id="tspan3291">Broker</tspan><tspan
+           id="tspan3690">Agent</tspan><tspan
            id="tspan3294"
            sodipodi:role="line"
            x="877.16187"
-           y="429.10352">(CB)</tspan></text>
+           y="429.10352">(CBA)</tspan></text>
       <path
          style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:3;stroke-linecap:butt;stroke-linejoin:miter;marker-start:url(#Arrow1Mstart);marker-end:url(#Arrow1Mend);stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
          d="M 630,398 L 410,398"
            sodipodi:role="line"
            x="914.08392"
            y="263.97168"
-           id="tspan6460">Scheduler</tspan><tspan
+           id="tspan6460">Allocator</tspan><tspan
            sodipodi:role="line"
            x="914.08392"
            y="288.97168"
            sodipodi:role="line"
            x="914.08392"
            y="122.81683"
-           id="tspan6468">Scheduler</tspan><tspan
+           id="tspan6468">Allocator</tspan><tspan
            sodipodi:role="line"
            x="914.08392"
            y="147.81683"
similarity index 85%
rename from doc/contract-flow.svg
rename to doc/negotiation.svg
index 613bb0ca075dadfdb0aee8fed42e463a9629635a..62600ee00e4a1e9420db8732e2aa1ff57c6b3bf2 100644 (file)
@@ -14,7 +14,7 @@
    id="svg2383"
    sodipodi:version="0.32"
    inkscape:version="0.46"
-   sodipodi:docname="contract-flow.svg"
+   sodipodi:docname="negotiation.svg"
    inkscape:output_extension="org.inkscape.output.svg.inkscape"
    version="1.0"
    inkscape:export-filename="/home/wsh/frescor/doc/prezentations/contract-flow.png"
    inkscape:export-ydpi="120">
   <defs
      id="defs2385">
+    <marker
+       inkscape:stockid="Arrow1Sstart"
+       orient="auto"
+       refY="0.0"
+       refX="0.0"
+       id="Arrow1Sstart"
+       style="overflow:visible">
+      <path
+         id="path3403"
+         d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z "
+         style="fill-rule:evenodd;stroke:#000000;stroke-width:1.0pt;marker-start:none"
+         transform="scale(0.2) translate(6,0)" />
+    </marker>
     <marker
        inkscape:stockid="Arrow1Mstart"
        orient="auto"
@@ -63,9 +76,9 @@
      borderopacity="1.0"
      inkscape:pageopacity="0.0"
      inkscape:pageshadow="2"
-     inkscape:zoom="1.0294392"
-     inkscape:cx="526.18111"
-     inkscape:cy="372.04725"
+     inkscape:zoom="0.75639358"
+     inkscape:cx="526.18109"
+     inkscape:cy="305.02694"
      inkscape:current-layer="layer2"
      inkscape:document-units="px"
      showgrid="false"
      inkscape:window-height="963"
      inkscape:window-x="1680"
      inkscape:window-y="0"
-     inkscape:object-paths="false"
-     inkscape:object-nodes="false"
+     inkscape:object-paths="true"
+     inkscape:object-nodes="true"
      objecttolerance="6"
      gridtolerance="10000"
      guidetolerance="2"
-     showguides="false"
+     showguides="true"
      inkscape:guide-bbox="true"
      inkscape:snap-global="true"
      inkscape:snap-nodes="true"
      showborder="true"
      inkscape:connector-spacing="3"
      units="cm"
-     borderlayer="false">
-    <sodipodi:guide
-       orientation="1,0"
-       position="31.084887,647.92561"
-       id="guide3344" />
-    <sodipodi:guide
-       orientation="1,0"
-       position="93.254661,643.0686"
-       id="guide3346" />
-  </sodipodi:namedview>
+     borderlayer="false"
+     inkscape:snap-intersection-line-segments="true"
+     inkscape:snap-intersection-grid-guide="false"
+     inkscape:snap-center="true"
+     inkscape:snap-bbox="true"
+     inkscape:bbox-paths="true"
+     inkscape:bbox-nodes="true" />
   <metadata
      id="metadata2388">
     <rdf:RDF>
      inkscape:label="Contract flow"
      style="display:inline"
      transform="translate(-58.52032,-298.67903)">
+    <path
+       style="fill:#ececec;fill-rule:evenodd;stroke:#e6e6e6;stroke-width:0;stroke-linecap:butt;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;display:inline"
+       d="M 477.54254,911.7526 L 537.85861,727.83495 L 477.54254,563.43876 L 477.54254,911.7526 z"
+       id="path3400"
+       sodipodi:nodetypes="cccc" />
+    <path
+       sodipodi:nodetypes="cccc"
+       id="path3398"
+       d="M 869.15502,613.82509 L 829.58941,721.38487 L 869.15503,876.22677 L 869.15502,613.82509 z"
+       style="fill:#ececec;fill-rule:evenodd;stroke:#e6e6e6;stroke-width:0;stroke-linecap:butt;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;display:inline" />
+    <path
+       style="fill:#ececec;fill-rule:evenodd;stroke:#e6e6e6;stroke-width:0;stroke-linecap:butt;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;display:inline"
+       d="M 594.99419,528.00887 L 672.84522,577.51265 L 764.06857,528.00887 L 594.99419,528.00887 z"
+       id="path2613"
+       sodipodi:nodetypes="cccc" />
     <g
        id="g3427"
        transform="translate(112.83129,1.814797)">
        id="g3969"
        transform="matrix(0.8,0,0,0.8,193.40503,295.89545)">
       <rect
-         style="fill:#ffc0c0;fill-opacity:1;stroke:#000000;stroke-width:0;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
+         style="fill:#ffc0c0;fill-opacity:1;stroke:none;stroke-width:0;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
          id="rect3260"
          width="330.51944"
          height="436.59048"
          height="56.853191"
          width="297.75656"
          id="rect3525"
-         style="fill:#ff5f5f;fill-opacity:1;stroke:#000000;stroke-width:0;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
+         style="fill:#ff5f5f;fill-opacity:1;stroke:none;stroke-width:0;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
       <rect
          y="477.86197"
          x="37.179413"
          height="207.17691"
          width="297.75662"
          id="rect3337"
-         style="opacity:1;fill:#ff5b5b;fill-opacity:1;stroke:#000000;stroke-width:0;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
+         style="opacity:1;fill:#ff5b5b;fill-opacity:1;stroke:none;stroke-width:0;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
       <text
          xml:space="preserve"
          style="font-size:17.5px;font-style:normal;font-weight:normal;text-align:start;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
              style="font-size:15px">Variant A</tspan></text>
       </g>
       <rect
-         style="fill:#ff3232;fill-opacity:0.71428576;stroke:#000000;stroke-width:0;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
+         style="fill:#ff5b5b;fill-opacity:1;stroke:none;stroke-width:0;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
          id="rect3266"
          width="115.63361"
          height="34.305229"
          height="34.305229"
          width="115.63361"
          id="rect3282"
-         style="fill:#ff3232;fill-opacity:0.71428576;stroke:#000000;stroke-width:0;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
+         style="fill:#ff5b5b;fill-opacity:1;stroke:none;stroke-width:0;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
       <text
          id="text3284"
          y="639.38306"
            height="65.525719"
            width="297.75656"
            id="rect3290"
-           style="fill:#ff3232;fill-opacity:0.71428576;stroke:#000000;stroke-width:0;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
+           style="fill:#ff5b5b;fill-opacity:1;stroke:none;stroke-width:0;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
         <text
            id="text3292"
            y="714.26227"
          height="34.305229"
          width="115.63361"
          id="rect3360"
-         style="fill:#ff3232;fill-opacity:0.71428576;stroke:#000000;stroke-width:0;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
+         style="fill:#ff5b5b;fill-opacity:1;stroke:none;stroke-width:0;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
       <text
          id="text3362"
          y="594.27081"
            x="253.53751"
            sodipodi:role="line">Basic params B</tspan></text>
       <rect
-         style="fill:#ff3232;fill-opacity:0.71428576;stroke:#000000;stroke-width:0;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
+         style="fill:#ff5b5b;fill-opacity:1;stroke:none;stroke-width:0;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
          id="rect3366"
          width="115.63361"
          height="34.305229"
            x="183.70613"
            sodipodi:role="line">Resource</tspan></text>
       <rect
-         style="fill:#ff5f5f;fill-opacity:1;stroke:#000000;stroke-width:0;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
+         style="fill:#ff5f5f;fill-opacity:1;stroke:none;stroke-width:0;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
          id="rect3317"
          width="297.75656"
          height="33.910725"
          height="245.85005"
          width="211.34297"
          id="rect3553"
-         style="fill:#ffc0c0;fill-opacity:1;stroke:#000000;stroke-width:0;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
+         style="fill:#ffc0c0;fill-opacity:1;stroke:none;stroke-width:0;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
       <text
          id="text3559"
          y="360.68256"
          height="34.305229"
          width="188.35999"
          id="rect3571"
-         style="fill:#ff5f5f;fill-opacity:1;stroke:#000000;stroke-width:0;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
+         style="fill:#ff5f5f;fill-opacity:1;stroke:none;stroke-width:0;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
       <text
          id="text3573"
          y="394.80029"
            sodipodi:role="line"
            id="tspan3575">Basic params A</tspan></text>
       <rect
-         style="fill:#ff5f5f;fill-opacity:1;stroke:#000000;stroke-width:0;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
+         style="fill:#ff5f5f;fill-opacity:1;stroke:none;stroke-width:0;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
          id="rect3585"
          width="189.63651"
          height="34.305229"
          height="65.525719"
          width="189.63651"
          id="rect3595"
-         style="fill:#ff5f5f;fill-opacity:1;stroke:#000000;stroke-width:0;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
+         style="fill:#ff5f5f;fill-opacity:1;stroke:none;stroke-width:0;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
       <text
          id="text3597"
          y="486.99249"
       <g
          id="g3333">
         <rect
-           style="fill:#5599ff;fill-opacity:1;stroke:#000000;stroke-width:0;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
+           style="fill:#5599ff;fill-opacity:1;stroke:none;stroke-width:0;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
            id="rect2517"
            width="189.63651"
            height="34.305229"
        id="g4037"
        transform="matrix(0.8,0,0,0.8,321.43306,346.28177)">
       <rect
-         style="fill:#ffc0c0;fill-opacity:1;stroke:#000000;stroke-width:0;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
+         style="fill:#ffc0c0;fill-opacity:1;stroke:none;stroke-width:0;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
          id="rect3913"
          width="213.33945"
          height="328.00211"
            x="790.51447"
            y="360.68256">Schedulable contract</tspan></text>
       <rect
-         style="fill:#ff5f5f;fill-opacity:1;stroke:#000000;stroke-width:0;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
+         style="fill:#ff5f5f;fill-opacity:1;stroke:none;stroke-width:0;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
          id="rect3919"
          width="187.05562"
          height="34.305229"
          height="34.305229"
          width="188.33209"
          id="rect3925"
-         style="fill:#ff5f5f;fill-opacity:1;stroke:#000000;stroke-width:0;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
+         style="fill:#ff5f5f;fill-opacity:1;stroke:none;stroke-width:0;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
       <text
          id="text3927"
          y="439.91254"
            x="792.39233"
            sodipodi:role="line" /></text>
       <rect
-         style="fill:#ff5f5f;fill-opacity:1;stroke:#000000;stroke-width:0;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
+         style="fill:#ff5f5f;fill-opacity:1;stroke:none;stroke-width:0;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
          id="rect3933"
          width="188.33211"
          height="65.525719"
          style="display:inline"
          id="g3338">
         <rect
-           style="fill:#5599ff;fill-opacity:1;stroke:#000000;stroke-width:0;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
+           style="fill:#5599ff;fill-opacity:1;stroke:none;stroke-width:0;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
            id="rect3340"
            width="188.85432"
            height="34.305229"
            id="tspan3419"
            y="1051.2797"
            x="745.43298"
-           sodipodi:role="line">Interface to the real scheduler</tspan><tspan
+           sodipodi:role="line">Interface to resource scheduler</tspan><tspan
            y="1070.0297"
            x="745.43298"
            sodipodi:role="line"
            sodipodi:role="line"
            x="981.74658"
            y="609.59222"
-           id="tspan5412">Scheduler</tspan></text>
+           id="tspan5412">Allocator</tspan></text>
     </g>
     <text
        id="text4753"
            id="tspan2602"
            y="584.72406"
            x="1028.0212"
-           sodipodi:role="line">Real</tspan><tspan
+           sodipodi:role="line">Resource</tspan><tspan
            y="609.72406"
            x="1028.0212"
            sodipodi:role="line"
          x="212.97842"
          sodipodi:role="line"
          id="tspan4969">communication</tspan></text>
+    <text
+       xml:space="preserve"
+       style="font-size:16px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:center;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:URW Bookman L;-inkscape-font-specification:URW Bookman L"
+       x="95.197464"
+       y="224.39403"
+       id="text2599"
+       transform="translate(58.52032,298.67903)"><tspan
+         sodipodi:role="line"
+         id="tspan2601"
+         x="95.197464"
+         y="224.39403" /></text>
+    <text
+       id="text2603"
+       y="169.35637"
+       x="-815.56897"
+       style="font-size:16px;font-style:normal;font-weight:normal;text-align:start;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
+       xml:space="preserve"
+       transform="matrix(0,-1,1,0,0,0)"><tspan
+         y="169.35637"
+         x="-815.56897"
+         id="tspan2605"
+         sodipodi:role="line">Contract blocks</tspan></text>
+    <path
+       style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-start:url(#Arrow1Mstart);stroke-miterlimit:4;stroke-dasharray:none;marker-mid:none;marker-end:none"
+       d="M 164.62823,314.6075 L 116.69742,449.41249"
+       id="path2609"
+       transform="translate(58.52032,298.67903)"
+       sodipodi:nodetypes="cc" />
+    <path
+       style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-start:url(#Arrow1Mstart);stroke-miterlimit:4;stroke-dasharray:none;marker-mid:none;marker-end:none"
+       d="M 164.62823,453.64507 L 164.62823,453.64507 L 116.73997,449.51912"
+       id="path2611"
+       transform="translate(58.52032,298.67903)"
+       sodipodi:nodetypes="ccc" />
+    <path
+       sodipodi:nodetypes="cc"
+       id="path11031"
+       d="M 222.9849,867.79048 L 175.19238,748.02798"
+       style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker-start:url(#Arrow1Mstart);marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
+    <path
+       sodipodi:nodetypes="cc"
+       id="path11033"
+       d="M 222.88565,656.80227 L 175.19238,748.14008"
+       style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker-start:url(#Arrow1Mstart);marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
   </g>
 </svg>
index e877a718c801f751da4b5f1fccdbe7db2ecd70ef..6e6d8e254134bdc0637d30feb924ee1ee798a382 100644 (file)
@@ -1 +1 @@
-SUBDIRS=contract cbroker resmng ressched
+SUBDIRS=contract cbroker resmng resalloc
index d827ca9ccfa7a63e1502ae057a63458691f310d1..0d74860dfaa8e1e94a3c14c629af158923e1dd66 100644 (file)
@@ -1,7 +1,7 @@
 bin_PROGRAMS += fcb
 
 fcb_SOURCES = fcb.c
-fcb_LIBS = contract fosa forb pthread rt ulut frm_client frs_client
+fcb_LIBS = contract fosa forb pthread rt ulut frm_client fra_client
 fcb_SERVER_IDL = fcb.idl
 
 lib_LIBRARIES += fcb_client 
index 2f5aa2c06787d7a25c268fb24d12276c275b8c4f..d15d59461a639886c4a9c7796055b03cb2a4a002 100644 (file)
@@ -14,7 +14,7 @@ module cm {
                long get_contract(in contract_handle_t handle);
                void negotiate_contract(inout contract_t contract);
                void register_manager(in resource_type restype, in resource_manager m);
-               void register_scheduler(in resource_type restype, in resource_scheduler r);
+               void register_allocator(in resource_type restype, in resource_allocator r);
        };
 };
 
index 6dc9a00dc9dde73b16ed33b79deb40144240afa0..41795eb647db395b94569f91c9b84391ebb03d62 100644 (file)
@@ -83,16 +83,16 @@ struct res_mng {
        gavl_node_t node;
        struct res_key resource;
        fres_resource_manager rm; /**< Object reference of the resource manager */
-       gavl_cust_root_field_t schedulers; /**< Registered schedulers for this resource (from multiple applications/nodes) */
+       gavl_cust_root_field_t allocators; /**< Registered allocators for this resource (from multiple applications/nodes) */
 };
 
 /**
- * Resource scheduler registered in different nodes/applications 
+ * Resource allocator registered in different nodes/applications 
  */
-struct res_sched {
+struct res_alloc {
        gavl_node_t node;
        forb_server_id app;
-       fres_resource_scheduler rs;
+       fres_resource_allocator ra;
 };
 
 struct fcb {
@@ -132,20 +132,20 @@ GAVL_CUST_NODE_INT_IMP(fcb_resource   /* cust_prefix */,          \
                       resource       /* cust_item_key */,              \
                       res_key_cmp    /* cust_cmp_fnc */);
 
-GAVL_CUST_NODE_INT_DEC(fcb_sched        /* cust_prefix */,             \
+GAVL_CUST_NODE_INT_DEC(fcb_alloc        /* cust_prefix */,             \
                       struct res_mng   /* cust_root_t */,              \
-                      struct res_sched /* cust_item_t */,              \
+                      struct res_alloc /* cust_item_t */,              \
                       forb_server_id   /* cust_key_t */,               \
-                      schedulers       /* cust_root_node */,           \
+                      allocators       /* cust_root_node */,           \
                       node             /* cust_item_node */,           \
                       app              /* cust_item_key */,            \
                       fres_contract_id_cmp /* cust_cmp_fnc */);
 
-GAVL_CUST_NODE_INT_IMP(fcb_sched        /* cust_prefix */,             \
+GAVL_CUST_NODE_INT_IMP(fcb_alloc        /* cust_prefix */,             \
                       struct res_mng   /* cust_root_t */,              \
-                      struct res_sched /* cust_item_t */,              \
+                      struct res_alloc /* cust_item_t */,              \
                       forb_server_id   /* cust_key_t */,               \
-                      schedulers       /* cust_root_node */,           \
+                      allocators       /* cust_root_node */,           \
                       node             /* cust_item_node */,           \
                       app              /* cust_item_key */,            \
                       forb_server_id_cmp /* cust_cmp_fnc */);
@@ -163,7 +163,7 @@ negotiate_contract(fres_contract_broker obj,
        fres_block_resource *res;
        struct res_key res_key;
        struct res_mng *rm;
-       struct res_sched *rs;
+       struct res_alloc *ra;
        int ret;
        forb_server_id app;
        fres_contract_ptr contract_seq_buf;
@@ -193,11 +193,11 @@ negotiate_contract(fres_contract_broker obj,
        contract->id = *id;
 
        forb_get_req_source(obj, &app);
-       rs = fcb_sched_find(rm, &app);
-       if (!rs) {
+       ra = fcb_alloc_find(rm, &app);
+       if (!ra) {
                char str[60];
                forb_server_id_to_string(str, &app, sizeof(str));
-               ul_logerr("No resource scheduler found for %d.%d and %s\n",
+               ul_logerr("No resource allocator found for %d.%d and %s\n",
                          res_key.type, res_key.id, str);
                ret = -1;
                goto err;
@@ -227,7 +227,7 @@ negotiate_contract(fres_contract_broker obj,
        }
 
        /* Create VRes */
-       ret = fres_resource_scheduler_change_vreses(rs->rs, schedulable_contracts, ev);
+       ret = fres_resource_allocator_change_vreses(ra->ra, schedulable_contracts, ev);
        if (CORBA_sequence_get_release(schedulable_contracts)) {
                int i;
                for (i=0; i<schedulable_contracts->_length; i++) {
@@ -271,7 +271,7 @@ CORBA_long register_resource(fres_contract_broker obj,
                                  restype, resid);
                        forb_object_release(rm2->rm);
                        fcb_resource_delete(fcb, rm2);
-                       /* TODO: Delete also all schedulers associated
+                       /* TODO: Delete also all allocators associated
                         * with this stale resource manager. */
                        free(rm);
                        rm = rm2;
@@ -283,7 +283,7 @@ CORBA_long register_resource(fres_contract_broker obj,
        }
        rm->rm = forb_object_duplicate(desc->manager);
 
-       fcb_sched_init_root_field(rm);
+       fcb_alloc_init_root_field(rm);
        ul_logmsg("Registering manager for resource %d.%d\n",
                  restype, resid);
        fcb_resource_insert(fcb, rm);
@@ -295,47 +295,47 @@ err:
 }
 
 
-CORBA_long register_scheduler(fres_contract_broker obj,
+CORBA_long register_allocator(fres_contract_broker obj,
                              const frsh_resource_type_t restype,
                              const frsh_resource_id_t resid,
-                             const fres_resource_scheduler rs_obj,
+                             const fres_resource_allocator ra_obj,
                              CORBA_Environment *ev)
 {
        struct fcb *fcb = o2fcb(obj);
        struct res_mng *rm;
-       struct res_sched *rs;
+       struct res_alloc *ra;
        struct res_key resource;
        forb_server_id server_id;
        char server_id_str[40];
 
-       forb_get_server_id(rs_obj, &server_id);
+       forb_get_server_id(ra_obj, &server_id);
        forb_server_id_to_string(server_id_str, &server_id, sizeof(server_id_str));
-       ul_logmsg("Registering scheduler for resource %d.%d in app %s\n",
+       ul_logmsg("Registering allocator for resource %d.%d in app %s\n",
                  restype, resid, server_id_str);
        
        resource.type = restype;
        resource.id = resid;
        rm = fcb_resource_find(fcb, &resource);
        if (!rm) {
-               ul_logerr("No manager found for %d.%d. Unable to register the scheduler!\n",
+               ul_logerr("No manager found for %d.%d. Unable to register the allocator!\n",
                          restype, resid);
                goto err;
        }
-       rs = fcb_sched_find(rm, &server_id);
-       if (rs) {
-               char *str = forb_object_to_string(rs_obj);
-               ul_logerr("Scheduler from already registered (%s)\n",
+       ra = fcb_alloc_find(rm, &server_id);
+       if (ra) {
+               char *str = forb_object_to_string(ra_obj);
+               ul_logerr("Allocator from already registered (%s)\n",
                          str);
                forb_free(str);
                goto err;
        }
-       rs = malloc(sizeof(*rs));
-       if (!rs) {
+       ra = malloc(sizeof(*ra));
+       if (!ra) {
                goto err;
        }
-       rs->app = server_id;
-       rs->rs = forb_object_duplicate(rs_obj);
-       fcb_sched_insert(rm, rs);
+       ra->app = server_id;
+       ra->ra = forb_object_duplicate(ra_obj);
+       fcb_alloc_insert(rm, ra);
        return 0;
 err:
        return -1;      
@@ -344,7 +344,7 @@ err:
 struct forb_fres_contract_broker_impl impl = {
        .negotiate_contract = negotiate_contract,
        .register_resource = register_resource,
-       .register_scheduler = register_scheduler,
+       .register_allocator = register_allocator,
 };
 
 int main(int argc, char *argv[])
index c4d8e4f6c279aa7d40fccddf0376334611f2e26d..ae7864907286e5039a0935cd4358a0954ac92543 100644 (file)
@@ -60,7 +60,7 @@
 #include "../contract/fres_contract_idl.idl"
 #include "../contract/fres_blocks.idl"
 #include "../resmng/frm.idl"
-#include "../ressched/frs.idl"
+#include "../resalloc/fra.idl"
 
 module fres {
 
@@ -85,7 +85,7 @@ module fres {
                                       in resource_desc        res_desc);
 
                /** 
-                * Registers a resource scheduler with the contract broker
+                * Registers a resource allocator with the contract broker
                 * 
                 * @param restype 
                 * @param resid 
@@ -93,11 +93,11 @@ module fres {
                 * 
                 * @return Zero on success, non-zero error code on error.
                 */
-               long register_scheduler(in frsh_resource_type_t restype,
+               long register_allocator(in frsh_resource_type_t restype,
                                        in frsh_resource_id_t   resid,
-                                       in resource_scheduler   rs_obj);
+                                       in resource_allocator   rs_obj);
                
-               long deregister_scheduler(in resource_scheduler rs_obj);
+               long deregister_allocator(in resource_allocator rs_obj);
 
                /** 
                 * Tries to negotiate a contract 
diff --git a/fres/resalloc/Makefile.omk b/fres/resalloc/Makefile.omk
new file mode 100644 (file)
index 0000000..8f87c12
--- /dev/null
@@ -0,0 +1,8 @@
+shared_LIBRARIES += fra
+fra_SOURCES = fra_generic.c fres_vres.c
+fra_SERVER_IDL = fra.idl
+include_GEN_HEADERS += fra.h
+include_HEADERS = fra_generic.h fres_vres.h
+
+lib_LIBRARIES += fra_client
+fra_client_CLIENT_IDL = fra.idl
similarity index 74%
rename from fres/ressched/frs.idl
rename to fres/resalloc/fra.idl
index 709d89f4d8d2b85f4613d594da2b3526873a739f..73c6edfa8c1a5e871d9a2bc36442c350db049415 100644 (file)
@@ -1,14 +1,23 @@
-#ifndef _RS_IDL
-#define _RS_IDL
+/**
+ * @file   fra.idl
+ * @author Michal Sojka <sojkam1@fel.cvut.cz>
+ * @date   Thu Nov 13 14:05:39 2008
+ * 
+ * @brief  FORB interface to resource allocator
+ * 
+ * 
+ */
+#ifndef _FRA_IDL
+#define _FRA_IDL
 
 #include "../contract/fres_contract_idl.idl"
 
 module fres {
        /**
-        * Interface to the scheduler
+        * Interface to the allocator
         * 
         */
-       interface resource_scheduler {
+       interface resource_allocator {
                /**
                 * Creates or changes VRESes.
                 * 
@@ -17,12 +26,12 @@ module fres {
                 * together with the contract broker ensure that the
                 * state after applying the changes specified by @a
                 * schedulable_contracts parameter is schedulable. It
-                * is up to the scheduler to apply the changes in such
+                * is up to the allocator to apply the changes in such
                 * way that schedulability is maintained during the
                 * change. The changes are received in the same order
                 * as returned by the manager, so if the manager
                 * already prepares the order of aplying changes, the
-                * scheduler can use it.
+                * allocator can use it.
                 *
                 * @param schedulable_contracts Contracts for VRESes
                 * to be created or (if they already exist)
similarity index 77%
rename from fres/ressched/frs_generic.c
rename to fres/resalloc/fra_generic.c
index 48f789733c851c9da2dfe08da9889dcdc0022bd0..30dc4d13aba45313b3b407ac69a88aa82dbed0ff 100644 (file)
@@ -1,20 +1,20 @@
 /**
- * @file   frs_generic.c
+ * @file   fra_generic.c
  * @author Michal Sojka <sojkam1@fel.cvut.cz>
  * @date   Thu Oct 23 15:26:19 2008
  * 
- * @brief  FORB interface of FRES Resource Scheduler
+ * @brief  FORB interface of FRES Resource Allocator
  * 
  * 
  */
 #include <forb.h>
-#include <frs.h>
+#include <fra.h>
 #include <fcb.h>
 #include <ul_log.h>
-#include "frs_generic.h"
+#include "fra_generic.h"
 
-UL_LOG_CUST(ulogd_frs);
-ul_log_domain_t ulogd_frs = {UL_LOGL_MSG, "frs"};
+UL_LOG_CUST(ulogd_fra);
+ul_log_domain_t ulogd_fra = {UL_LOGL_MSG, "fra"};
 
 /**
  * Global "registry" of all virtual resources in one application.
@@ -70,14 +70,14 @@ fres_vreses_find(fres_contract_id_t *id)
 
 #define save_errno(cmd) do { int _e = errno; cmd; errno = _e; } while(0)
 
-CORBA_long change_vreses(fres_resource_scheduler obj,
+CORBA_long change_vreses(fres_resource_allocator obj,
                         const fres_contract_ptr_seq* contracts,
                         CORBA_Environment *ev)
 {
        int ret;
        unsigned len = contracts->_length;
        unsigned i;
-       struct fres_scheduler *sch = forb_instance_data(obj);
+       struct fres_allocator *sch = forb_instance_data(obj);
        struct fres_vres **vreses;
 
        /* Prepare the vres structures */
@@ -106,7 +106,7 @@ CORBA_long change_vreses(fres_resource_scheduler obj,
                        assert(ret > 0); /* Nobody else inserted the same vres. */
                }
                vres->new = contract;
-               vres->scheduler = sch;
+               vres->allocator = sch;
                vreses[i] = vres;
        }
 
@@ -158,12 +158,12 @@ err:
        return ret;
 }
 
-void cancel_vreses(fres_resource_scheduler obj,
+void cancel_vreses(fres_resource_allocator obj,
                   const fres_contract_id_seq* ids,
                   CORBA_Environment *ev)
 {
        int ret, i;
-       struct fres_scheduler *sch = forb_instance_data(obj);
+       struct fres_allocator *sch = forb_instance_data(obj);
 
        for (i=0; i < ids->_length; i++) {
                struct fres_vres *vres;
@@ -181,81 +181,81 @@ void cancel_vreses(fres_resource_scheduler obj,
 err:;
 }
 
-static const struct forb_fres_resource_scheduler_impl frs_impl = {
+static const struct forb_fres_resource_allocator_impl fra_impl = {
        .change_vreses = change_vreses,
        .cancel_vreses = cancel_vreses,
 };
 
 
 /** 
- * Creates scheduler object and registeres it with the given executor.
+ * Creates allocator object and registeres it with the given executor.
  * 
  * @param orb 
  * @param executor 
- * @param scheduler
+ * @param allocator
  * 
  * @return Object reference on success or NULL on error.
  */
-fres_resource_scheduler frs_new(forb_orb orb,
+fres_resource_allocator fra_new(forb_orb orb,
                                forb_executor_t *executor,
-                               struct fres_scheduler *scheduler)
+                               struct fres_allocator *allocator)
 {
        int ret;
-       fres_resource_scheduler frs;
+       fres_resource_allocator fra;
        
-       frs = forb_fres_resource_scheduler_new(orb, &frs_impl, scheduler);
-       if (!frs) {
+       fra = forb_fres_resource_allocator_new(orb, &fra_impl, allocator);
+       if (!fra) {
                save_errno(ul_logerr("forb_fres_resource_manager_new error"));
                goto err;
        }
 
-       /* Prepare executor before we register the resource scheduler
+       /* Prepare executor before we register the resource allocator
         * with contract broker */
-       ret = forb_executor_register_object(executor, frs);
+       ret = forb_executor_register_object(executor, fra);
        if (ret) goto err_release;
 
-       return frs;
+       return fra;
 err_release:
-       save_errno(forb_object_release(frs));
+       save_errno(forb_object_release(fra));
 err:
        return NULL;
 }
 
 
 /** 
- * Creates and registeres the scheduler with contract broker.
+ * Creates and registeres the allocator with contract broker.
  * 
  * @param orb 
  * @param fcb
  * 
  * @param executor Executor which will execute requests for this fres
- * scheduler.
+ * allocator.
  *
- * @param schedule
+ * @param allocato
  * 
  * @return Zero on success, -1 on error.
  */
-int frs_register(forb_orb orb,
+int fra_register(forb_orb orb,
                 fres_contract_broker fcb,
                 forb_executor_t *executor,
-                struct fres_scheduler *scheduler)
+                struct fres_allocator *allocator)
 {
        int ret;
        struct forb_env env;
-       fres_resource_scheduler frs;
+       fres_resource_allocator fra;
 
-       frs = frs_new(orb, executor, scheduler);
-       /* Register resource scheduler */
-       ret = fres_contract_broker_register_scheduler(fcb,
-                                                     scheduler->res_type,
-                                                     scheduler->res_id,
-                                                     frs, &env);
+       fra = fra_new(orb, executor, allocator);
+       /* Register resource allocator */
+       ret = fres_contract_broker_register_allocator(fcb,
+                                                     allocator->res_type,
+                                                     allocator->res_id,
+                                                     fra, &env);
        if (forb_exception_occurred(&env) || ret != 0) {
                goto err_release;
        }
        return 0;
 err_release:
-       save_errno(forb_object_release(frs));
+       save_errno(forb_object_release(fra));
        return -1;
 }
 
@@ -267,7 +267,7 @@ err_release:
  * 
  * @return Pointer to VRes, or NULL in the VRes doesn't exist.
  */
-fres_vres_t *frs_get_vres(fres_contract_id_t *id)
+fres_vres_t *fra_get_vres(fres_contract_id_t *id)
 {
        return fres_vreses_find(id);
 }
similarity index 78%
rename from fres/ressched/frs_generic.h
rename to fres/resalloc/fra_generic.h
index d2007d75a31e464e0071e641b7658ad097749eec..09e4362254896c2dfffc3883acf66e930bd9fb02 100644 (file)
@@ -1,16 +1,16 @@
 /**
- * @file   frs_generic.h
+ * @file   fra_generic.h
  * @author Michal Sojka <sojkam1@fel.cvut.cz>
  * @date   Mon Nov  3 15:32:54 2008
  * 
- * @brief  FORB interface of FRES Resource Scheduler
+ * @brief  FORB interface of FRES Resource Allocator
  * 
  * 
  */
-#ifndef FRS_GENERIC_H
-#define FRS_GENERIC_H
+#ifndef FRA_GENERIC_H
+#define FRA_GENERIC_H
 #include <fcb.h>
-#include <frs.h>
+#include <fra.h>
 #include <fres_contract.h>
 #include <ul_gavlcust.h>
 #include <fosa.h>
@@ -20,7 +20,7 @@
 
 /** Registry of all virtual resources in an application. */
 struct fres_vreses {
-       fosa_mutex_t mutex;     /**< Mutex for manipulation with vreses tree. If all schedulers are executed from one executor, locking can be avoided. */
+       fosa_mutex_t mutex;     /**< Mutex for manipulation with vreses tree. If all allocators are executed from one executor, locking can be avoided. */
        gavl_cust_root_field_t vreses; /**< Container of all virtual resources */
 };
 
@@ -37,16 +37,16 @@ extern struct fres_vreses fres_vreses;
 
 
 /**
- * Structure describing FRES scheduler. It is used as a parameter to
- * frs_register(), which registeres this scheduler with contract
- * broker and provides FORB interface to the real scheduler.
+ * Structure describing FRES allocator. It is used as a parameter to
+ * fra_register(), which registeres this allocator with contract
+ * broker and provides FORB interface to the real allocator.
  * 
  */
-struct fres_scheduler {
+struct fres_allocator {
        frsh_resource_type_t res_type; /**< Resource type */
        frsh_resource_id_t res_id;     /**< Resource ID */
        /** @name Simple interface
-        * The scheduler cannot influence the order of applying changes. */
+        * The allocator cannot influence the order of applying changes. */
        /*@{*/
        /** 
         * Should create the VRES according to the parameters in
@@ -75,10 +75,10 @@ struct fres_scheduler {
        int (*change_vres)(fres_vres_t *vres, void *priv);
        /*@}*/
        /** @name Full interface
-        * The scheduler can influence the order of applying changes. */
+        * The allocator can influence the order of applying changes. */
        /*@{*/
        /**
-        * A more general (and more compilcated) scheduler
+        * A more general (and more compilcated) allocator
         * interface. If this field is non-NULL, the simple interface
         * is not used.
         *
@@ -109,18 +109,18 @@ struct fres_scheduler {
         * @return 
         */
        int (*cancel_vres)(fres_vres_t *vres, void *priv);
-       void *priv;             /**< Pointer to scheduler's private data */
+       void *priv;             /**< Pointer to allocator's private data */
 };
 
-fres_resource_scheduler frs_new(forb_orb orb,
+fres_resource_allocator fra_new(forb_orb orb,
                                forb_executor_t *executor,
-                               struct fres_scheduler *scheduler);
+                               struct fres_allocator *allocator);
 
-int frs_register(forb_orb orb,
+int fra_register(forb_orb orb,
                 fres_contract_broker fcb,
                 forb_executor_t *executor,
-                struct fres_scheduler *scheduler);
+                struct fres_allocator *allocator);
 
-fres_vres_t *frs_get_vres(fres_contract_id_t *id);
+fres_vres_t *fra_get_vres(fres_contract_id_t *id);
 
 #endif
similarity index 87%
rename from fres/ressched/fres_vres.h
rename to fres/resalloc/fres_vres.h
index 289a7a74738f928447c1cc3cad920de823bc5ebf..d10b92fc5f31b99ff4058c4c6e193ed276d878c3 100644 (file)
@@ -4,7 +4,7 @@
 #include <fres_contract_idl.h>
 #include <ul_gavlcust.h>
 
-struct fres_scheduler;
+struct fres_allocator;
 
 /** Description of VRES (virtual resource) */
 typedef struct fres_vres {
@@ -32,15 +32,15 @@ typedef struct fres_vres {
        struct fres_contract *perceived;
 
        /**
-        * The schedulable contract received by the scheduler. The
+        * The schedulable contract received by the allocator. The
         * shceduler callback should use this contract to
         * create/change VRES and must not change the value of this
         * field.
         */
        struct fres_contract *new;
        
-       struct fres_scheduler *scheduler;
-       void *priv;             /**< Resource scheduler private data */
+       struct fres_allocator *allocator;
+       void *priv;             /**< Resource allocator private data */
        gavl_node_t node;
 } fres_vres_t;
 
index ceca196850cb582ac6d70c6c17c9257a26bc4f27..cd5a049e7de0dd9b020db9685d3d37c45e5c0795 100644 (file)
@@ -44,7 +44,7 @@ module fres {
                 * @param[out] schedulable_contracts Schedulable
                 * contracts, for new or changed VRESes. These
                 * contract may be extened by one or more data blocks
-                * for use by the scheduler. The scheduler receives
+                * for use by the allocator. The allocator receives
                 * the contracts in the same order as they are
                 * returned.
                 */
index 7cdead0bbf5d694635216ca54fb3c9eff018e06f..9ba994577427128ef425dfadf5ab08ad6d64c4ef 100644 (file)
@@ -12,7 +12,7 @@
 
 #include <frm.h>
 #include <fres_sa_scenario.h>
-#include <frs_generic.h>
+#include <fra_generic.h>
 
 /**
  * Admission test for a given resource.
diff --git a/fres/ressched/Makefile.omk b/fres/ressched/Makefile.omk
deleted file mode 100644 (file)
index d75d6d9..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-shared_LIBRARIES += frs
-frs_SOURCES = frs_generic.c fres_vres.c
-frs_SERVER_IDL = frs.idl
-include_GEN_HEADERS += frs.h
-include_HEADERS = frs_generic.h fres_vres.h
-
-lib_LIBRARIES += frs_client
-frs_client_CLIENT_IDL = frs.idl
index 6fe21ef999c11b6593ea985a5937d1b74557d84d..37b8d7a68c756c75516585015d09c97c0dfbf67b 100644 (file)
@@ -3,13 +3,13 @@ SUBDIRS = tests
 shared_LIBRARIES = frsh
 frsh_SOURCES = frsh_contract.c frsh_distributed.c frsh_core.c frsh_error.c
 include_HEADERS = frsh_opaque_types.h frsh_forb.h
-frsh_LIBS = fna fcb_client forb contract frs ulut fosa $(scheduler-libs-y)
+frsh_LIBS = fna fcb_client forb contract fra ulut fosa $(allocator-libs-y)
 
 config_include_HEADERS = frsh_resources.h
 frsh_resources_DEFINES = CONFIG_RESOURCE_DUMMY \
                         CONFIG_FWP \
                         CONFIG_RESOURCE_ITEM
 
-scheduler-libs-$(CONFIG_RESOURCE_DUMMY) += frs_dummy
-scheduler-libs-$(CONFIG_RESOURCE_ITEM) += frs_item
-scheduler-libs-$(CONFIG_FWP) += frsh_fwp fwp
+allocator-libs-$(CONFIG_RESOURCE_DUMMY) += fra_dummy
+allocator-libs-$(CONFIG_RESOURCE_ITEM) += fra_item
+allocator-libs-$(CONFIG_FWP) += frsh_fwp fwp
index 825b4bf2cb103d592329fe480fbf42dc1af9fdc1..742225ed940262c89b7b914a200e0b8e3c2d5921 100644 (file)
@@ -14,7 +14,7 @@
 #include <string.h>
 #include <fcb.h>
 #include "frsh_forb.h"
-#include <frs_generic.h>
+#include <fra_generic.h>
 
 /**********************************/
 /* -----===== FRSH API =====----- */
@@ -171,7 +171,7 @@ int frsh_contract_negotiate
        }
 
        if (ret == 0) {
-               *vres = frs_get_vres(&id);
+               *vres = fra_get_vres(&id);
        }
        
        return ret;
index 91e6bc2a991339b6dcc4560a1f09b1dbb78c9d67..62e05b80679345c7c04b4a8f8d90bae5bed74df0 100644 (file)
@@ -18,9 +18,9 @@
 
 struct frsh_forb frsh_forb_global;
 
-static void *sch_executor_thread(void *arg)
+static void *alloc_executor_thread(void *arg)
 {
-       return (void*)forb_executor_run(&frsh_forb_global.sch_executor);
+       return (void*)forb_executor_run(&frsh_forb_global.alloc_executor);
 }
 
 
@@ -41,13 +41,13 @@ int frsh_init()
                goto err;
        }
 
-       /* Initialize resource schedulers */
-       ret = forb_executor_init(&frsh_forb_global.sch_executor);
+       /* Initialize resource allocators */
+       ret = forb_executor_init(&frsh_forb_global.alloc_executor);
        if (ret) goto err;
        
 #ifdef CONFIG_RESOURCE_DUMMY
-       ret = frs_dummy_init(frsh_forb_global.orb, frsh_forb_global.fcb,
-                            &frsh_forb_global.sch_executor);
+       ret = fra_dummy_init(frsh_forb_global.orb, frsh_forb_global.fcb,
+                            &frsh_forb_global.alloc_executor);
        if (ret) goto err;
 #endif
 
@@ -57,14 +57,14 @@ int frsh_init()
 #endif
 
 #ifdef CONFIG_RESOURCE_ITEM
-       ret = frs_item_init(frsh_forb_global.orb, frsh_forb_global.fcb,
-                           &frsh_forb_global.sch_executor);
+       ret = fra_item_init(frsh_forb_global.orb, frsh_forb_global.fcb,
+                           &frsh_forb_global.alloc_executor);
        if (ret) goto err;
 #endif
-       /* Run resource schedulers */
-       fosa_thread_create(&frsh_forb_global.sch_executor_thread, NULL,
-                          sch_executor_thread, NULL);
-
+       /* Run resource allocators */
+       fosa_thread_create(&frsh_forb_global.alloc_executor_thread, NULL,
+                          alloc_executor_thread, NULL);
+       
        return 0;
 err:
        return ret;
index 08aa85a8e63b0368e0d52f248fdde47924190849..8f9c3364a892d583d638a3616e10af14b934abd8 100644 (file)
@@ -9,8 +9,8 @@
 struct frsh_forb {
        forb_orb orb;           /**< ORB used to communicate with contract broker */
        fres_contract_broker fcb; /**< Contract broker object referemce */
-       forb_executor_t sch_executor; /**< Executor to execute schedulers */
-       fosa_thread_id_t sch_executor_thread; /**< Thread to run @a sch_executor */
+       forb_executor_t alloc_executor; /**< Executor to execute allocators */
+       fosa_thread_id_t alloc_executor_thread; /**< Thread to run @a alloc_executor */
 };
 
 extern struct frsh_forb frsh_forb_global;
index 61fd5aebe3f9b7497e3484c39194780baab746a6..c9b8511bae599a27dc4ec0e9f63ca757ee2b8e8b 100644 (file)
@@ -5,10 +5,10 @@ frm_dummy_SOURCES = frm_dummy.c dummy_block.c
 frm_dummy_CLIENT_IDL = res_dummy_idl.idl
 frm_dummy_LIBS = frm forb contract fosa rt ulut fcb_client
 
-shared_LIBRARIES = frs_dummy
-frs_dummy_SOURCES = frs_dummy.c dummy_block.c
-frs_dummy_LIBS = frs
-frs_dummy_CLIENT_IDL = res_dummy_idl.idl
+shared_LIBRARIES = fra_dummy
+fra_dummy_SOURCES = fra_dummy.c dummy_block.c
+fra_dummy_LIBS = fra
+fra_dummy_CLIENT_IDL = res_dummy_idl.idl
 
 include_HEADERS = res_dummy.h
 include_GEN_HEADERS = res_dummy_idl.h
similarity index 89%
rename from resources/dummy/frs_dummy.c
rename to resources/dummy/fra_dummy.c
index 971b21433dc33d5910aa49b98a341cc7699e4c39..2463fcf2870c8045efd9d78937cca4a89b049f37 100644 (file)
@@ -1,5 +1,5 @@
 #include <ul_log.h>
-#include <frs_generic.h>
+#include <fra_generic.h>
 #include "res_dummy.h"
 #include <stdio.h>
 
@@ -57,7 +57,7 @@ static int change_vres(fres_vres_t *vres, void *priv)
 
 static int my_data;
 
-static struct fres_scheduler dummy_scheduler = {
+static struct fres_allocator dummy_allocator = {
        .res_type = DUMMY_RESOURCE_TYPE,
        .res_id = DUMMY_RESOURCE_ID,
        /* Here we are using the "simple interface" */
@@ -67,8 +67,8 @@ static struct fres_scheduler dummy_scheduler = {
        .priv = &my_data
 };
 
-int frs_dummy_init(forb_orb orb, fres_contract_broker fcb, forb_executor_t *executor)
+int fra_dummy_init(forb_orb orb, fres_contract_broker fcb, forb_executor_t *executor)
 {
        fres_block_register_dummy();
-       return frs_register(orb, fcb, executor, &dummy_scheduler);
+       return fra_register(orb, fcb, executor, &dummy_allocator);
 }
index 84a5c1a7051d50d50751473c995222e600fae9f5..189abb9640dfe28a7e2025a4aa56e72ea7a5f987 100644 (file)
@@ -8,7 +8,7 @@
 #define DUMMY_RESOURCE_TYPE FRSH_RT_PROCESSOR
 #define DUMMY_RESOURCE_ID   0
 
-int frs_dummy_init(forb_orb orb, fres_contract_broker fcb, forb_executor_t *executor);
+int fra_dummy_init(forb_orb orb, fres_contract_broker fcb, forb_executor_t *executor);
 int fres_block_register_dummy(void);
 
 #endif
index 1cfa58eefbb1d017c2d155943dc07a90fc0d3880..ff5dd186b7f44a2a7e9efaa5a2862a7add6655ef 100644 (file)
@@ -10,7 +10,7 @@
 module fres {
        module block {
                /// Dummy data to demonstrate information transfer from
-               // manager to scheduler
+               // manager to allocator
                struct dummy_sched {
                        long priority;
                };
index af407d96afb26a9d17a1409eac0f1bbd7710809a..4d91efdd6093f914f58c63edf4199309a9aa3067 100644 (file)
@@ -8,10 +8,10 @@ frm_item_SOURCES = frm_item.c item_blocks.c
 frm_item_SERVER_IDL = item_idl.idl
 frm_item_LIBS = frm forb contract fosa rt ulut fcb_client m
 
-shared_LIBRARIES = frs_item
-frs_item_SOURCES = item_blocks.c frs_item.c
-frs_item_LIBS = frs
-frs_item_CLIENT_IDL = item_idl.idl
+shared_LIBRARIES = fra_item
+fra_item_SOURCES = item_blocks.c fra_item.c
+fra_item_LIBS = fra
+fra_item_CLIENT_IDL = item_idl.idl
 
 include_HEADERS = item.h
 include_GEN_HEADERS = item_idl.h
similarity index 90%
rename from resources/item/frs_item.c
rename to resources/item/fra_item.c
index f80ecf3350e98c8f6a138d5b93deebb3f75ef074..87e8667460ed97a28f7b39026588a68eeb2b05d1 100644 (file)
@@ -1,6 +1,6 @@
 #include <item.h>
 #include <ul_log.h>
-#include <frs_generic.h>
+#include <fra_generic.h>
 #include <stdio.h>
 #include <frsh_distributed.h>
 
@@ -52,7 +52,7 @@ static int change_vres(fres_vres_t *vres, void *priv)
 
 static struct item item;
 
-static struct fres_scheduler item_scheduler = {
+static struct fres_allocator item_allocator = {
        .res_type = FRSH_RT_NETWORK,
        .res_id = FRSH_NETPF_ITEM,
        /* Here we are using the "simple interface" */
@@ -62,7 +62,7 @@ static struct fres_scheduler item_scheduler = {
        .priv = &item
 };
 
-int frs_item_init(forb_orb orb, fres_contract_broker fcb, forb_executor_t *executor)
+int fra_item_init(forb_orb orb, fres_contract_broker fcb, forb_executor_t *executor)
 {
        fres_block_register_item();
        
@@ -71,7 +71,7 @@ int frs_item_init(forb_orb orb, fres_contract_broker fcb, forb_executor_t *execu
                ul_logerr("forb_resolve_reference(item_scheduler) failed\n");
                return errno;
        }
-       return frs_register(orb, fcb, executor, &item_scheduler);
+       return fra_register(orb, fcb, executor, &item_allocator);
 }
 
 /** 
@@ -85,7 +85,7 @@ int frs_item_init(forb_orb orb, fres_contract_broker fcb, forb_executor_t *execu
  * 
  * @return Number of elements returned in @a data array, -1 on error.
  */
-int frs_item_receive(frsh_vres_id_t vres, unsigned *data[])
+int fra_item_receive(frsh_vres_id_t vres, unsigned *data[])
 {
        fres_item_data_seq *seq;
        fres_block_item_nodes *nodes;
index e103d088a11490bf35f884285eafacad8029ebc7..1d0533d76152c0a68c682b355619703feaed3c30 100644 (file)
@@ -6,8 +6,8 @@
 #include <fcb.h>
 
 int fres_block_register_item();
-int frs_item_init(forb_orb orb, fres_contract_broker fcb, forb_executor_t *executor);
-int frs_item_receive(frsh_vres_id_t vres, unsigned *data[]);
+int fra_item_init(forb_orb orb, fres_contract_broker fcb, forb_executor_t *executor);
+int fra_item_receive(frsh_vres_id_t vres, unsigned *data[]);
 
 
 #endif
index 8195c6fcb491c23f656a367c7c019608679510e9..3f21ad47d5201b77583a13d084389c0cb8f9e258 100644 (file)
@@ -57,7 +57,7 @@ int main(int argc, char *argv[])
                printf("Reading data\n");
                for (j=0; j<N; j++) {
                        unsigned *data;
-                       ret = frs_item_receive(vres[j], &data);
+                       ret = fra_item_receive(vres[j], &data);
                        if (ret == -1) PERROR_AND_EXIT(errno, "frs_item_receive");
                        
                        /* TODO: Do something with the received data */