performance evaluation of semi-fixed-priority ...τ i τ i τ i split od i w m t i t t i t mandatory...

8
PERFORMANCE EVALUATION OF SEMI-FIXED-PRIORITYSCHEDULING ON PRIORITIZED SMT PROCESSORS Hiroyuki Chishiro and Nobuyuki Yamasaki School of Science for Open and Environment Systems Keio University, Yokohama, Japan {chishiro,yamasaki}@ny.ics.keio.ac.jp ABSTRACT Responsive Multithreaded Processor (RMTP) has the Si- multaneous Multithreading (SMT) architecture with prior- ity for distributed real-time processings, called prioritized SMT architecture. In RMTP, execution efficiencies of tasks executing in threads except the highest priority thread fluc- tuate by multiple combinations of tasks executing simulta- neously. Therefore, it is difficult to guarantee the schedu- lability of tasks. Many real-time scheduling algorithms having only real-time part is not well suited to the prior- itized SMT architecture. Because they cannot make use of the remaining times of threads except the highest pri- ority thread. In contrast, semi-fixed-priority scheduling has an optional part which is a non-real-time part and im- proves the quality of the result so that semi-fixed-priority scheduling is well suited to the prioritized SMT architec- ture. This paper evaluates the performance of semi-fixed- priority scheduling on prioritized SMT processors. Exper- imental evaluations show that semi-fixed-priority schedul- ing is well suited to prioritized SMT processors. KEY WORDS Scheduling, Operating Systems, Real-Time and Embedded Systems, Semi-Fixed-Priority Scheduling 1 Introduction Real-time systems such as autonomous mobile robots [2, 6, 14] require high throughput and schedulability. Moreover, autonomous mobile robots run in uncertain environments so that the ratio of Actual Case Execution Time (ACET) to Worst Case Execution Time (WCET) is fluctuated. In order to achieve these real-time systems on uniprocessors is difficult due to lack of CPU resources so that Simultane- ous Multithreading (SMT) [17, 16] and Chip Multiprocess- ing (CMP) [13] architectures are well used. SMT shares hardware resources in hardware threads so that SMT can make use of more hardware resources than CMP. However, SMT is difficult to guarantee the schedulability of hard- ware threads. Barre et al. analyze the predictability of various policies implemented in SMT processors to con- trol the sharing of resources by concurrent threads [1]. Un- fortunately, the confliction of hardware resources occurs in these policies because the hardware threads in SMT pro- cessors have the same priorities. In order to overcome the weakness of SMT, we have developed Responsive Multi- threaded Processor (RMTP) [19]. RMTP has the SMT architecture with priority for dis- tributed real-time processings, called prioritized SMT ar- chitecture. In RMTP, execution efficiencies of tasks exe- cuting in threads except the highest priority thread fluctu- ate by multiple combinations of tasks executing simultane- ously. Therefore, it is difficult to guarantee the schedula- bility of tasks. Many real-time scheduling algorithms with only real-time part with Liu and Layland’s model such as Rate Monotonic (RM) [12] is not well suited to the prior- itized SMT architecture. Because they cannot make use of the remaining times of threads except the highest prior- ity thread. In contrast, semi-fixed-priority scheduling such as Rate Monotonic with Wind-up Part (RMWP) [3] has an optional part which is a non-real-time part and improves the quality of the result, called reward, in the extended im- precise computation model [8, 10]. Therefore, semi-fixed- priority scheduling is well suited to the prioritized SMT architecture to improve reward. This paper evaluates the performance of semi-fixed- priority scheduling on prioritized SMT processors from various aspects. We measure the prioritized SMT execution in RMTP and reward in semi-fixed-priority scheduling. Ex- perimental evaluations show that the prioritized SMT exe- cution executes each thread by prioritized order and semi- fixed-priority scheduling can make use of prioritized SMT execution to improve reward. The contribution of this paper is an effective combina- tion of prioritized SMT architecture and real-time schedul- ing. We believe that semi-fixed-priority scheduling is well suited to many real-time systems in prioritized SMT pro- cessors. The remainder of this paper is organized as follows: Section 2 introduces our prioritized SMT processor, called RMTP. Section 3 describes the system model. Section 4 explains semi-fixed-priority scheduling and RMWP. Sec- tion 5 shows how to implement RMWP on RMTP. The ef- fectiveness of semi-fixed-priority scheduling on prioritized SMT processors is evaluated in Section 6. Section 7 dis- cusses whether other real-time scheduling algorithms ex- cept semi-fixed-priority scheduling can be adapted to pri- oritized SMT processors. Finally we offer concluding re- marks in Section 8.

