[original file is CABI_CELF_JapanTechnicalJamboree17.pdf by Yuasa, Tripeaks]
[translated by ikoma]


CELF Technical Jamboree #17
Oct. 25, 2007


CABI Supporting SMP

==(Common resource Accounting and Blocking Interfaces)


2

Background

[see original file for pictures]

* Embedded systems getting more diversified and complicated


3

What is CABI?

[See original file for figure]

* Resource Management System

* Effects

                              +------------------+
                              |   Applications   |
                              |+------+ +-------+|
                              || MPEG | |Mailer ||
                              |+------+ +-------+|
                              |+------+ +-------+|
                              || Game | |Browser||
                              |+------+ +-------+|
                              +------------------+



        +-----------------+---------------+
        | Audio and Video |  Downloaded   |
        |  Applications   |  Applications |
        |       60%       |       40%     |
        +-----------------+---------------+


4

Time Specification in CABI

[See original file for figures]

* Execution time of a process is specified as cycle and execution time

                            Execution Time
CPU usage of proces (%) =  ---------------- x 100
                                cycle


   e.g. Set usage as 60% (Execution Time: 60ms; Cycle: 100ms)


                  block                 block
                    |                     |
                    V                     V
       |  Exec Time |        |  Exec Time |
       |    60ms    |        |    60ms    |
       |<---------->|        |<---------->|
process|============|--------|============|--------|--------> t
       0            60      100          160      200
       |<------------------->|<------------------->|<---
                cycle                 cycle
                100ms                 100ms


5

CABI Usage

[See original file for figures]

* Resource allocation for process/thread group

        AO 1                         AO 2
           60%                          30%
           c=60ms                       c=30ms              Bind bash program
           T=100ms                      T=100ms             to the account object 2
                                                            and run it
        TS         TS                RT         RT
      process    process           process    process       # ./cabi_exec_bind 2 /bin/bash


6

CABI System Specification

[See original file for screenshot]

* Emblix


7

System Architecture

[See original file for figures]

* Simple

* Correct

* Independent

    +-------+    +-------+    +-------+
    |Process|    |Process|    |Process|
    +-------+    +-------+    +-------+
        |            |            |
+-------V------------V------------V---------+
|        Accounting API Library             |     User
+--------------------|----------------------+     Mode
---------------------|---------------------------------------
+--------------------V----------------------+     Kernel
|        System Call Interfaces             |     Mode
+-------------------------------------------+
|                   CABI                    |
| +---------------------------------------+ |
| |       Time Management Functions       | |
| +---------------------------------------+ |
|                                           |
|    +----+ +----+ +----+    +--------+     |
|    | AO |-| AO |-| AO |    |Overload|     |
|    |    |-|    |-|    |    |   AO   |     |
|    +----+ +----+ +----+    +--------+     |
+-------------------------------------------+
|             callback hooks                |
+----^-----------^---------^---------^------+
+----|-----------|---------|---------|------+
|+---V---++------V---------V---------V-----+|
||       || +--------++--------++--------+ ||
|| Timer || |schedule||  fork  ||  exit  | ||
||  ISR  || +--------++--------++--------+ ||
||       ||                                ||
||       ||    Process Management System   ||
||       ||                                ||
|+-------++--------------------------------+|
+-------------------------------------------+
|               Linux Kernel                |
+-------------------------------------------+


8

Implementation Published

[See original file for screen shot]

* Published on sourceforge


9

Use of SMP

[See original file for figures]

* sched_setaffinity

    +-----+  +-----+  +-----+  +-----+
    |     |  +=====+  +=====+  +=====+
    |     |  |     |  |     |  |     |
    |     |  | RT  |  | RT  |  | RT  |
    +=====+  |     |  |     |  |     |
    | NRT |  |     |  |     |  |     |
    +=====+  +=====+  +=====+  +=====+
     CPU0     CPU1     CPU2     CPU3


10

CABI Supporting SMP

[See original file for figures]

* Manages execution time of processes per CPU

* Restricts execution time of RT processes

        +-----+  +-----+  +-----+  +-----+
        |     |  |     |  +=====+  +=====+
        +=====+  +=====+  |     |  |     |
        | NRT |  |     |  | RT  |  | RT  |
Resricts+=====+  | RT  |  |     |  |     |
    RT->| RT  |  |     |  |     |  |     |
        +=====+  +=====+  +=====+  +=====+
          CPU0     CPU1     CPU2     CPU3


11

Changes from Conventional CABI

* At building AO

* At binding a process to AO


12

Relation among AOs, CPUs and processes

[See original file for figures]

* At building AO

      P1         AO         P2
                 30%
    +----+     +----+     +----+     +----+
    |CPU0|     |CPU1|     |CPU2|     |CPU3|
    +----+     +----+     +----+     +----+


13

Binding Process to AO

[See original file for figures]

* Transfer the process to the CPU associated with AO

      P1         AO         P2
                 30%
    +----+     +----+     +----+     +----+
    |CPU0|     |CPU1|     |CPU2|     |CPU3|
    +----+     +----+     +----+     +----+


14 [See original file for screen shot]


15

Implementation Status

* Kernel


16

Problem Occurred with RT Kernel

* Unable to call scheduler while interrupt disabled


17

Remaining Issues 1

* Handling the case when a process bound to an AO is set sched_setaffinity

* Building AO without being associated with a single CPU


18

Remaining Issues 2

* Change of interface

* Evaluation assuming more realistic situation




Jamboree17Cabi (last edited 2008-05-07 18:21:58 by localhost)