Operating Systems for Building Robust Embedded ... - IEEE Xplore

4 downloads 0 Views 576KB Size Report
ABSTRACT. Embedded systems will become more and more complex in the near future. In Japan, ¿ITRON and embedded Linux are popular for building ...
         Tatsuo NakajimaÝ , Midori SugayaÝ , Shuichi OikawaÞ Department of Computer Science, Waseda University Þ Graduate School of Systems and Information Engineering, University of Tsukuba tatsuo, doly@dcl.info.waseda.ac.jp, [email protected] Ý

ABSTRACT   

                                                               !        "          #     $%&                          "  "         ' " "           

    "            (        

                   )   *                      )      "  )                              + $%&                (   1.

INTRODUCTION      ,     " -./ 

  "   

  "     ,      "     ,       "

      "             -0/ !    "  

*         "   1     "  

               #  ,                          *                          ,         "         "                            "               !     

              1               

#   ,     "                  "         "               "                ,    "        *   2&       

      +           #

  *          *                                                 3                  *     "  "   Æ                   

        "            

                                                                 !         "          #    $%&       '               

"  "         ' " "          

    "            (        

                   )   *                      )       "  )                              + $%&                (                

    0                 

               4      *                      5                      #   $%&              6       2. LINUX AND ITRON             "                              (  *       "        (        !     "  

        (     (                                   "    "             

Proceedings of the 10th IEEE International Workshop on Object-Oriented Real-Time Dependable Systems (WORDS’05) 0-7695-2347-1/05 $20.00 © 2005

IEEE

 

Protected Domain

          

                        

Application

 

   

     



                   

     





                       

ITRON Kernel

!" 

Server

Application

Server Proxies

Server Proxies

ITRON Kernel

ITRON Kernel



       

        

Server Server

Application

.....

Application



Protected Domain

Application

Application

             

Protected Domain

TL4 Microkernel

#        

     $%      &         

            

 

         

      

     #                  ' #      (  )      #           #    









    

¯



                      

!"      #    

       #   

+$        &  

!"

!"     #    

           



                    /        & 

!"   #  

!"   #        

   

¯

!"  *   

     4 &   

   

      

!"           + 

¯

         ,     

              &    4 &   

             

  &    

   

    

      

              

3.

A MICROKERNEL-BASED OPERATING SYSTEM FOR BUILDING ROBUST EMBEDDED SYSTEMS                

               &   

            &  

                 &         

 

          &  



  

      7       

3.1 System Overview    8            



        



  &      



!" &   9        

      

  



!" &      

                   

   

         



!" & 

 

       

               

                

 -           .    

+                 



               / 

     4           

   

             

   &          

 

                       &     



  &   



        

     

  &      

   +            

       $  +     

 /           

                

  

                                         +$

   &       

   &     

         

    &    /   





!" &  

      

        &   

 

     

           

    



    



!" & 





4   /            

               

                

*  

      

                          





!" &  

 #0

&  123

  & 



  &   

!" &     4 & 

   





   4 &       

  

!"  *  153     

         

   

3.2 Design             

     

         



   !"  *

!" &  

           ,   6

   :     

 *   



  &   



        

123







  &  





  & 

IEEE

!" & 

 

   #0

& 

             

!" & 





  & 

  #0



&  :                     $  " 

Proceedings of the 10th IEEE International Workshop on Object-Oriented Real-Time Dependable Systems (WORDS’05) 0-7695-2347-1/05 $20.00 © 2005



!" &  

   



㱘ITRON Kernel Machine Independent Part

Machine Dependent Part Device Drivers

Notification of Scheduling Events

Main Execution Thread

Interrupt Emulation Threads Processor Emulator

                

       

                        

3.2.1

ITRON Kernel on

 Microkernel

      

   

      *+,                 #          !                              !      

        

         !    !  -!            -!               (                 

      !             -!          !     

                       !   !                 .    .       !      .         

     !                     

!   !!          #  $  .           -!     !  !      !                  !                    ! -!





3.2.1.2 Time Management.

        

                    

                                           

                  

          !    

          "  #        !     !      $  !   "                                    %     &!  '               

     

                                    

              %               (                !     

                  (                        !                              !                

                             

!    !          

     !

  !       !             (           

          !                                            !                        

             

                                  /                                                             /                      !          

       .    (           !                     

              !                  (           !                                                         &                                                 !     /             "     !  

3.2.1.1 Controlling Interrupts.

# !                !                .   *+,  !   









)!          Æ          ! *+,    (  





3.2.1.3 Dealing with External Scheduling Events.

Proceedings of the 10th IEEE International Workshop on Object-Oriented Real-Time Dependable Systems (WORDS’05) 0-7695-2347-1/05 $20.00 © 2005

IEEE

                                                           !    "                   #   

                  $                                                                %                                

3.2.1.4 Dealing with Idle State.

&                              &          %    

                              '  (                  % 

         &                                           

 #                                                       % 

            

3.2.2

 Microkernel

                          

    '         '    %                #    

                                  "   

                                                       #        )* 

          

                                       + ¯      +          

                                                                          "

¯          +     

         

      "      

             ¯        +        

                         "          &                    

                 ,  -       3.2.1.4.

3.3 Evaluation &   (  %   %                       /01++23        /0           

    ))! 45 )     

       06 %                

       & %                      %                  

         #       78  ) 9:; /  )*   8  )                     *)> #                 ?66  

3.3.1 Memory Footprints    @     3                             3              

                =;17                        0A17$                   0?17                               #                

  

 /    " %  

3 

3.3.2 Invocation Latencies &              

                B ; ,.  , .                        

          %     C                  #    @  : #    @             #   @ 

          : @ :  ;                  #   @  :         

Proceedings of the 10th IEEE International Workshop on Object-Oriented Real-Time Dependable Systems (WORDS’05) 0-7695-2347-1/05 $20.00 © 2005

IEEE

                             

    !

     

    !

        

            "    # $ " '(     ) *+ ,##   &  " '(     ) *+ ,##   &  Application Task 1 T2: Receive Character

Application Task 1 Application Task 2

Application Task 2

T2: Receive Character T3: Receive Character

T3: Receive Character

T1:Interrupt Handler T1: Interrupt Handler

㱘ITRON Kernel Interrupt from a Serial Device

㱘ITRON Kernel TL4 Microkernel

Interrupt from a Serial Device

(a) Original 㱘ITRON Kernel

(b) 㱘ITRON Kernel on TL4 Microkernel

       !  

  !  " #   " *  &( .& ( & & &&% ( * &( .& / /   & * * ) 0 ( * ( && 0 (           (   

   ( . % ( &&  &  + &( .& ( (          # 0 & ( 1      0  (  # & (  ( (  2 1  & *  & & (    & 0 . % (  +  )  (  # (  (  

  &( .& (  & &     2   *.  (  .

&&% ( & 0 (          ) ) & (   && 0 (  &.  (   (  1 #   (   &&  ( # )  3&   *  +% ( && &( . ( (   &&      (              * 0 (  +  )  (  # ( % (    4 . 0     ) )& (   # ( 5& &    # (   0  ( &    ) /  .  # ,##   & /   &.  ( (

  % ( && 0       % & 0 (           % & 0 (     % (  2    & (

&& 0 65& &+& #   )  (  ( &     &

#  0 (      ( /  (

 &.  (  0  (  #   (   (      ( % (    4 . 0     ) ) & + ( 1  &.  (  0  ,##   &   ,##   &  &  ( &#(  #   )& # )  *+ (  

 % (  &   2    (    #( *.  ( . &&% &   ( ##   & &.  (  & # 1 0   (      (  0 ( & 0 (         % (  &/ ( .) / (  2    ( & *. (% ( && 0  

   % %!! %-

     &

%! &

&

-% &

&

%! &

    %! & 0 (        1

   %- & 0 (     % (          & ##  + .  & . ( (     % 7  )& 1  &   * # 0     ( & & 0 ( &  2  % 3.4 Current Status

8    + & ( &+&    * ( 6      ( 6   % ( &+& .  &#1 #   &     0 .  )   ) 0 . 0    # #   &+&&   &1 * . +% ( #   &+& &  &  # && *    * ( 6    % 0  ##   9 & ) + 0& &# &/    * &    ( #1 #  &%  ( ( (/ 0  ##   9 &  & )  &    #  &/( ##   &(  *    6 % 8   & #   (1.  ( #      & 0   & 0.   * &  &#  ) # &%    ( #  0 .  * &  *+ *   1 #+/ (   &+&  &     * &  .( &  & & # *&   0 % 8 ()  #  *   . #   &+&  ( #  0 . % ( #   &+& & && 0  # 0 # & & ( &   &+& #    . &+& 1 # % ( # &   9

+ * *.( (

#  & &(% ( #   &+& *& &  *   * * &+& (  *  ) + 9

+ .(  &+& &  & & # *% 4. A LINUX-BASED OPERATING SYSTEM FOR BUILDING ROBUST EMBEDDED SYSTEMS 4.1 Introduction

(   6  (& &)  # *&  * & 0 0  * &+&&% 8(  & ##   # 1 &    .    / ( # & + 1 &      0 ':; # + 0 ( & # & 1  + # &&& * & (& # &&&   ) ( ':;

# + 0 +  (  1&(  & ( % 6  2 & * ( (  1&(  & (  1  & ( % 0 (    1  # &&& (      ( 1  & ( / # &&&    (  1

Proceedings of the 10th IEEE International Workshop on Object-Oriented Real-Time Dependable Systems (WORDS’05) 0-7695-2347-1/05 $20.00 © 2005

IEEE

                                          

  

                                                                             

4.2 Related Work   !"#$                

       %     

                                  %    &                      '        

           (               

           

                ")$     

                     %                 *      +%  ,      -        .      &  % )   /  % 0  &   123     /   #23    4%     Æ                       

    "0$     5                %        *     

         .    %       &  /            6 7  8      & 5

    6 7  8   293              

 - -               :          ;                       

4.3 Design and Implementation of Accounting System                                    1