Chapter 19: Real-Time SystemsSlide 2ObjectivesOverview of Real-Time SystemsDefinitionsSystem CharacteristicsCharacteristics - 1Characteristics - 2Bus-Oriented SystemCharacteristics - 3Features of Real-Time KernelsMemory Mapping SchemesAddress TranslationImplementing Real-Time Operating Systems1. Priority-Based Scheduling2. Preemptive Kernels2. Preemptive Kernels - 23. Minimizing LatencyMinimizing Latency – continuedInterrupt LatencyDispatch LatencyReal-Time CPU SchedulingReal-Time CPU Scheduling - moreSlide 24Preface to Scheduling AlgorithmsScheduling of tasks when P2 has a higher priority than P1Rate Monotonic SchedulingEarliest Deadline First SchedulingSlide 29End of Chapter 19Chapter 19: Real-Time SystemsChapter 19: Real-Time Systems19.2Silberschatz, Galvin and Gagne ©2005Operating System ConceptsChapter 19: Real-Time SystemsChapter 19: Real-Time SystemsOverview and IntroductionSystem CharacteristicsFeatures of Real-Time SystemsImplementing Real-Time Operating SystemsReal-Time CPU Scheduling19.3Silberschatz, Galvin and Gagne ©2005Operating System ConceptsObjectivesObjectivesTo explain the timing requirements of real-time systemsTo distinguish between hard and soft real-time systemsTo discuss the defining characteristics of real-time systemsTo describe scheduling algorithms for hard real-time systems19.4Silberschatz, Galvin and Gagne ©2005Operating System ConceptsOverview of Real-Time SystemsOverview of Real-Time SystemsThe differences between real time computing systems and general purpose computing systems are very profound.We will examine many of these differences in the upcoming slides. A real time computing system is one that requires that correct results be produced within specified deadline periods. (Deadline is a key word)Results produced after a specific time period has elapsed may well be of absolutely no value and may mean loss of life or an aircraft crash; yet other failures might not be quite as disastrous if real time system is not quite as responsive. . Real time: Run on wide range of computer hardware; Used in many different kinds of applications. Some real time systems are embedded in aircraft instrumentation:your microwave, cell phone, cruise control, and hosts of other applications.Are often part of a larger system;Oftentimes their presence is not obvious to a user.19.5Silberschatz, Galvin and Gagne ©2005Operating System ConceptsDefinitionsDefinitionsA real-time system requires results produced within a specified deadline period.A hard real time system has stringent requirements, guaranteeing that critical real-time tasks be completed within their deadlines.E.g. Safety-critical systems; health systems; etc. A soft real-time system is less restrictive and guarantees simply that a critical real-time task will receive priority over other tasks;Further, these tasks retain priority over other tasks until the tasks complete.An embedded system is a computing device that is part of a larger system (I.e. automobile, airliner.)A safety-critical system is a real-time system with catastrophic results in case of failure.Again, a hard real-time system guarantees that real-time tasks be completed within their required deadlines, while a soft real-time system provides priority of real-time tasks over non real-time tasks.19.6Silberschatz, Galvin and Gagne ©2005Operating System ConceptsSystem CharacteristicsSystem CharacteristicsWill look at both soft and hard real-time operating systems..Real time systems typically exhibit the following characteristics:Single purposeSmall sizeInexpensively mass-producedSpecific timing requirementsAnd, so many other rather unique features spring from these characteristics.These are the big four defining characteristics…Let’s look at those…19.7Silberschatz, Galvin and Gagne ©2005Operating System ConceptsCharacteristics - 1Characteristics - 1Single Purpose: Single purpose is typical: controlling anti-lock brakes; toaster, cell phone.This makes the operating system simple too, as many characteristics integral to general – purpose operating systems are not available or needed. Size:Often found in severely cramped space – but sufficient for operations.Examples: wrist watches, cell phones, toysThus, CPU processing power is minimalAmount of primary memory is also minimal.Architectures: Compare 32 / 64-bit architectures with 8/16 bit processors.Architecture: Compare several gigs of memory with < 1 MB memory.19.8Silberschatz, Galvin and Gagne ©2005Operating System ConceptsCharacteristics - 2Characteristics - 2CostTypically mass produced: as in microwave ovens, thermostats.Thus, real time microprocessors are often inexpensive Organization of real time systems are designed to minimize cost:To eliminate bus architectures, the physical organization for embedded controllers are often organized as a system-on-a-chip, which has all necessary interconnections.Chip includes memory, cache, a MMU (for possible address translation), any peripheral ports necessary - all in a single integrated circuit.Such organization is typically much less expensive than typical bus-oriented architectures.19.9Silberschatz, Galvin and Gagne ©2005Operating System ConceptsBus-Oriented SystemBus-Oriented System19.10Silberschatz, Galvin and Gagne ©2005Operating System ConceptsCharacteristics - 3Characteristics - 3Timing: This is the feature that impacts almost everything else and makes real time systems what they really are!Both ‘hard’ and ‘soft’ real time systems have timing requirements.So, we will need to develop real time scheduling algorithms that provide priority to the highest scheduled processes.Schedulers absolutely must ensure that the priority of real time tasks does not degrade over time.So, we must minimize the response time to interrupts – recognize the interrupt, save context, transfer control to the handler, etc… as one can easily imagine.19.11Silberschatz, Galvin and Gagne ©2005Operating System ConceptsFeatures of Real-Time KernelsFeatures of Real-Time KernelsMost real-time systems do not provide features found in desktop systems.Simply not needed.Do not need (in general) support forA variety of peripheral devices – graphical displays, CD, DVD drives…Protection and security mechanismSupport for multiple
View Full Document