Welcome to Scribd, the world's digital library. Read, publish, and share books and documents. See more
Download
Standard view
Full view
of .
Look up keyword
Like this
0Activity
0 of .
Results for:
No results containing your search query
P. 1
Real-Time Systems for Multi-Processor Architectures

Real-Time Systems for Multi-Processor Architectures

Ratings: (0)|Views: 4|Likes:
Published by Sercan Arslan

More info:

Published by: Sercan Arslan on Jun 29, 2012
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as PDF, TXT or read online from Scribd
See more
See less

06/29/2012

pdf

text

original

 
Real-TimeSystemsforMulti-ProcessorArchitecture
Éri
Piel 
Philipp
Marque
Julien 
Soul
Jean-Luc 
Dekeyser 
Laboratoired'informatiquefondamentaledeLillUniversitédessciencesettechnologiesdeLillFrance 
Firstname.Lastname@lifl.fr 
Abstrac
TheARTiSsystemisareal-timeextensionofthe GNU/LinuxschedulerdedicatedtoSMP(SymmetriMulti-Processors)systems.ItallowstomixHighPer formanceComputingandReal-Time.ARTiSexploittheSMParchitecturetoguaranteethepreemptionofprocessorwhenthesystemhastoscheduleareal-timtask.Theimplementationisavailableasamodication oftheLinuxkernelThebasicideaofARTiSistoassignaselectedsetof processorstoreal-timeoperations.Amigrationmecha- nismofnon-preemptibletasksinsuresalatencylevelon thesereal-timeprocessors.Furthermore,specicload- balancingstrategiespermitARTiStobenetfromthe  fullpoweroftheSMPsystems:thereal-timereservation,whileguaranteed,isnotexclusiveanddoesnot implyawasteofresources
1Introduction 
Historically,thenotionsofHighPerformanceComputingandofReal-Timehaveoftenbeenconsidereantinomic,thelatteronebeingmostlyonlyassociated toembeddeddevices.Nowadays,thenumberofap- plicationswhichcanbenetfrombothpropertiesat thesametimeisconstantlyincreasing,inparticularitheeldsofmultimediaandofcommunication.Con- currently,hardwareparallelismisnotanymoreonlysolutiontobringmoreperformance,butalsotoreduce energyconsumption[2].Toourknowledge,therearstillnowelldenedsystemthatcanprovidebothben- etsatthesametime.Inthisarticle,wewilldescribe 
ThisworkispartiallysupportedbytheITEAproject01010, HYADES 
asoftwaresolutionbasedonmulti-processorcomputer whichstrivestomakethosebothpropertiescohabit
1.1 Multi-Processing and Real-time Ap-proaches
TheusageofSMP(SymmetricMulti-Processors)tfacecomputationalpowerneedisawellknownand eectivesolution.Ithasalreadybeenexperimenteinthereal-timecontext[1].Totakeadvantageofan SMParchitecture,anoperatingsystemneedstotakintoaccountthesharedmemoryfacility,themigration andload-balancingbetweenprocessors,andthecommunicationpatternsbetweentasks.Thecomplexitofsuchanoperatingsystemmakesitlookmorelikegeneralpurposeoperatingsystem(GPOS)thanaded- icatedreal-timeoperatingsystem(RTOS).AnRTOonSMPmachinesmustimplementallthesemechanismsandconsiderhowtheyinterferewiththeharreal-timeconstraintsIntheirreviewofcurrentRTOS's,Stankovicand Rajkumar[11]describeafulltaxonomyofOS's.The OS'sdevelopedfromscratchareendangerspeciemainlybecauseofthecomplexitytoimplementallthe featuresnowrequiredbydevelopersAmorepowerfulapproachistohaveare-usablOSfromwhichthedevelopercancomposebyselecting components.RTEMS[8,12]isanexampletothis,itianOpen-SourcededicatedRTOSthatsupportsmultiprocessorsystems.Still,SMPsupportislimited,as tasksareboundtoaCPUduringthedesignphaseResearchkernelsareOS'swhichweredesignedinordertopresentoneorseveralnewparadigmstohandlegivenproblem.Althoughitmightbeagoodapproaceitherwhenthecurrentsolutionsareverypoororthe newparadigmwouldbemucheasiertounderstandor touse,itisnotalwaysecienttoforceuserstoen- 
 
