《财务管理实训讲义CreateTim课件》由会员分享,可在线阅读,更多相关《财务管理实训讲义CreateTim课件(40页珍藏版)》请在金锄头文库上搜索。
1、Commercial Real-Time Operating SystemsCommercial Real-Time Operating SystemsLecture 24Lecture 24财务管理实训讲义CreateTim课件OutlineStandardsMetricsRTOSsVxWorksEmbedded Windows platformsLinux extensions财务管理实训讲义CreateTim课件(Traditional) Real-Time ApplicationsTransportation systemsAutomotives, avionics, railway
2、system, submarines, Space-based systemsSatellite systems, planetary rovers, Industrial AutomationManufacturing automation (e.g. Bottling factories)Process control (e.g. petroleum refinement, temperature control systems, )Motion controlRobotics applications, mechanical pets, Data Acquisition systemsS
3、upervisory control and data acquisition systems (SCADA), Security monitoring systemsDefense/military systemsRadar systems, Smart weapons, +财务管理实训讲义CreateTim课件Emerging ApplicationsCell-phones, VoIP phone, PDAsMP3 playersSet-top boxes, Game ConsolesAutomotive SystemsNetwork ElementsWeb Servers财务管理实训讲义
4、CreateTim课件Popular StandardsReal-Time Operating System standardsIEEE 1003.1b POSIX Real-Time Extensions ()OSEK (automotive real-time OS standard) () Real-Time (and Concurrent) Programming LanguagesReal-Time Specification for Java (, ) Ada 83 and Ada 95Real-Time MiddlewareReal-Time CORBA (middleware
5、and abstraction of the underlying RTOS)Networks/busesCANbus (Controller Area Network bus)TTA: Time-Triggered Architecture ()FlexRay ()ATM or Switched EthernetPriority-based or weighted fair-sharing schemes财务管理实训讲义CreateTim课件Metrics in Real-Time Systems (1/2)End-to-end latency: E.g. worst-case, avera
6、ge-case, variance, distributionCan involve multiple hops (across nodes, links, switches and routers)Behavior in the presence or absence of failuresJitterThroughput:How many X can be processed?How many messages can be transmitted?Survivability:How many faults can be tolerated before system failures?W
7、hat functionality gets compromised?财务管理实训讲义CreateTim课件Metrics in Real-Time Systems (2/2)Security:Can the systems integrity be compromised?Can violations be detected?Safety:Is the system “safe”?Can the system get into an unsafe state? Has it been certified?Maintainability:How does one fix problems?Ho
8、w does the system get upgraded?Dynamism and Adaptability:What happens when the system mission changes?What happens when individual elements fail?Can the system reconfigure itself dynamically?How does the system behave after re-configuration?财务管理实训讲义CreateTim课件RTOS ConsiderationsWhat processor(s) doe
9、s it run on?8-bit, 16-bit, 32-bit, Intel Pentium Processor, PowerPC, Arm/StrongArm Intel Xscale, MIPS, SuperH, IBM and Intel Network ProcessorsWhat board(s) does it run on?Complete software package for a particular hardware board is called a BSP (Board Support Package)What is the software environmen
10、t?Compilers and debuggersIDECross-compilation + symbolic debugging on target?Profilers (CPU, memory)Test coverage toolsNative simulation/emulation support?财务管理实训讲义CreateTim课件Real-Time Operating SystemsWindows platformsEmbedded XP, Windows CE, Pocket WindowsVxWorks from Wind River Systems ()Linux var
11、iantsBlue Cat Linux ()(Embedded) Red Hat Linux ()FSM RT-Linux ()Monta Vista Linux ()TimeSys Linux ()LynxOS ()QNX ()Solaris real-time extensionsTRONEmbedded OS specification in JapanHas multiple profiles for different classes of devices财务管理实训讲义CreateTim课件Common RTOS FeaturesUtilitiesBootstrapping sup
12、port“Headless” operationDisplay not necessaryAPIs (Application Programming Interfaces)Multiple threads and/or processesFixed priority scheduling is most popularMutex/semaphore support likely with priority inheritance supportInter-process communicationsMessage queuesTimers/clockGraphics supportDevice
13、 driversNetwork protocol stack财务管理实训讲义CreateTim课件Emerging RTOS RequirementsFull-featured operating systemSupport for new processors and devicesSupport for Internet protocols and standardsSupport for Multimedia protocols and standardsSupport for Memory protectionResource protection, securityDevelopme
14、nt tools and librariesGUI EnvironmentDo this with low and predictable overheads.财务管理实训讲义CreateTim课件Case Study: Linux in embedded systems财务管理实训讲义CreateTim课件Why Linux?Reliable, Full-featured Operating SystemRich multi-tasking supportSecurity, ProtectionNetworking SupportTCP/IP, RSVP, SIP, MPLS, H.323M
15、ultimedia SupportJPEG, MPEG, GSMDevice DriversStandard, Known Environment and APIsUnix LineageFamiliar environment for many users/developersPOSIX Compliance财务管理实训讲义CreateTim课件Why Linux?The Cost FactorFree run-time royaltiesThe Open Source Factor A global team of programmers enhancing the environment
16、 literally all the timeAvailability of libraries, tools, and device driversSource Code Access allowing “peeking inside the hood” (and customizing as necessary)The Popularity FactorExcellent textbooks and documentation财务管理实训讲义CreateTim课件Why Linux?Small Embedded SystemsModular Kernel, possible to conf
17、igure the kernel to suitable sizeCustomizable Root Lots of UtilitiesHigh-End Embedded SystemsHigh-AvailabilityClusteringSMP Support财务管理实训讲义CreateTim课件Linux API: TaskingProcessEncapsulates a thread of control and an address spaceAddress space may be shared giving threads in effectSchedulable EntityTh
18、readsAre processes to the Linux kernelScheduled by the Linux kernelCan be created such that they share the address space with the parent process, effectively giving threads财务管理实训讲义CreateTim课件Linux API: POSIX, SVR4, BSDPOSIX 1003.1.b (Real-Time Extensions)Priority SchedulingMemory LockingClocks and T
19、imersReal-Time SignalsPOSIX 1003.1.c (Thread Extensions)Using pthreads libraryThread creation, destruction, etc.Mutexes, Condition VariablesSVR4 IPCShared MemorySemaphoresNetworking: BSD Sockets财务管理实训讲义CreateTim课件Linux Internals ArchitectureCore MechanismsProcess Schedulervfsmmipcnet财务管理实训讲义CreateTi
20、m课件The Real-Time Linux ChallengeHow to leverage the advantages of Linux,while making it suitable for real-time systems?财务管理实训讲义CreateTim课件Approaches to Real-Time LinuxApproaches limiting Real-time and Non Real-time Task InteractionsCompliant Kernel ApproachLynxOS/Blue Cat LinuxThin Kernel ApproachRT
21、Linux/RTAIApproaches that integrate Real-time and Non Real-time tasksCore Kernel ApproachTimeSys Linux, Monta Vista LinuxResource Kernel ApproachTimeSys Linux财务管理实训讲义CreateTim课件Linux Internals: SchedulingSchedulable EntitiesProcessesReal-Time Class: SCHED_FIFO or SCHED_RRTime-Sharing Class: SCHED_OT
22、HERReal-Time processes haveApplication defined priorityHigher priority than time-sharing processesNon Schedulable EntitiesInterrupt HandlersHave priorities, and can be nestedBottom Halves & Task QueuesRun on schedule, ret from system call, ret from interrupt财务管理实训讲义CreateTim课件Linux and Real-Time: Pr
23、oblemsTimer GranularityMany real-time tasks are driven by timer interruptsIn Standard Linux, the timer is set to expire at 10 ms intervalsScheduler PredictabilityLinux scheduler keeps tasks in an unsorted listRequires a scan of all tasks to make a scheduling decisionScales poorly as number of tasks
24、increases, and is especially poor for real-time performance Various subsystems NOT designed for real-time useNetwork protocol stackWindows manager财务管理实训讲义CreateTim课件Approaches to Real-Time LinuxCompliant Kernel ApproachDual Kernel ApproachCore Kernel ApproachResource Kernel Approach财务管理实训讲义CreateTim
25、课件Compliant Kernel Approach财务管理实训讲义CreateTim课件Compliant Kernel ApproachBasic ClaimLinux is defined by its API and not by its internal implementationThe real-time kernel is a non Linux kernelImplicationsNo benefits from the Linux kernelNot possible to benefit from the Linux kernel evolutionNot possib
26、le to use Linux hardware supportNot possible to use Linux device drivers财务管理实训讲义CreateTim课件Compliance100% Linux APISupport all of Linux kernel APIImplicationsAny Linux application can run on real-time kernelDevelopment can be done on Linux Host, with rich set of host tools for developmentAll Linux l
27、ibraries are trivially available to run on real-time kernelThird party software Achieving 100% Linux API is non-trivialConsider the amount of effort put on Linux kernel development 财务管理实训讲义CreateTim课件Approaches to Real-Time LinuxDual Kernel ApproachCompliant Kernel ApproachCore Kernel ApproachResour
28、ce Kernel Approach财务管理实训讲义CreateTim课件The Thin Kernel ApproachLinuxProcessLinuxProcessUser-LevelKernel-LevelReal-time tasks do NOT use the Linux API or Linux facilitiesFailure in any real-time task crashes the entire system财务管理实训讲义CreateTim课件Approaches to Real-Time LinuxCompliant Kernel ApproachDual
29、Kernel ApproachCore Kernel ApproachResource Kernel Approach财务管理实训讲义CreateTim课件Core Kernel ApproachBasic IdeasMake the kernel more suitable for real-timeEnsure that the impact of changes is localized so that Kernel upgrades can be easily incorporatedKernel reliability and scalability is not compromis
30、edMechanismsStatic ConfigurationCan be configured at compile timeDynamic ConfigurationUsing loadable kernel modules财务管理实训讲义CreateTim课件Core Kernel ApproachAllows the use of most if not all existing Linux primitives, applications, and tools. Need to avoid primitives that can take extended time in the
31、kernelAllows the use of most existing device drivers written to support Linux. Need to avoid poorly written drivers that unfairly hog system resourcesRobustness and ReliabilityCore kernel modifications can effect robustness, but source is available财务管理实训讲义CreateTim课件Approaches to Real-Time LinuxComp
32、liant Kernel ApproachDual Kernel ApproachCore Kernel ApproachResource Kernel Approach财务管理实训讲义CreateTim课件Resource KernelA Kernel that provides to Applications Timely, Guaranteed, and Enforced access to System ResourcesAllows Applications to specify only their Resource Demands, leaving the Kernel to s
33、atisfy those Demands using hidden management schemes财务管理实训讲义CreateTim课件Protection in Resource KernelsEach application (or a group of collaborating applications) operates in a virtual machine:a machine which consists of a well-defined and guaranteed portion of system resources CPU capacity, the disk
34、bandwidth, the network bandwidth and the memory resourceMultiple virtual machines can run simultaneously on the same physical machineguarantees available to each reserve set is valid despite the presence of other (potentially mis-behaving) applications using other reserve sets财务管理实训讲义CreateTim课件“Res
35、ource Kernel” ArchitectureMiddlewareServicesCPUMemoryNetBWPhysicalresourcesCPUMemoryNetBWCPUNetBWMemoryCPUMemoryNetBW.ResourceKernelRT Publisher/SubscriberServicesRT-ORBQoS MgrReal-TimeJavaAppsReal-Time and Multimedia ApplicationsReal-Time and Multimedia Applications财务管理实训讲义CreateTim课件Linux Resource
36、 Kernel ArchitectureLinuxProcessLinuxProcessLinuxProcessKernelUser-LevelLKM财务管理实训讲义CreateTim课件Reserves and Resource SetsReserveA Share of a Single ResourceTemporal ReservesParameters declare Portion and Timeframe of Resource UsageE.g., CPU time, link bandwidth, disk bandwidthSpatial ReservesAmount o
37、f spaceE.g., memory pages, network buffersResource SetA set of resource reserves财务管理实训讲义CreateTim课件SummaryThe world of embedded real-time is changing, and converging with theDesktop world, The Enterprise world,The Server world,The Internet World, etc.There are 3 dominant platformsVxWorks (proprietar
38、y)Windows variantsLinux variants财务管理实训讲义CreateTim课件)z0C4F7IaMdPgSkVnZq$t*x-A1D5G8KbNeQiTlWo#r%v(y+B3E6H9LcOfRjUmYp!s&w)z0C4F7JaMdPhSkVnZq$u*x-A2D5G8KbNfQiTlXo#r%v(y0B3E6I9LcOgRjV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