ebook img

Real-Time Embedded Systems PDF

320 Pages·2017·7.82 MB·English
Save to my drive
Quick download
Download
Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.

Preview Real-Time Embedded Systems

TrimSize:152mmx229mm SingleColumn (cid:2) Wang ffirs.tex V2-06/30/2017 12:14pm Pagei Real-TimeEmbeddedSystems (cid:2) (cid:2) (cid:2) TrimSize:152mmx229mm SingleColumn (cid:2) Wang ffirs.tex V2-06/30/2017 12:14pm Pageii QuantitativeSoftwareEngineeringSeries LawrenceBernstein,SeriesEditor The Quantitative Software Engineering Series focuses on the convergence of systems engineering and software engineering with emphasis on quan- titative engineering trade-off analysis. Each title brings the principles and theory of programming in the large and industrial strength software into focus. This practical series helps software developers, software engineers, systems engineers, and graduate students understand and benefit from this convergence through the unique weaving of software engineering case histories,quantitativeanalysis,andtechnologyintotheprojecteffort.Youwill findthateachpublicationreinforcestheseriesgoalofassistingthereaderwith producinguseful,well-engineeredsoftwaresystems. SoftwareTesting:ConceptsandOperations (cid:2) (cid:2) byAliMili,FairouzTchier EnterpriseSoftwareArchitectureandDesign:Entities,Services,andResources byDominicDuggan OracleDatabasePerformanceandScalability:AQuantitativeApproach byHenryH.Liu TrustworthyCompilers byVladimirO.Safonov ManagingtheDevelopmentofSoftware-IntensiveSystems byJamesMcDonald SoftwarePerformanceandScalability:AQuantitativeApproach byHenryH.Liu Web Application Design and Implementation: Apache 2, PHP5, MySQL, JavaScript,andLinux/UNIX byStevenA.Gabarro SoftwareMeasurementandEstimation:APracticalApproach byLindaM.Laird,M.CarolBrennan TrustworthySystemsthroughQuantitativeSoftwareEngineering byLawrenceBernstein,C.M.Yuhas Real-TimeEmbeddedSystems byJiacunWang (cid:2) TrimSize:152mmx229mm SingleColumn (cid:2) Wang ffirs.tex V2-06/30/2017 12:14pm Pageiii Real-Time Embedded Systems JiacunWang (cid:2) (cid:2) (cid:2) TrimSize:152mmx229mm SingleColumn (cid:2) Wang ffirs.tex V2-06/30/2017 12:14pm Pageiv Thiseditionfirstpublished2017 ©2017JohnWiley&Sons,Inc. Allrightsreserved.Nopartofthispublicationmaybereproduced,storedinaretrievalsystem,or transmitted,inanyformorbyanymeans,electronic,mechanical,photocopying,recordingor otherwise,exceptaspermittedbylaw.Adviceonhowtoobtainpermissiontoreusematerialfromthis titleisavailableathttp://www.wiley.com/go/permissions. TherightofJiacunWangtobeidentifiedastheauthorofthisworkhasbeenassertedinaccordancewith law. RegisteredOffice JohnWiley&Sons,Inc.,111RiverStreet,Hoboken,NJ07030,USA EditorialOffice 111RiverStreet,Hoboken,NJ07030,USA Fordetailsofourglobaleditorialoffices,customerservices,andmoreinformationaboutWileyproducts visitusatwww.wiley.com. Wileyalsopublishesitsbooksinavarietyofelectronicformatsandbyprint-on-demand.Somecontent thatappearsinstandardprintversionsofthisbookmaynotbeavailableinotherformats. LimitofLiability/DisclaimerofWarranty Thepublisherandtheauthorsmakenorepresentationsorwarrantieswithrespecttotheaccuracyor completenessofthecontentsofthisworkandspecificallydisclaimallwarranties;includingwithout limitationanyimpliedwarrantiesoffitnessforaparticularpurpose.Thisworkissoldwiththe understandingthatthepublisherisnotengagedinrenderingprofessionalservices.Theadviceand strategiescontainedhereinmaynotbesuitableforeverysituation.Inviewofon-goingresearch, (cid:2) equipmentmodifications,changesingovernmentalregulations,andtheconstantflowofinformation (cid:2) relatingtotheuseofexperimentalreagents,equipment,anddevices,thereaderisurgedtoreviewand evaluatetheinformationprovidedinthepackageinsertorinstructionsforeachchemical,pieceof equipment,reagent,ordevicefor,amongotherthings,anychangesintheinstructionsorindicationof usageandforaddedwarningsandprecautions.Thefactthatanorganizationorwebsiteisreferredtoin thisworkasacitationand/orpotentialsourceoffurtherinformationdoesnotmeanthattheauthoror thepublisherendorsestheinformationtheorganizationorwebsitemayprovideorrecommendationsit maymake.Further,readersshouldbeawarethatwebsiteslistedinthisworkmayhavechangedor disappearedbetweenwhenthisworkswaswrittenandwhenitisread.Nowarrantymaybecreatedor extendedbyanypromotionalstatementsforthiswork.Neitherthepublishernortheauthorshallbe liableforanydamagesarisingherefrom. LibraryofCongressCataloguing-in-PublicationData Names:Wang,Jiacun,1963-author. Title:Real-timeembeddedsystems/byJiacunWang. Description:Hoboken,NJ,USA:Wiley,2017.|Series:Quantitativesoftwareengineeringseries| Includesbibliographicalreferencesandindex.|Identifiers:LCCN2017015038(print)| LCCN2017030269(ebook)|ISBN9781119420705(pdf)|ISBN9781119420682(epub)| ISBN9781118116173(hardback) Subjects:LCSH:Embeddedcomputersystems.|Real-timedataprocessing.| BISAC:TECHNOLOGY&ENGINEERING/Electronics/Microelectronics. Classification:LCCTK7895.E42(ebook)|LCCTK7895.E42W362017(print)| DDC006.2/2–dc23 LCrecordavailableathttps://lccn.loc.gov/2017015038 Coverimage:©spainter_vfx/Gettyimages CoverdesignbyWiley Setin10/12ptWarnockbySPiGlobal,Chennai,India PrintedintheUnitedStatesofAmerica 10 9 8 7 6 5 4 3 2 1 (cid:2) TrimSize:152mmx229mm SingleColumn (cid:2) Wang ftoc.tex V1-06/24/2017 11:59am Pagev v Contents Preface xiii BookLayout xv Acknowledgments xvii 1 IntroductiontoReal-TimeEmbeddedSystems 1 1.1 Real-TimeEmbeddedSystems 1 1.2 Example:AutomobileAntilockBrakingSystem 3 1.2.1 SlipRateandBrakeForce 3 (cid:2) 1.2.2 ABSComponents 4 (cid:2) 1.2.2.1 Sensors 4 1.2.2.2 ValvesandPumps 5 1.2.2.3 ElectricalControlUnit 7 1.2.3 ABSControl 8 1.3 Real-TimeEmbeddedSystemCharacteristics 10 1.3.1 SystemStructure 10 1.3.2 Real-TimeResponse 10 1.3.3 HighlyConstrainedEnvironments 11 1.3.4 Concurrency 12 1.3.5 Predictability 12 1.3.6 SafetyandReliability 13 1.4 HardandSoftReal-TimeEmbeddedSystems 13 Exercises 14 SuggestionsforReading 15 References 15 2 HardwareComponents 17 2.1 Processors 17 2.1.1 Microprocessors 17 2.1.2 Microcontrollers 19 2.1.3 Application-SpecificIntegratedCircuits(ASICs) 19 (cid:2) TrimSize:152mmx229mm SingleColumn (cid:2) Wang ftoc.tex V1-06/24/2017 11:59am Pagevi vi Contents 2.1.4 Field-ProgrammableGateArrays(FPGAs) 19 2.1.5 DigitalSignalProcessors(DSPs) 20 2.1.6 Application-SpecificInstructionSetProcessors(ASIPs) 20 2.1.7 MulticoreProcessors 20 2.1.8 VonNeumannArchitectureandHarvardArchitecture 21 2.1.9 ComplexInstructionSetComputingandReducedInstructionSet Computing 22 2.2 MemoryandCache 23 2.2.1 Read-OnlyMemory(ROM) 23 2.2.2 Random-AccessMemory(RAM) 24 2.2.3 CacheMemory 24 2.3 I/OInterfaces 26 2.4 SensorsandActuators 27 2.5 TimersandCounters 29 Exercises 30 SuggestionsforReading 31 References 31 3 Real-TimeOperatingSystems 33 3.1 MainFunctionsofGeneral-PurposeOperatingSystems 33 (cid:2) 3.1.1 ProcessManagement 34 (cid:2) 3.1.2 MemoryManagement 36 3.1.3 InterruptsManagement 39 3.1.4 Multitasking 39 3.1.5 FileSystemManagement 39 3.1.6 I/OManagement 41 3.2 CharacteristicsofRTOSKernels 42 3.2.1 ClocksandTimers 42 3.2.2 PriorityScheduling 44 3.2.3 IntertaskCommunicationandResourceSharing 45 3.2.3.1 Real-TimeSignals 45 3.2.3.2 Semaphores 46 3.2.3.3 MessagePassing 46 3.2.3.4 SharedMemory 46 3.2.4 AsynchronousI/O 47 3.2.5 MemoryLocking 47 3.3 RTOSExamples 48 3.3.1 LynxOS 48 3.3.2 OSE 49 3.3.3 QNX 49 3.3.4 VxWorks 49 3.3.5 WindowsEmbeddedCompact 50 Exercises 50 (cid:2) TrimSize:152mmx229mm SingleColumn (cid:2) Wang ftoc.tex V1-06/24/2017 11:59am Pagevii Contents vii SuggestionsforReading 52 References 52 4 TaskScheduling 53 4.1 Tasks 53 4.1.1 TaskSpecification 54 4.1.2 TaskStates 56 4.1.3 PrecedenceConstraints 58 4.1.4 TaskAssignmentandScheduling 59 4.2 Clock-DrivenScheduling 59 4.2.1 StructuredClock-DrivenScheduling 62 4.2.1.1 Frames 62 4.2.1.2 TaskSlicing 65 4.2.2 SchedulingAperiodicTasks 66 4.2.3 SchedulingSporadicTasks 68 4.3 Round-RobinApproach 69 4.4 Priority-DrivenSchedulingAlgorithms 70 4.4.1 Fixed-PriorityAlgorithms 70 4.4.1.1 SchedulabilityTestBasedonTimeDemandAnalysis 72 4.4.1.2 Deadline-MonotonicAlgorithm 76 (cid:2) 4.4.2 Dynamic-PriorityAlgorithms 76 (cid:2) 4.4.2.1 Earliest-Deadline-First(EDF)Algorithm 76 4.4.2.2 OptimalityofEDF 78 4.4.3 Priority-DrivenSchedulingofAperiodicandSporadicTasks 82 4.4.3.1 SchedulingofAperiodicTasks 82 4.4.3.2 SchedulingofSporadicTasks 85 4.4.4 PracticalFactors 85 4.4.4.1 Nonpreemptivity 85 4.4.4.2 Self-Suspension 86 4.4.4.3 ContextSwitches 87 4.4.4.4 SchedulabilityTest 87 4.5 TaskAssignment 89 4.5.1 Bin-PackingAlgorithms 89 4.5.1.1 First-FitAlgorithm 90 4.5.1.2 First-FitDecreasingAlgorithm 91 4.5.1.3 Rate-MonotonicFirst-Fit(RMFF)Algorithm 91 4.5.2 AssignmentwithCommunicationCost 92 Exercises 94 SuggestionsforReading 97 References 97 5 ResourceSharingandAccessControl 99 5.1 ResourceSharing 99 (cid:2) TrimSize:152mmx229mm SingleColumn (cid:2) Wang ftoc.tex V1-06/24/2017 11:59am Pageviii viii Contents 5.1.1 ResourceOperation 100 5.1.2 ResourceRequirementSpecification 100 5.1.3 PriorityInversionandDeadlocks 101 5.1.4 ResourceAccessControl 103 5.2 NonpreemptiveCriticalSectionProtocol 103 5.3 PriorityInheritanceProtocol 106 5.3.1 RulesofPriorityInheritanceProtocol 106 5.3.2 PropertiesofPriorityInheritanceProtocol 109 5.4 PriorityCeilingProtocol 111 5.4.1 RulesofPriorityCeilingProtocol 112 5.4.2 PropertiesofPriorityCeilingProtocol 114 5.4.3 Worst-CaseBlockingTime 116 5.5 Stack-SharingPriorityCeilingProtocol 119 5.5.1 RulesofStack-SharingPriorityCeilingProtocol 119 5.5.2 PropertiesofStack-SharingPriorityCeilingProtocol 121 Exercises 122 SuggestionforReading 125 References 125 6 ConcurrentProgramming 127 (cid:2) 6.1 Introduction 127 (cid:2) 6.2 POSIXThreads 128 6.3 SynchronizationPrimitives 133 6.3.1 RaceConditionsandCriticalSections 133 6.3.2 Mutex 134 6.3.3 ConditionVariables 137 6.3.4 Semaphores 142 6.4 CommunicationamongTasks 148 6.4.1 MessageQueues 149 6.4.2 SharedMemory 155 6.4.3 SharedMemoryProtection 157 6.5 Real-TimeFacilities 162 6.5.1 Real-TimeSignals 162 6.5.1.1 BlockingSignals 163 6.5.1.2 DealingwithSignals 164 6.5.2 Timers 165 6.5.3 ImplementPeriodicTasks 169 6.5.3.1 Usingsleep()Function 169 6.5.3.2 UsingTimers 172 6.5.4 ImplementanApplicationwithMultiplePeriodicTasks 173 Exercises 173 SuggestionsforReading 177 References 177 (cid:2) TrimSize:152mmx229mm SingleColumn (cid:2) Wang ftoc.tex V1-06/24/2017 11:59am Pageix Contents ix 7 Finite-StateMachines 179 7.1 FiniteStateMachineBasics 179 7.2 DeterministicFiniteAutomation(DFA) 181 7.2.1 MooreMachines 182 7.2.2 MealyMachines 184 7.3 NondeterministicFiniteAutomation 188 7.4 ProgrammingFinite-StateMachines 188 Exercises 191 SuggestionsforReading 194 References 195 8 UMLStateMachines 197 8.1 States 198 8.2 Transitions 200 8.3 Events 201 8.4 CompositeStates 202 8.4.1 Hierarchy 203 8.4.2 Orthogonality 205 8.4.3 SubmachineStates 206 8.5 Pseudostates 206 (cid:2) 8.5.1 HistoryPseudostates 206 (cid:2) 8.5.2 EntryandExitPoints 208 8.5.3 ForkandJoinPseudostates 210 8.5.4 TerminatePseudostates 210 8.6 UMLStateMachineofAntilockBrakingSystem 211 Exercises 215 SuggestionsforReading 217 References 217 9 TimedPetriNets 219 9.1 PetriNetDefinition 219 9.1.1 TransitionFiring 221 9.1.2 ModelingPower 222 9.2 PetriNetProperties 225 9.2.1 BehavioralProperties 225 9.2.1.1 Reachability 225 9.2.1.2 𝜔Markings 226 9.2.1.3 ReachabilityAnalysisAlgorithm 227 9.2.1.4 BoundednessandSafeness 229 9.2.1.5 Liveness 229 9.2.2 StructuralProperties 230 9.2.2.1 T-InvariantsandS-Invariants 230 9.2.2.2 SiphonsandTraps 233 (cid:2)

Description:
Offering comprehensive coverage of the convergence of real-time embedded systems scheduling, resource access control, software design and development, and high-level system modeling, analysis and verification Following an introductory overview, Dr. Wang delves into the specifics of hardware componen
See more

The list of books you might like

Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.