tirelyre-considerthesystemorganization(forinstance byprovidingacompletenewAPIsetorbyintroducing newconcepts)Anotherapproachistoaddreal-timeextensionstaGPOS.Thishastheadvantageofprovidingtothe usersallthefacilitiesofthelaterone,includingbetter developmentsoftwares.Thefollowingsubsectionwildetailthedierentalternativesofthisapproachbyus- ingLinuxastheoriginalGPOS. 
1.2 Real-time With Linux
TheLinuxkernelisabletoecientlymanageSMplatforms,butithasneverbeendesignedasanRTOS. McKenney[6]hasdescribedindetailthebroadnumber ofsolutionsthatourishedalongthelastfewyearsAwellknownsolutionthataddsreal-timecapabilitiestotheLinuxkernelistheso-called 
co-kernelap- proach 
.SuchaLinuxextensionconsistsinasmallrealtimekernelthatprovidesthereal-timeservicesand whichrunsthestandardLinuxkernelasanestedOSby consideringitasthelowestprioritytask.RTLinux[14] andRTAI[4]aretwofamoussystemsbasedonthiprinciple.Themaindrawbacksarethenecessityof developingreal-timeprogramsdealingwithtwodierentOSinstances(withdierentAPIs)andthelimitesupportofSMParchitecturesAsomewhatoppositesolutionistoimprovethe latenciesbyimprovingthekernelitself.Anoption calledkernelpreemption,whichisalreadyavailablinthemainstreamLinuxkernel[7],allowsareductionofthelatencytargetedbymultimediaapplications. CurrentlyIngoMolnarisdevelopingapatchcallepreempt-rtwhichfocusesonhardreal-timelatenciesTheobjectiveistoalloweverythingbepreempted,in- cludingcriticalsectionsandinterrupthandlers.The drawbackisthedegradationofperformanceforsomsystemcallsaswellasthehightechnicaldicultytwriteandverifythosemodications. Finally,anothersolutionreliesontheshielded processorsorAsymmetricMulti-Processingprincipl(AMP).Onsuchasystem,whichisbasedonamultiprocessormachine,theprocessorsarespecializedtreal-timeornot.ConcurrentComputerCorporation RedHawkLinuxvariant[3]followsthisprinciple.Ihastheadvantageofbeingdesignedfromtheground withboththesupportofmulti-processor(whichcan bringHPC)andtherespectofreal-timepropertiesHowever,sinceonlyRTtasksareallowedtorunoshieldedCPUs,ifthosetasksarenotconsumingaltheavailablepowerthenthereisfreeCPUtimewhicislost.TheARTiSschedulerextendsthisapproacbyalsoallowingnormaltaskstobeexecutedonthosprocessorsaslongastheyarenotendangeringtherealtimepropertiesInthisarticle,westartbydeningtheprinciplesof ARTiS,thenfollowsadescriptionofourARTiSimplementationintheLinuxkernelandthedeploymentof thisimplementation.Finally,thelastsectionpresentexperimentalvalidationofthenalimplementation,fo- cusingonthreedierentaspectsofthesystem,thein- terruptlatencies,theexecutiontimevariationandthe load-balancingcorrectness. 
2ARTiS:AsymmetricReal-TimScheduler 
ARTiSisareal-timeLinuxextensionthattargetSMPs.Furthermore,ARTiSpromotesauser-spacprogrammingmodelofthereal-timetasks:programmersusetheusualPOSIXand/orLinuxAPItodene theirapplications.ARTiSreal-timetasksarereal-timinthesensethattheyareidentiedwithahighpriorityandarenotperturbedbyanynonreal-timeactivities.Forthesetasks,wearetargetingamaximum responsetimebelow300 
µ
s.ThislimitwasobtainedafterastudybytheindustrialpartnersconcerningtheirequirementsTheARTiSsolutionkeepstheinterestsofbotGPOS'sandRTOS'sbyestablishingontheSMPplatforma
symmetri
eal
T
m
chedulerinLinux. ARTiSkeepsthefullLinuxfacilitiesforeachprocesaswellastheSMPLinuxpropertiesbutalsoimprovethereal-timebehavior.ThecoreoftheARTiSsolution isbasedonastrongdistinctionbetweenreal-timeand non-real-timeprocessorsandalsoonmigratingtasks whichattempttodisablethepreemptiononarealtimeprocessor.Anexampleoftypicalarchitectureof asystembasedonARTiSispresentedingure1. 
2.1 Partition of the Processors and Pro-cesses
Processorsarepartitionedintotwosets,anNRCPUset(Non-Real-Time)andanRTCPUset(RealTime).EachonehasaparticularschedulingpolicyThepurposeistoinsurethebestinterruptlatencyfor particularprocessesrunningintheRTCPUsetTwoclassesofprocessesaredened.Theprocessewithnoparticularreal-timeconstraintsarecalled,iourimplementation, 
Linuxtasks 
.Theprocesseswitreal-timeconstraintsarecalled 
RTtask
.Precisely,de- pendingontheirpriority,theyarecalledRT0,RT1..orRT99,fromthehighestprioritytothelowestoneDuetotechnicalreasonswhichwewillexposejustafter,thissecondtypeofprocessesisfurtherdividedi
 