Upload: others

Post on 08-Feb-2021

2 views

Category:

Documents


0 download

TRANSCRIPT

  • PERFORMANCE EVALUATION OF SEMI-FIXED-PRIORITY SCHEDULINGON PRIORITIZED SMT PROCESSORS

    Hiroyuki Chishiro and Nobuyuki YamasakiSchool of Science for Open and Environment Systems

    Keio University, Yokohama, Japan{chishiro,yamasaki}@ny.ics.keio.ac.jp

    ABSTRACTResponsive Multithreaded Processor (RMTP) has the Si-

    multaneous Multithreading (SMT) architecture with prior-ity for distributed real-time processings, called prioritizedSMT architecture. In RMTP, execution efficiencies of tasksexecuting in threads except the highest priority thread fluc-tuate by multiple combinations of tasks executing simulta-neously. Therefore, it is difficult to guarantee the schedu-lability of tasks. Many real-time scheduling algorithmshaving only real-time part is not well suited to the prior-itized SMT architecture. Because they cannot make useof the remaining times of threads except the highest pri-ority thread. In contrast, semi-fixed-priority schedulinghas an optional part which is a non-real-time part and im-proves the quality of the result so that semi-fixed-priorityscheduling is well suited to the prioritized SMT architec-ture. This paper evaluates the performance of semi-fixed-priority scheduling on prioritized SMT processors. Exper-imental evaluations show that semi-fixed-priority schedul-ing is well suited to prioritized SMT processors.

    KEY WORDSScheduling, Operating Systems, Real-Time and EmbeddedSystems, Semi-Fixed-Priority Scheduling

    1 Introduction

    Real-time systems such as autonomous mobile robots [2, 6,14] require high throughput and schedulability. Moreover,autonomous mobile robots run in uncertain environmentsso that the ratio of Actual Case Execution Time (ACET)to Worst Case Execution Time (WCET) is fluctuated. Inorder to achieve these real-time systems on uniprocessorsis difficult due to lack of CPU resources so that Simultane-ous Multithreading (SMT) [17, 16] and Chip Multiprocess-ing (CMP) [13] architectures are well used. SMT shareshardware resources in hardware threads so that SMT canmake use of more hardware resources than CMP. However,SMT is difficult to guarantee the schedulability of hard-ware threads. Barre et al. analyze the predictability ofvarious policies implemented in SMT processors to con-trol the sharing of resources by concurrent threads [1]. Un-fortunately, the confliction of hardware resources occurs inthese policies because the hardware threads in SMT pro-cessors have the same priorities. In order to overcome the

    weakness of SMT, we have developed Responsive Multi-threaded Processor (RMTP) [19].

    RMTP has the SMT architecture with priority for dis-tributed real-time processings, called prioritized SMT ar-chitecture. In RMTP, execution efficiencies of tasks exe-cuting in threads except the highest priority thread fluctu-ate by multiple combinations of tasks executing simultane-ously. Therefore, it is difficult to guarantee the schedula-bility of tasks. Many real-time scheduling algorithms withonly real-time part with Liu and Layland’s model such asRate Monotonic (RM) [12] is not well suited to the prior-itized SMT architecture. Because they cannot make useof the remaining times of threads except the highest prior-ity thread. In contrast, semi-fixed-priority scheduling suchas Rate Monotonic with Wind-up Part (RMWP) [3] has anoptional part which is a non-real-time part and improvesthe quality of the result, called reward, in the extended im-precise computation model [8, 10]. Therefore, semi-fixed-priority scheduling is well suited to the prioritized SMTarchitecture to improve reward.

    This paper evaluates the performance of semi-fixed-priority scheduling on prioritized SMT processors fromvarious aspects. We measure the prioritized SMT executionin RMTP and reward in semi-fixed-priority scheduling. Ex-perimental evaluations show that the prioritized SMT exe-cution executes each thread by prioritized order and semi-fixed-priority scheduling can make use of prioritized SMTexecution to improve reward.

    The contribution of this paper is an effective combina-tion of prioritized SMT architecture and real-time schedul-ing. We believe that semi-fixed-priority scheduling is wellsuited to many real-time systems in prioritized SMT pro-cessors.

    The remainder of this paper is organized as follows:Section 2 introduces our prioritized SMT processor, calledRMTP. Section 3 describes the system model. Section 4explains semi-fixed-priority scheduling and RMWP. Sec-tion 5 shows how to implement RMWP on RMTP. The ef-fectiveness of semi-fixed-priority scheduling on prioritizedSMT processors is evaluated in Section 6. Section 7 dis-cusses whether other real-time scheduling algorithms ex-cept semi-fixed-priority scheduling can be adapted to pri-oritized SMT processors. Finally we offer concluding re-marks in Section 8.

  • LP1

    LP0

    LP2

    t1 t2 t

    Execution Efficiency

    Task1 Task2 Task3

    Figure 1. Effectiveness of prioritized SMT execution

    Mandatory part Optional part Wind-up part

    Discarded

    Completed

    Terminated

    Figure 2. Extended imprecise computation model

    2 Prioritized SMT Processor

    RMTP [19] has 8-way SMT architecture so that RMTP canexecute eight hardware threads simultaneously. In this pa-per, the hardware thread in RMTP is called Logical Proces-sor (LP).

    Figure 1 shows the effectiveness of prioritized SMTexecution. There are three tasks running in LP0−LP2 andthe task with smaller ID has higher priority. Task1 in LP0is the highest so that the execution efficiency of task1 isalso the highest. When task1 in LP0 is completed at t1, thelower priority tasks (task2 and task3) in LP1-LP2 increasetheir execution efficiencies. When task2 in LP1 is com-pleted at t2, task3 in LP2 increases its execution efficiency.In prioritized SMT processors, the highest priority task canget hardware resources every time. The prioritized SMTprocessor can guarantee the schedulability of the highestpriority task as same as that of the uniprocessors. More-over, tasks except the highest priority task can get hardwareresources which higher priority tasks do not use.

    3 System Model

    Figure 2 shows the extended imprecise computation model[8, 10]. The extended imprecise computation model addsthe wind-up part to the imprecise computation model [11].The imprecise computation model assumes that the pro-cessing to terminate or complete the optional part is notrequired. However, image processing tasks in autonomousmobile robots require the processings to output the results.They must guarantee the schedulability of them so that theextended imprecise computation model has the wind-uppart.

    We assume that the system has RMTP and a task

    Table 1. Tasks in our autonomous mobile robot

    Task Period [ms]Motor control 1.0Status check 1.0Actuator control 1.0Sensor processing 2.0Task manager 10.0Data sharing 10.0Self-localization 10.0Motion control 100.0Sound localization 100.0

    τ1 τ2tt

    Mandatory part Optional part Wind-up part

    Figure 3. Optional deadline

    set Γ consisted of n tasks with harmonic period rela-tions. We discuss why tasks have harmonic period re-lations. Table 1 shows tasks in our autonomous mobilerobot [15, 14], periods of which are harmonic relations.There is strong evidence that task sets are harmonic pe-riod relations. Task τi is represented as the following tuple(Ti, Di, ODi,mi, oi, wi): where Ti is the period, Di is therelative deadline, ODi is the optional deadline, mi is theWCET of the mandatory part, oi is the Required ExecutionTime (RET) of the optional part and wi is the WCET of thewind-up part. The RET of each optional part tends to be un-derestimated or overestimated from time to time, becauseautonomous mobile robots run in uncertain environments.The relative deadline Di of each task τi is equal to its Ti.The jth instance of τi is called job τi,j . The utilization ofeach periodic task is defined as Ui = (mi + wi)/Ti. Thereason why Ui does not include oi is because the optionalpart of τi is a non-real-time part so that completing it is norelevant to scheduling the task set successfully. Hence, theutilization of the system within n tasks can be defined asU =

    ∑ni=1 Ui. All tasks are ordered by decreasing priority

    so that τ1 has the shortest period. The remaining executiontime of τi at time t is represented as Ri(t).

    An optional deadline is a time when an optional partis terminated and a wind-up part is released. Each wind-up part is ready to be executed after each optional dead-line and can be completed if each mandatory part is com-pleted by each optional deadline. Figure 3 shows the op-tional deadline of each task. Solid up arrow, solid downarrow and dotted down arrow represent release time, dead-line and optional deadline respectively. Task τ1 completesits mandatory part by OD1 and executes its optional partuntil OD1. After OD1, then τ1 executes its wind-up part.In contrast, task τ2 does not complete its mandatory part byOD2. When τ2 completes its mandatory part, τ2 executesits wind-up part and does not execute its optional part.

  • τi

    τi

    τi

    Split

    ODiw

    m

    Ti

    Ti

    Ti

    tMandatory part Wind-up part

    Figure 4. Split one extended imprecise task into two gen-eral tasks

    τi

    τi

    Ri(t)

    general

    semi-fixed-priority

    mi+wi

    mi

    wi

    general scheduling

    semi-fixed-priority scheduling

    tmi mi+wi ODi+wi0 DiODiMandatory part Wind-up part

    Figure 5. General scheduling and semi-fixed-priorityscheduling

    4 Semi-Fixed-Priority Scheduling

    Semi-fixed-priority scheduling [3] is part-level fixed-priority scheduling with the extended imprecise computa-tion model. Semi-fixed-priority scheduling fixes the prior-ity of each part in the extended imprecise task and changesthe priority of each extended imprecise task only in thetwo cases: when the extended imprecise task completesits mandatory part and begins its optional part and whenthe extended imprecise task terminates or completes its op-tional part and begins its wind-up part. In addition, semi-fixed-priority scheduling splits one extended imprecise taskinto two general tasks. The two general tasks have sameperiods and same or different release times, cannot be ex-ecuted simultaneously and are scheduled by fixed-priorityin Figure 4. Task τmi and τ

    wi are the mandatory part and

    the wind-up part of τi respectively. In addition, the releasetimes of the first jobs of τmi and τ

    wi are 0 and ODi respec-

    tively. When there is no task which is ready to execute itsmandatory or wind-up part, each task executes its optionalpart.

    Figure 5 shows the difference between generalscheduling such as RM and EDF with Liu and Layland’s

    RTQ

    SQ

    Priority

    NRTQScheduler

    Mandatory part Optional part Wind-up partSleep Empty

    Figure 6. Task queue

    model [12] and semi-fixed-priority scheduling with the ex-tended imprecise computation model [8, 10]. In generalscheduling, when τi is released at 0, then Ri(t) is set tomi+wi and monotonically decreasing until R i(t) becomes0 at mi +wi. In semi-fixed-priority scheduling, when τ i isreleased at 0, then Ri(t) is set to mi and monotonically de-creasing until Ri(t) becomes 0 at mi. When Ri(t) is 0 atmi, then τi sleeps until ODi. When τi is released at ODi,then Ri(t) is set to wi and monotonically decreasing untilRi(t) becomes 0 at ODi + wi. If τi does not complete itsmandatory part by ODi, then Ri(t) is set to wi at the timewhen τi completes its mandatory part. In both schedulings,task τi completes its wind-up part by Di.

    RMWP [3] is one of semi-fixed-priority schedulingalgorithms with the extended imprecise computation modelon uniprocessors. As shown in Figure 6, RMWP managesthree task queues: Real-Time Queue (RTQ), Non-Real-Time Queue (NRTQ) and Sleep Queue (SQ). RTQ holdstasks which are ready to execute their mandatory or wind-up parts in RM order. One task is not ready to execute itsmandatory and wind-up parts simultaneously. NRTQ holdstasks which are ready to execute their optional parts in RMorder. Every task in RTQ has higher priority than that inNRTQ. SQ holds tasks which complete their optional partsby their optional deadlines or their wind-up parts by theirdeadlines. Figure 7 shows RMWP algorithm. RMWP exe-cutes each scheduling event when the following conditionsare met: 1) when τi becomes ready; 2) when τi completesits mandatory part; 3) when τi completes its optional part;4) when ODi expires; 5) when τi completes its wind-uppart; 6) when there are one or multiple tasks in RTQ; 7)when there is no task in RTQ and there are one or multi-ples tasks in NRTQ. In order to terminate the optional part,each task has the optional deadline. The optional deadlineof each task is calculated by Response Time Analysis forOptimal Optional Deadline with Harmonic task sets (RTA-OODH) [3]. The optimal optional deadline ODk of taskτk is defined as the time when the assignable time of τk in[ODk, Dk) is equal to wk if the ACET of each task is al-ways equal to its WCET. In order to describe RTA-OODH,we show the following theorems in [3].

  • 1. When τi becomes ready, set Ri(t) to mi, dequeue τi fromSQ and enqueue τi to RTQ. If τi has the highest priorityin RTQ, preempt the current task.

    2. When τi completes its mandatory part:

    (a) If ODi expired, set Ri(t) to wi.

    (b) Otherwise setRi(t) to oi, dequeue τi from RTQ andenqueue τi to NRTQ. If there are one or multipletasks in RTQ or NRTQ which have higher prioritythan τi, preempt τi.

    3. When τi completes its optional part, dequeue τi fromNRTQ and enqueue τi to SQ.

    4. When ODi expires:

    (a) If τi is in RTQ and does not complete its mandatorypart, do nothing.

    (b) If τi is in NRTQ, terminate and dequeue τi fromNRTQ, set Ri(t) to wi and enqueue τi to RTQ. If τihas the highest priority in RTQ, preempt the currenttask.

    (c) If τi is in SQ, dequeue τi from SQ, set Ri(t) to wiand enqueue τi to RTQ.

    5. When τi completes its wind-up part, dequeue τi from RTQand enqueue τi to SQ.

    6. When there are one or multiple tasks in RTQ, perform RMin RTQ.

    7. When there is no task in RTQ and there are one or multi-ples tasks in NRTQ, perform RM in NRTQ.

    Figure 7. RMWP algorithm

    Theorem 1 (Worst Case Interference Time by Higher Pri-ority Tasks). The worst case interference time I ik(i < k)which is the upper bound time when τk is interfered by τiis

    Iik =

    ⌈TkTi

    ⌉(mi + wi).

    Theorem 2 (Assignable Time with Harmonic Task Sets).The assignable time Ak of task τk except wk is

    Ak = Dk − wk −k−1∑i=0

    Iik.

    Theorem 3 (Worst Case Interference Time in [0, ODk)).The worst case interference time Ik of τk in [0, ODk) is

    Ik =

    k−1∑i=0

    (⌈ODkTi

    ⌉mi +

    ⌈ODk −ODi

    Ti

    ⌉wi

    ).

    Theorem 4 (RTA-OODH). The optimal optional deadlineODk of task τk with harmonic task sets is

    ODk = Ak + Ik.

    τ3

    0

    τ2

    τ1

    5 10 15 20

    I3

    0

    5

    10

    A3

    Mandatory part Optional part Wind-up part

    OD3

    t

    t

    Figure 8. Example of schedule generated by RMWP withRTA-OODH

    Figure 8 shows an example of schedule by RMWPusing RTA-OODH with the following task set Γ ={τ1 = (5, 5, 4, 1, 0, 1), τ2 = (10, 10, 8, 2, 0, 1), τ3 =(20, 20, 14, 2, 2, 2)} on uniprocessors. Every ODi is cal-culated by theorem 4. For example, we calculate OD3 ofτ3 and the process of OD3 through time is shown in thebottom part of Figure 8. The optional deadline OD 3 bytheorem 4 is 14. Therefore, job τ3,1 can execute its optionalpart in [7, 8) and [13, 14).

    Figure 8 is an example of schedule on uniprocessors.In RMTP, tasks except the highest priority task run simulta-neously. Therefore, we consider the effective use of semi-fixed-priority scheduling to improve reward on RMTP.

    5 Implementation

    In this section, we explain how to implement RMWP toRT-Est [4], which is a real-time operating system for semi-fixed-priority scheduling, in RMTP.

    Here, we explain how to create and execute tasks inRMTP. Figure 9 shows startup function. When an op-erating system is boot in RMTP, the task with thread ID0 (TH0) runs in LP0. In startup function, TH0 makesthreads (TH1-TH7) in LP1-LP7 by mkth instruction im-plemented as an inline function in RT-Est. There are two

  • #define NR_LPS 8void startup(void){

    int i;for (i = 0; i < NR_LPS - 1; i++) {

    mkth(i + 1, func);runth(i + 1);

    }}

    Figure 9. startup function

    void task(void *arg){

    while (1) {exec_task();stopslf();

    }}

    Figure 10. task function

    arguments in mkth function, where the first argument isthe thread ID and the second argument is the start programcounter of the thread. Next TH0 starts to execute TH1-TH7in LP1-LP7 respectively by runth inline function, wherethe first argument is the thread ID.

    Next we show how to execute periodic tasks with Liuand Layland’s model [12] before showing how to executethem with the extended imprecise computation model [8,10].

    Figure 10 shows task function, which is a functionfor periodic tasks with Liu and Layland’s model. Each taskruns in task function. When each task is released, thetask calls exec_task function, which is a task-specificfunction. After completing exec_task function, the taskcalls stopslf, which is an inline function for stopslfinstruction to stop its own thread. When this is the releasetime of each task, TH0 calls runth inline function, wherethe first argument is the thread ID, in the timer interruptroutine. This sequential operation is the periodic task exe-cution with Liu and Layland’s model in RMTP.

    Figure 11 shows extask function, which is a func-tion for periodic tasks with the extended imprecise compu-tation model. As previously shown in Figure 2, there arethree parts in the extended imprecise computation model:mandatory part, optional part and wind-up part. Now weexplain how to implement the extended imprecise compu-tation model for RMWP.

    First, each task saves its contexts including gen-eral purpose registers and its program counter insave_context function. save_context function re-turns MANDATORY unless this function is called by thetimer interrupt routine to terminate its optional part at itsoptional deadline. If this function is called by the timer in-terrupt routine to terminate its optional part at its optional

    void extask(void *arg){

    while (1) {part = save_context();switch (part) {case MANDATORY:exec_mandatory();res = end_mandatory();

    case OPTIONAL:if (res != DISCARD) {

    exec_optional();end_optional();

    }case WINDUP:exec_windup();

    }stopslf();

    }}

    Figure 11. extask function

    deadline, this function returns WINDUP.Next each task executes its mandatory part in

    exec_mandatory function. When each task completesits mandatory part, then the task calls end_mandatoryfunction, which checks whether there is an assignable timeof each optional part. If there is an assignable time ofeach optional part, the task executes its optional part inexec_optional function. Otherwise, discard its op-tional part and executes its wind-up part in exec_windupfunction. If the task completes its mandatory part, callend_optional function and next call exec_windupfunction. If the task terminates its optional part at its op-tional deadline, call save_context function in the timerinterrupt routine and resume the context of the task, thenreturn save_context function in extask by hookingthe return address of the task. In this situation, the returnvalue of save_context function is WINDUP so that thetask executes its wind-up part in exec_windup function.After completing its wind-up part, the task calls stopslffunction like task function in Figure 10. This sequentialoperation is the periodic task execution with the extendedimprecise computation model in RMTP.

    6 Experimental Evaluations

    In this section, we evaluate the performance of semi-fixed-priority scheduling on RMTP. Table 2 shows the specifi-cation of RMTP. The WCET analysis of each task is toopessimistic or under multiple specific conditions such as nouse cache [5, 18]. In this evaluation, we do not use cache tomeasure the more precise WCET of each task. Moreover,we load the binary of RT-Est to SDARM, the read/writecost of which is higher than that of SRAM. We implementRMWP to RT-Est to measure the effectiveness of the prior-itized SMT execution and semi-fixed-priority scheduling.

  • Table 2. Specification of RMTP

    Clock frequency 31.25MHzSDRAM 64MBSRAM 256KBI-Cache/D-Cache each 32KB (Harvard)Fetch width 8Issue width 4Integer register 32-bit x 32-entry x 8-setInterger renaming register 32-bit x 64-entryFP register 64-bit x 8-entry x 8-setFP renaming register 64-bit x 64-entryALU 4 + 1(Divider)FPU 2 + 1(Divider)64-bit ALU 1FP vector unit 1(4FPU x 2line)Branch unit 2Memory access unit 1

    void recursive(int depth){

    if (depth

  • 0

    10

    20

    30

    40

    50

    60

    70

    80

    1 2 3 4 5 6 7

    Fini

    shin

    g T

    ime

    [μs]

    LP

    recursive-avgrecursive-max

    Figure 14. Finishing time of recursive function

    550560570580590600610620630640

    1 2 3 4 5 6 7

    Fini

    shin

    g T

    ime

    [μs]

    LP

    inverse-avginverse-max

    Figure 15. Finishing time of inverse function

    6.2 Reward

    We evaluate the reward of optional part in semi-fixed-priority scheduling. In mandatory part, we assume thateach task executes the data read operation from devicesin exec_mandatory function, the execution time ofwhich is very few. In optional part, each task executesthe infinite loop with counting the number of iterationsin exec_optional function to measure the reward. Inwind-up part, each task executes one of the following pro-cessings in exec_windup function: nop, recursiveor inverse, where nop is no operation, recursiveis recursive function in Figure 12 and inverse isinverse function in Figure 13.

    Now we explain how to calculate the optional dead-line of each task in RMTP. We make use of the finish-ing times of both recursive and inverse functionsin Figure 14 and 15 respectively. We consider that theWCET of wind-up part wi executing recursive andinverse functions are 1.2 times (safety margin) as sameas the maximum finishing time of those. However, RTA-OODH in theorem 4 is not well suited to prioritized SMTprocessor so that we set the optional deadline as follows:ODi = Di − wi. This equation can improve more rewardthan RTA-OODH in theorem 4.

    0

    20

    40

    60

    80

    100

    120

    140

    1 2 3 4 5 6 7

    # of

    Iter

    atio

    ns

    LP

    nop recursive inverse

    Figure 16. Number of interations

    Figure 16 shows the number of iterations in each LP.The priority of each thread is higher and higher, the num-ber of iterations is larger and larger. The number of itera-tions in recursive drops slightly because the WCET ofrecursive is from 26μs to 59μs in Figure 14 so that theCPU utilization of each task with 1ms period is approx-imately 2.6% to 5.9%. In contrast, the number of itera-tions in inverse drops dramatically because the WCETof inverse is from 579μs to 616μs in Figure 15 so thatthe CPU utilization of each task with 1ms period is approx-imately 57.9% to 61.6%. In RMTP, tasks except the highestpriority task can be executed simultaneously unlike unipro-cessors so that semi-fixed-priority scheduling can make useof the prioritized SMT execution to improve reward.

    7 Related Work

    In this section, we compare our work with related work.Direct Priority Mapping (DPM) [7] and Shorter Pe-

    riod Upper (SPU) [7] are fixed-priority scheduling algo-rithms on prioritized SMT processors. DPM and SPU re-quire guaranteeing execution efficiencies of tasks in LPsexcept the highest priority LP. The control of execution ef-ficiency of each task is difficult so that we have developedthe IPC control method [20]. However, the current versionof RMTP does not implement the IPC control method inreal-chip level.

    Mandatory-First with Wind-up Part (M-FWP) [8, 10]and Slack Stealer for Optional Parts (SS-OP) [9] are EDF-based dynamic-priority scheduling algorithms with the ex-tended imprecise computation model on uniprocessors. M-FWP and SS-OP calculate the assignable time of each op-tional part dynamically. However, guaranteeing executionefficiencies of tasks in LPs except the highest priority LPis difficult. In order to guarantee the schedulability of eachtask, the assignable time of each task in LPs except thehighest LP must be set to 0. That is to say, the assignabletime of each optional part on prioritized SMT processorsis equal to that on uniprocessors. Therefore, M-FWP andSS-OP cannot make use of the prioritized SMT execution.

  • RMWP [3] is a semi-fixed-priority scheduling algo-rithm and does not calculate the assignable time of eachoptional part dynamically, thanks to optional deadline. Un-like M-FWP and SS-OP, RMWP can make use of the pri-oritized SMT execution.

    8 Concluding Remarks

    This paper evaluates the performance of semi-fixed-priorityscheduling on RMTP. Experimental evaluations show thatprioritized SMT execution using the same tasks can achieveearlier finishing time in higher priority tasks. Moreover,semi-fixed-priority scheduling can improve more reward tomake use of the prioritized SMT execution so that semi-fixed-priority scheduling is well suited to prioritized SMTprocessors.

    In future work, we will implement the IPC controlmethod in RT-Est to achieve fine-grained prioritized SMTexecution. Moreover, we will evaluate the actual tasks inautonomous mobile robots, as shown in Table 1. In addi-tion, we will consider the effectiveness of cache in RMTP,because RMTP has the prioritized cache replacement pol-icy, which is more suitable than LRU replacement policyin real-time systems. We believe that the combination ofprioritized cache replacement policy and prioritized SMTexecution in RMTP is more effective to improve reward.

    Acknowledgement

    This research was supported by CREST, JST. This researchwas also supported by Grant in Aid for the Global Centerof Excellence Program for ”Center for Education and Re-search of Symbiotic, Safe and Secure System Design” fromthe Ministry of Education, Culture, Sport, and Technologyin Japan.

    References

    [1] J. Barre, C. Rochange, and P. Sainrat. A Predictable Si-multaneous Multithreading Scheme for Hard Real-Time. InProceedings of the 21st International Conference on Archi-tecture of Computing Systems, pages 161–172, Feb. 2008.

    [2] F. R. T. Center. http://www.furo.org/.[3] H. Chishiro, A. Takeda, K. Funaoka, and N. Yamasaki.

    Semi-Fixed-Priority Scheduling: New Priority AssignmentPolicy for Practical Imprecise Computation. In Proceedingsof the 16th IEEE International Conference on Embeddedand Real-Time Computing Systems and Applications, pages339–348, Aug. 2010.

    [4] H. Chishiro and N. Yamasaki. Hybrid O(1) Scheduler inRT-Est Real-Time Operating System. In Proceedings of the12th Summer Workshop on Embedded System Technologies,pages 88–90, Sept. 2010.

    [5] A. Ermedahl. A Modular Tool Architecture for Worst-CaseExecution Time Analysis. PhD thesis, Uppsala University,June 2003.

    [6] F. Kanehiro, H. Hirukawa, and S. Kajita. OpenHRP: OpenArchitecture Humanoid Robotics Platform. The Interna-tional Journal of Robotics Research, 23(2):155–165, 2004.

    [7] S. Kato and N. Yamasaki. Fixed-Priority Scheduling on Pri-oritized SMT Processor. In Proceedings of the 19th IASTEDInternational Conference on Parallel and Distributed Com-puting and Systems, pages 116–123, 2007.

    [8] H. Kobayashi and N. Yamasaki. An Integrated Approachfor Implementing Imprecise Computations. IEICE transac-tions on information and systems, 86(10):2040–2048, 2003.

    [9] H. Kobayashi and N. Yamasaki. RT-Frontier: A Real-TimeOperating System for Practical Imprecise Computation. InProceedings of the 10th IEEE Real-Time and EmbeddedTechnology and Applications Symposium, pages 255–264,May 2004.

    [10] H. Kobayashi, N. Yamasaki, and Y. Anzai. Scheduling Im-precise Computations with Wind-up Parts. In Proceedingsof the 18th International Conference on Computers andTheir Applications, pages 232–235, Mar. 2003.

    [11] K. Lin, S. Natarajan, and J. Liu. Imprecise Results: Uti-lizing Partial Computations in Real-Time Systems. In Pro-ceedings of the 8th IEEE Real-Time Systems Symposium,pages 210–217, Dec. 1987.

    [12] C. Liu and J. Layland. Scheduling Algorithms for Multi-programming in a Hard Real-Time Environment. Journalof the ACM, 20:46–61, 1973.

    [13] K. Olukotun, B. A. Nayfeh, L. Hammond, K. Wilson, andK. Chang. The case for a single-chip multiprocessor. InProceedings of the International Conference on Architec-tural Support for Programming Languages and OperatingSystems, pages 2–11, 1996.

    [14] T. Taira, N. Kamata, and N. Yamasaki. Design and Imple-mentation of Reconfigurable Modular Robot Architecture.In Proceedings of the 2005 IEEE/RSJ International Confer-ence on Intelligent Robots and Systems, pages 3566–3571,2005.

    [15] T. Taira and N. Yamasaki. Functionally Distributed ControlArchitecture for Autonomous Mobile Robots. Journal ofRobotics and Mechatronics, 16(2):217–224, 2004.

    [16] D. M. Tullsen, S. J. Eggers, J. S. Emer, H. M. Levy, J. L.Lo, and R. L. Stamm. Exploiting Choice: Instruction Fetchand Issue on an Implementable Simultaneous Multithread-ing Processor. In Proceedings of the 23rd Annual Interna-tional Symposium on Computer Architecture, pages 191–202, May 1996.

    [17] D. M. Tullsen, S. J. Eggers, and H. M. Levy. SimultaneousMultithreading: Maximizing On-Chip Parallelism. In Pro-ceedings of the 22nd Annual International Symposium onComputer Architecture, pages 392–403, June 1995.

    [18] K. Yamamoto, Y. Ishikawa, and T. Matsui. Portable Exe-cution Time Analysis Method. In Proceedings of the 12thIEEE International Conference on Embedded and Real-Time Computing Systems and Applications, pages 267–270,Aug. 2006.

    [19] N. Yamasaki. Responsive Multithreaded Processor forDistributed Real-Time Systems. Journal of Robotics andMechatronics, 17(2):130–141, 2005.

    [20] N. Yamasaki, I. Magaki, and T. Itou. Prioritized SMT Ar-chitecture with IPC Control Method for Real-Time Pro-cessing. In Proceedings of the 13th IEEE Real-Time andEmbedded Technology and Applications Symposium, pages12–21, Apr. 2007.