5. Linux_TN

  • Upload
    dau-den

  • View
    214

  • Download
    0

Embed Size (px)

Citation preview

  • 8/18/2019 5. Linux_TN

    1/29

    Real Time Versions ofLinux Operating System

    Present by 

    Tr n Duy Th nhầ ịQuách Phát Tài

    1

  • 8/18/2019 5. Linux_TN

    2/29

    ContentImplement core real-time Linux

    2

  • 8/18/2019 5. Linux_TN

    3/29

    1. Standard Linux• Memory

    Management• Memory

    Protection• che!uling an!

    Tas" Management• #ar!$are

    Inter%aces•

    &ile Management•

    *

  • 8/18/2019 5. Linux_TN

    4/29

    2. Real-time Linux kernel

    + Mo!i%ications that ma"e Linux ,eal Time

    + ,eal-Time Patches to the tan!ar! ernel

    .

  • 8/18/2019 5. Linux_TN

    5/29

    2. Real-time Linux kernelMo!i%ications that ma"e Linux ,eal Time

    /

  • 8/18/2019 5. Linux_TN

    6/29

    2.1 Modification that make Linux

    Real-time+ Interrupt processing in standard kernel( 2 hal0es

    The bottom-hal% tas" is the interrupt han!ler an! rea!s !ata

    %rom the physical !e0ice into a memory bu%%er The top-hal% tas" rea!s %rom the memory bu%%er an! passes the

    !ata to a "ernel accessible bu%%er

    + In the standard kernel( $ithout preemption) all interruptsare !isable! $hen the bottom-hal% tas" is running

    + 3ll 0ariants o% real-time Linux ha0e intro!uce! mo!i%icationsat the "ernel le0el re!uce both the interrupt latency an! 4itter bet$een perio!ic

    interrupts

    %aster response to external e0ents an! higher resolution timing

    5

  • 8/18/2019 5. Linux_TN

    7/29

    2.1 Modification that make Linux Real-time

    + tan!ar! "ernelpreemption

    + #igher priority "ernelprocesses can preemptlo$er priority 

    + Linux 0ersion 2/.

    + latency an! 4itter isaroun! 1 millisecon!

    6

  • 8/18/2019 5. Linux_TN

    8/29

    2.2 Real-time Patches to the StandardKernel

    a!!ing a secon!) highly e%%icient) "ernel to han!le real-timetas"s

    Micro ernel( ,TLinux) ,T3I 7ano ernel

    ,esource ernel 8xtension

    ma"ing changes !irectly to the stan!ar! "ernel

    P9I: ,eal-Time 8xtensions( implement the timers) signals)semaphores) process memory loc"ing) share! memory)prioritysche!uling) synchroni;e! an! asynchroni;e! I,T

    Timeys Linux

    ?

  • 8/18/2019 5. Linux_TN

    9/29

    2.2.1 Micro Kernel•  @ictor Ao!ai"en controls

    the execution o% real-time

    tas"s• runs the stan!ar! Linux

    kernel as abackground task

    • RTLinux – New Mexico Tech

    • RTAI - Politecnico !i

    Milano

    B

  • 8/18/2019 5. Linux_TN

    10/29

    2.2.2 Nano Kernel

    + 3!apti0e Domain8n0ironment %or9perating ystems

    C3D89+ similar to the micro"ernel

    + many operating

    systems+ can be run in parallel

    on top o% the nano-"ernel layer

    1=

  • 8/18/2019 5. Linux_TN

    11/29

    2.2.3 Resource Kernel xtension

    + pro0i!es a gate$ay toresources such as %ilesystems) serial an! parallelports) an! net$or"inter%aces %or both the

    normal "ernel an! also %oruser processes

    + control the interruptpreemption issues %or the

    stan!ar! "ernel+ >ser-space can

    communicate !irectly 

    11

  • 8/18/2019 5. Linux_TN

    12/29

    2.2.! P"S#$ Real-time xtensions

    Mo!i%y !irectly to the stan!ar! "ernel

    Implement the timers) signals) semaphores) process memoryloc"ing) share! memory)priority sche!uling) synchroni;e! an!asynchroni;e! Ini0ersity ,eal-Time Linux C>,T!istribution)

    high resolution timers)

    real-time sche!uling impro0ements

    TimeSys Linux ma"ing the stan!ar! "ernel preemptable

    inclu!ing a "ernel sche!uler that pro0i!es sche!uling %or the bottom-hal% "ernel interrupt processing an! %or interrupts themsel0es

    12

  • 8/18/2019 5. Linux_TN

    13/29

    2.3 Performance Com%arison

    1*

  • 8/18/2019 5. Linux_TN

    14/29

    Real-time versions of Linux

    + Open-Source Distributions: Pro0i!e the source co!e an! buil! scripts so the

    user can un!erstan!) mo!i%y) an! buil! the co!e

    Documentation may be sparse an! technicalsupport nonexistent

    +Commercial Distributions Ma"e a pro%it to stay in business upport an! !ocumentation

    1.

  • 8/18/2019 5. Linux_TN

    15/29

    3. Open-Source Distribution

    + 3D89

    + >,T

    + ,T3I

    + ,TLinux

    + Timeys Linux EPL

    1/

  • 8/18/2019 5. Linux_TN

    16/29

    Open-Source: D!OS

    + 3!apti0e Domain 8n0ironment %or 9peratingystems

    + 2==2

    + Is a har!$are abstraction layer

    + 3llo$ a real-time "ernel an! a general purpose

    "ernel to co-exist+ ,eal-Time Mechanism nano-"ernel

    15

  • 8/18/2019 5. Linux_TN

    17/29

    Open-Source: "#RT

    + ansas >ni0ersity 

    + 1BB6

    + Implement the P9I: real-time extensions toLinux

    + The patches implement the Fueue! real-time

    signals an! the high-resolution timers+ ,eal-Time Mechanism( P9I: timers an!

    sche!uling

    + 1=s o% microsecon!s o% latency an! 4itter

    16

    ?

  • 8/18/2019 5. Linux_TN

    18/29

    Open-Source: RT$ %Linux-RT&

    + Politecnico !i Milano) Italy

    + 2===

    + 9riginally base! on ,TLinux

    + 80ol0e! as a uniFue %a0or o% real-time Linux

    + ,eal-Time Mechanism( micro "ernel

    + G 1= microsecon!s latency an! 4itter

    1?

  • 8/18/2019 5. Linux_TN

    19/29

    Open-Source: RTLinux+ @ictor Ao!ai"en) 7e$ Mexico Institute o%

    Technology 

    + 1BB5

    + 'o0ers the logic o% running stan!ar! Linux as a bac"groun! threa! to the real-time tas"s

    + ,eal-Time Mechanism( micro "ernel+ G 1= microsecon!s latency an! 4itter

    1B

  • 8/18/2019 5. Linux_TN

    20/29

    Open-Source: TimeSys Linux '(L+ Timeys

    + 1BB?

    + Pro0i!es a preemptable "ernel an! an impro0e!tas" sche!uler

    + ,eal-Time Mechanism( Preemptable ernel

    + G 1== microsecon!s o% latency an! 4itter

    2=

    21

  • 8/18/2019 5. Linux_TN

    21/29

    ). *ommercial Distribution+ ,e!#a$" Linux

    + &MLabs ,TLinux

    + Monta@ista Linux

    + Q,T

    + ,8DI'8-Linux

    + Linux MP+ Timeys

    21

    22

  • 8/18/2019 5. Linux_TN

    22/29

    *ommercial: Re+,a Linux

    + 'oncurrent 'omputer 'orporation

    + Pac"age! har!$are

  • 8/18/2019 5. Linux_TN

    23/29

    2.

  • 8/18/2019 5. Linux_TN

    24/29

    *ommercial: 0ontaVista Linux

    + Monta@ista o%t$are Inc

    + Tailor to the nee!s o% embe!!e! so%t$are!e0elopers

    + ,eal-Time Mechanism( ernel pre-emptionenhancements

    2.

    2/

  • 8/18/2019 5. Linux_TN

    25/29

    *ommercial: 1RTS

    + Quality ,eal Time ystems

    + De0elops applications %or real-time control an!simulation

    + ,eal-Time Mechanism( ,TLinux micro "ernel

    2/

    25

  • 8/18/2019 5. Linux_TN

    26/29

    *ommercial: R!D$*!-Linux

    + ,8Donic Inc

    + Integrates the !ual "ernel approach an! thepreemptable "ernel to pro0i!e a hybri! solution

    + ,eal-Time Mechanism( Micro "ernel an! ernelPreemption

    25

    26

  • 8/18/2019 5. Linux_TN

    27/29

    *ommercial: Linux S0(

    + ynergy Microsystems Inc

    + upport ,TLinux as the operating system ontheir Po$erP' single-boar! computers

    + ,eal-Time Mechanism( ,TLinux micro "ernel

    26

    2?

  • 8/18/2019 5. Linux_TN

    28/29

    *ommercial: TimeSys Linux2RealTimeTimeSys Linux24et TimeSys Linux2*(#

    + Timeys 'orporation

    + 3!!s three proprietary components into anopen-source preemptable "ernel #igh-resolution timers an! priority inheritance

    Euarantee! access to 'P> resources)

    Euarantee! access to net$or" resources+ ,eal-Time Mechanism( Preemptable ernel

    2?

    2B

  • 8/18/2019 5. Linux_TN

    29/29

    &hank 'ou(

    2B