load−balancingload−balancingcluster
migrationARTiSmigrationARTiS
RT1+
RT CPURT CPURT CPUNRT CPU
RT0Linux
Figure 1. Example of a typical usage of a system based on ARTiS. The application is separated alongdifferent levels of real-time priorities. Tasks are moved by the ARTiS mechanisms of migration andload-balancing.
twosets.The 
RT0task
aredistinguishedfromallthe lowerprioritytasks,generalizedas 
RT1+task
Allthosetasksareuser-spacetasks,theyjustdier intheirmapping: 
EachRTCPUhasoneorseveralRT0tasksbound toit.Eachofthesetaskshastheguaranteethat itsRTCPUwillstayentirelyavailabletoit.Onlthesetasksareallowedtobecomenon-preemptiblontheircorrespondingRTCPU.ThispropertinsuresalatencyaslowaspossibleforallRTtasks.TheRT0tasksarethehardreal-timetasks ofARTiS.ExecutionofmorethanoneRT0tasononeRTCPUispossiblebutinthiscaseitisup tothedevelopertoverifythefeasibilityofsuchscheduling. 
RT1+taskscanrunonanyCPU.However,onRTCPUtheyar
onl
allowedinapreemptiblstate.TheycanuseCPUresourcesecientlyiRT0tasksdonotconsumealltheCPUtime.To keepalowlatencyfortheRT0tasks,theRT1tasksareautomaticallymigratedtoanNRTCPbytheARTiSschedulerwhentheyareabouttbecomenon-preemptible.TheRT1+tasksarethe softreal-timetasksofARTiS.Theyhavenorguarantees,buttheirrequirementsaretakenintaccountbyabesteortpolicy.Theyarealsothe mainsupportoftheintensiveprocessingpartsof thetargetedapplications
TheLinuxtasks,similarlytoRT1+tasks,canrun onanyCPUbut
onl
inapreemptiblestateon theRTCPUs.Theycancoexistwithreal-timtasksandareeligibleforselectionbythesched- uleraslongasthereal-timetasksdonotrequirtheCPU.AsfortheRT1+,theLinuxtaskswilautomaticallymigrateawayfromanRTCPUitheytrytoenterintoanon-preemptiblecodesec- tiononsuchaCPURT0tasksareimplementedinordertominimizethe  jitterduetonon-preemptibleexecutiononthesamCPU.RT1+tasksaresoftreal-timetasksbuttheareabletotakeadvantageoftheSMParchitectureparticularlyforintensivecomputing.Linuxtaskscan runwithoutintrusionontheRTCPUs.ThenthecanusethefullresourcesoftheSMPmachines.Thiarchitectureisadaptedtolargeapplicationsmadeof severalcomponentsrequiringdierentlevelsofrealtimeguaranteesandofCPUpower
2.2 Migration Mechanism
Aparticularmigrationmechanismhasbeendened. ItaimsatinsuringthelowlatencyoftheRT0tasksAlltheRT1+andLinuxtasksrunningonanRTCPareautomaticallymigratedtowardanNRTCPUwhe

You're Reading a Free Preview

Download
scribd
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->