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
"
( * "
(
! "
( (
"
"
!"
#
$%&
#
'# ()
# !"*
!"#
# !"# !"
!" #
!" #
#
!" +
,
3. A MICROKERNEL-BASED OPERATING SYSTEM FOR BUILDING ROBUST EM- BEDDED SYSTEMS
& &
&
&
- .
/
&
&
+
/
+$ &
&
& /
*
&
!"& &
#0 & 123
!"&4&
!"*153
4& !"*
!"&
,6
TL4 Microkernel
...
ITRON Kernel Application Application Application Protected Domain
Server
Proxies ITRON Kernel
Server Server Server Protected Domain
ITRON Kernel Application Application Application Protected Domain
Server Proxies
¯
/&
+$&
¯
4&
¯ &
4&
&
7
3.1 System Overview
8
&
!"& 9
!"&
!"&
+
4
&
&
$ +
!" &
&
!"&
4/
:
3.2 Design
* & !"&
!" &
& & #0 &
123
!" & & #0
&:
$ "
㱘 ITRON Kernel
Machine Independent Part
Machine Dependent Part
Main Execution Thread
Notification of Scheduling Events
Interrupt Emulation Threads
Device Drivers
Processor Emulator
3.2.1 ITRON Kernel on
Microkernel
!
" #
! ! $
! "
%
&! '
%
(
!
(
!
!
! !
!
3.2.1.1 Controlling Interrupts.
)! Æ
!*+, (
*+,
#
!
!
! ! -!
-!
(
!
-! !
! !
. .
! .
!
! !! #
$ . -!
! ! !
!
!-!
3.2.1.2 Time Management.
! !
(
!
!
/
/
!
.
( !
!
( !
&
!
/ "
!
3.2.1.3 Dealing with External Scheduling Events.
# !
!
. *+,!
!
"
#
$
%
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 )<==823 *)>
*)>#
?66
3.3.1 Memory Footprints
@ 3
3
=;17
0A17$
0?17
#
/ " %
3
3.3.2 Invocation Latencies
&
B ;,. ,.
%C
# @ : #
@
#@
: @:;
#@ :
! !
" #$ % & %! &
"'( )*+,## & %!! & -% &
"'( )*+,## & %- & %! &
T1: Interrupt Handler T2: Receive Character Application Task 1
㱘ITRON Kernel
Interrupt from a Serial Device
T3: Receive Character Application Task 2
㱘ITRON Kernel
Interrupt from a Serial Device T2: Receive Character Application Task 1
T3: Receive Character Application Task 2
T1:Interrupt Handler
TL4 Microkernel
(a) Original 㱘ITRON Kernel (b)
㱘ITRON Kernel on TL4Microkernel
!
! " # "
*&(.&(&&&&% (*&(.&
/ / & * *)0 ( *( &&0 (
(
(.% (&& & +&(.&((
#0&( 1
0 (# &( (( 21
&*&&( &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 % (&+&. 
# & 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
4.2 Related Work
!"#$
%
% &
'
(
")$
%
*
+%, -
. & % )
/ %0 & 123
/ #234%
Æ
"0$ 5
%
*
.%
& /
67 8 & 5
67 8293
- -
: ;
4.3 Design and Implementation of Accounting System
1<
4.3.1 Accounting Objects
- =
&=
%
.<
& %.2= %
> %
=
=%
䎤䏆䏆䏒䏘䏑䏗䏌䏑䏊䎃䎲䏅䏍䏈䏆䏗 䎤䏆䏆䏒䏘䏑䏗䏌䏑䏊䎃䎲䏅䏍䏈䏆䏗
䎳䏕䏒䏆䏈䏖䏖䏈䏖
䎤䏆䏆䏒䏘䏑䏗䏌䏑䏊䎃䎲䏅䏍䏈䏆䏗 䎤䏆䏆䏒䏘䏑䏗䏌䏑䏊䎃䎲䏅䏍䏈䏆䏗
䎳䏕䏒䏆䏈䏖䏖䏈䏖 䎳䏕䏒䏆䏈䏖䏖䏈䏖
䎦 䎦
䎷 䎷
䎤䎲 䏗
䏓䏕䏒䏆䏈䏖䏖䎃 䎦 䎦
䎷 䎷
䎤䎲 䏗
䏓䏕䏒䏆䏈䏖䏖䎃
= %
%
%
= .%
)1 0 =%
) )
)1 0 ))
%
4.3.2 Binding Accounting Objects
& =
=
% & %
=
% = %
%
4.3.3 Implementation
.?
%
'
=
*= %
% =
9
=
9
5
= % 9 4%
%
=
=%
4.3.4 Controlling Overload Situation
-
Process Management
Process Process
scheduler
Linux䇭Kernel ReplenishmentEnforcement
overload
AO AO Timer
ISR
ISR
Process
Process Process
Accounting System Call Accounting API Library
Process
User Space
Accounting
fork exit
AO
Process Management
Process Process
scheduler
Linux䇭Kernel ReplenishmentEnforcement
overload
AO AO Timer
ISR
ISR
Process
Process Process
Accounting System Call Accounting API Library
Process
User Space
Accounting
fork exit
AO
!
4.3.5 High Resolution Timer
"# $%
$%
&'(
!
)*#
4.3.6 Access Control
+
4.3.7 Kernel Interface
#,
*
-
*
.
!
! .
*
!
/ !
!
4.3.8 An Example of Resource Protection
-
0% $%% -
1
0%2 30% 4 $%% 5 0%26
7
4.3.9 An Example to Improve the Response Time
-
0%% # -
#
0%% 8 '%
0%
# 0% $%
'%
4.4 Evaluation
-
#
9%%:870$;:-
4.4.1 Basic Cost
< = #
#
>
§ ¬Ê¼Éw:ʼº
ºÉ¼¸Ë¼
¹ÀÅ»
ÌŹÀÅ»
»¼ÊËÉÆÐ
ʼË
¾¼Ë
4.4.2 Improving the Response Time
!
" #$%
!% $%% &#
##
"#
4.4.3 Protecting CPU Resource
# '
(%$%%)
*
#
+
# (%, #
'
4.5 Current Status
) "" # #
-" # .
"/ #
0 / 1 0
# "
# ) # #
#
2
#
5. CONCLUSION
" #
#
# #
345
#0
"' #
6. REFERENCES
6$7 28 9:"99 2#
;
2.9<4..$++ $$!9 $++
6!7 =)< 29.& >2
99 8"1" ##?
) .
9#2!%%%
6(7 <#@<= .A2
= 9 . 4
9#2= 9
. 4 9#$++B
6C7 =3
DEE E
6F7 /04
8 $++F
6B7 5 >#
& 9;?
9" 111
) 4 38
9#!%%!
6G7 9433
3:D2 3 : <
1 &"
1113#2
9#A" /$+++
67 8"9 2"</<
8#.5 /)
" 2 33
9 ( 9#
4 9#8
0 #$+++
6+7 = 345C%9345
2$+++H /I