Operating Systems: Internals and Design Principles, 6/E William Stallings - Chapter 13: Embedded Systems

One of the most important and widely used categories of operating systems

Hardware and software designed to perform a dedicated function

Tightly coupled to their environment

Often, embedded systems are part of a larger system or product,

E.G. antilock braking system in a car.

 

 

pptx44 trang | Chia sẻ: tieuaka001 | Ngày: 17/09/2020 | Lượt xem: 11 | Lượt tải: 0download
Bạn đang xem trước 20 trang nội dung tài liệu Operating Systems: Internals and Design Principles, 6/E William Stallings - Chapter 13: Embedded Systems, để xem tài liệu hoàn chỉnh bạn click vào nút DOWNLOAD ở trên
Chapter 13 Embedded SystemsDave BremerOtago Polytechnic, N.Z. ©2008, Prentice HallOperating Systems: Internals and Design Principles, 6/E William StallingsRoadmapEmbedded SystemsCharacteristics of Embedded Operating SystemseCosTinyOSEmbedded SystemOne of the most important and widely used categories of operating systems Hardware and software designed to perform a dedicated functionTightly coupled to their environmentOften, embedded systems are part of a larger system or product, E.G. antilock braking system in a car.Real TimeEmbedded systems are tightly coupled to their environment.This imposes real-time constraints by the need to interact with the environment. required speeds of motion, required precision of measurement, required time durations.Examples of Embedded DevicesEmbedded System OrganizationDifferences from typical computerA variety of Interfaces.Use of a diagnostic.Special purpose hardware may be used to increase performance or safety.Field programmable (FPGA), application specific (ASIC), or even nondigital hardware.Single purpose software.RoadmapEmbedded SystemsCharacteristics of Embedded Operating SystemseCosTinyOSCharacteristics of Embedded OSReal-time operationReactive operationConfigurabilityI/O device flexibilityStreamlined protection mechanismsDirect use of interruptsDeveloping an Embedded OSTwo general approachesTake an existing OS and adapt it for embedded purposesDesign a purpose-built OS solely for embedded useAdapting an Existing OSExamples include Windows, Linux, BSDGenerally slower than special purpose OSAdvantage is familiar interfaceNeed to add real-time capabilityStreamlining operationAdd other specialized and necessary functionality for the given devicePurpose-Built Embedded OSTypical characteristics include:fast and lightweight process or thread switchScheduling policy is real time and dispatcher module is part of schedulerSmall sizeResponds to external interrupts quicklyMinimizes intervals during which interrupts are disabledTiming ConstraintsTo deal with timing constraints, the kernel:Provides bounded execution time for primitivesMaintains a real-time clockProvides for special alarms and timeoutsSupports real-time queuing disciplines Provides primitives to delay processing by a fixed amount of time and to suspend/resume executionRoadmapEmbedded SystemsCharacteristics of Embedded Operating SystemseCosTinyOSeCos: Embedded Configurable OSOpen source, Royalty-freeReal-time OSMost widely used embedded OSTargeted at high-performance small embedded systems. An embedded form of Linux or other commercial OS would not provide the streamlined software required. eCos Configuration TooleCos Configuration ToolLoading an eCos ConfigurationeCos Layered StructureHardware Abstraction LayerPresents consistent API to upper layersDifferent for each hardware platformHALHAL ModulesArchitectureProcessor family typeVariantSupport features of specific processorPlatformSupport of tightly coupled peripheralseCos Kernel DesignThe eCos kernel was designed to satisfy four main objectives:Low interrupt latencyLow task switching latencySmall memory footprintDeterministic behaviorNot in eCos KernelMemory allocationDevice driverThis makes for a lean kernel.eCos I/O SystemFramework for supporting device driversA variety of drivers are available through the configuration packagePrinciple objective is efficiency with no unnecessary software layeringeCos SchedulerBitmap schedulerEfficient for small number of threads activeEach thread has different priorityMultilevel queue schedulerAppropriate when number of threads is dynamicMultiple threads at each priorityTime slicingBitmap Scheduler Priority LevelsMultilevel Queue Scheduler PrioritieseCos Thread SynchronizationClassic mechanisimsMutexesSemaphoresCondition variablessynchronization/communication mechanisms Event flagsMailboxesSMP support(symmetric multiprocessing)SpinlocksMutexesMutexes and Condition VariablesMutexes and Condition VariablesRoadmapEmbedded SystemsCharacteristics of Embedded Operating SystemseCosTinyOSTinyOS400 bytes of codeNot a real-time OSNo kernel There are no processes; OS doesn’t have a memory allocation system interrupt and exception handling is dependent on the peripheral; andNonblocking, so there are few explicit synchronization primitives.Wireless Sensor Network TopologyTinyOS GoalsWith the tiny distributed sensor application in mind, the following goals were set for TinyOS:Allow high concurrencyOperate with limited resourcesAdapt to hardware evolutionSupport a wide range of applicationsSupport a diverse set of platformsBe robustTinyOS ComponentsEmbedded software systems built with TinyOS consist of a set of modules – called componentsSuch as:Single-hop networkingAd-hoc routingPower managementTimesNonvolatile storage controlTimerM ComponentTimerM ConfigurationTinyOS SchedulerOperates across all componentsOnly one task executes at one timeSimple FIFO queueSchedular is power aware Puts processor to sleep when no task in queueSurge: An Example TinyOS ApplicationConfiguration for SurgeTinyOS Resource InterfaceTinyOS provides a simple but powerful set of conventions for dealing with resources.DedicatedVirtualizedSharedShared Resource Configuration

Các file đính kèm theo tài liệu này:

  • pptxchapter13_new_7827.pptx
Tài liệu liên quan