Real Time System 11 Philip A Lapalante 2nd Edition

download Real Time System 11 Philip A Lapalante 2nd Edition

of 12

Transcript of Real Time System 11 Philip A Lapalante 2nd Edition

  • 8/9/2019 Real Time System 11 Philip A Lapalante 2nd Edition

    1/12

    Real-TimeApplications

    KEY POINTS OF THE CHAPTER

    l. Real-time ystems recomPlex.2. The first real-timeapplicationmay have beenProjectWhirlwind.3. Real-timedatabases re specialapplications.4. Real-time maging s an importantbut challengingapplicationarea.5. Real-time anguagesmay not be suitable or "real" applications.

    It is appropriateo close he text with a discussion f severalnteresting pecialtyareas or real-timesystems esigners nd some eal-timeapplications.

    14.1REAL.TIME YSTEIvISS COMPLEX YSTEMSAlthough tremendous problems are involved in building real-time multi-processing systems (all the problems of uniprocessingsystemsplus inter-communication, esourcesharirg, load balancing,etc.),most real-time systemsare usually distributedheterogeneous ultiprocessing ystems.This is true inmost military applications and in industrial applications where standardcomponents uchasRISC workstations onnected y loca l areanetworks LANs)and wide area networks (WANs) are the implementationsof choice. Special-purposearchitectures, uch as thosediscussedn Chapter 72, are ncreasinglyfound to be noncompetitive over the life of a system when compared toapproacheshat useoff-the-shelfhardware.

    315

  • 8/9/2019 Real Time System 11 Philip A Lapalante 2nd Edition

    2/12

    316 Chap. 14 I Real-TimeApplications

    It is increasingly eingrecognized hat he construction f large-scale,eal-time systemss not ust about eal-timesystems nd scheduling. he fact is thatmost arge, modern,practical computerapplicationsembody manyproperties hatarecurrentlybeingstudiedargely n isolation.For example,mostcombatsystemsare real-time and distributed,seek o be reliable, and are fault-tolerant.Althoughit is important to study these ssues ndependently,collectively thesepropertieshavea complex nterrelationship. lobally, here s increasing ctivity n the areaof "complex systems"as a new, multidisciplinary ield of study. n a sense, hisbook s an attempt o discuss omeof the areas hat he complexsystems esigner(no longer he "real-time"systems esigner)will need o understand. hroughoutthis text it has been argued that a holistic approach s the only way to buildcomplex,distributed, eal-timeapplications.

    14.2 THE FIRSTREAL.TIMEAPPLICATION?In 1947MIT, in conjunctionwith the U.S. Navy, begandevelopment f ProjectWhirlwind (seeFigure 14.1).This projept was the first high-speedelectronicdigital computer able to operate n "real-time" and to be put to use as a practicaldevice.The goal of the project was to develop an airplane trainer/analyzer hatwould simulate aerodynamic orces acting on the pilot's controls.The pilot'sreactionswouid have to take effect aspromptly in the simulator as they would ina real airplane.Thus, the equipment had to operatewithin these"real responsetimes" 32]. Whirlwind was begunby JayW. Forrester,who sought o develop

    Figure 14.1 Photograph of the U.S. Navy's Whirlwind computer.(Courtesyof Jay Forrester and the MIT Museum.)

  • 8/9/2019 Real Time System 11 Philip A Lapalante 2nd Edition

    3/12

    Se c. I Real-Time Imase Databases

    an airplane rainer/analyzer hat would simulateaerodynamic orcesactingon thepilot's controls.The pilot's reactionswould have o take effectaspromptly n thesimulator as they would in a real airplane. Thus, the equipment had to operatewithin these"real response imes." We might also arguethat Whirlwind was"complex"becausen addition o speed, eliability was alsoof great mportance,and t was during this project that the military conceptof "commandand control"was ntroduced 32).Whirlwind's features were madepossible through the use of ferrite cores,which were faster than the cathode-ray tube memories of previous systems.Ferritecoresof the samekind were also used or computermemories n the 1950sin the United States uchas the 1953UNIVAC 1003model, he 1954IBM 704,and others 75].Another distinctive eatureof Whirlwind wasthe nclusionof an"algebraic compiler," an early pseudoprogramming anguage esulting from thework of Laning andZierler [751.During the project's final stages, he Whirlwind team became assimilatedinto the Air Force's SemiautomaticGround Environment (SAGE) air defensesystemproject [132]. As a result, the basic ideas of Project Whirlwind wereincorporated nto SAGE. Thus, while it is widely held that SAGE was the firstreal-time application,Project Whirlwind seems o deserve his credit.

    14.3 REAL.TIME ATABASESAn important application area or real-time systems s in databases. real-timedatabase ystem s a transactionprocessingsystem n which transactionsand datahave explicit timing constraints (deadlines).Real-time databasesare used in avariety of applications, including process control, radar systems, computer-integrated manufacturing, raffic control, virtual reality, and multimedia.

    Designing real-time databasesnvolves1. Analyzing the system requirements o identify data2. Determining the hardwarecapabilities3. Identifying the different data criticalities and integrity constraintsOrdinary database management systems provide concurrency control

    techniques hat seek to preservedata consistency e.g., read and write locking)and ogical consistency e.g., wo-phaseocking). Real-timedatabases ust alsoimpose concurrency control that preserves the schedule and data temporalconsistency equirements.As with most real-time systems,minimizing averageresponse s less important than guaranteeing he timing constraints of criticaltransactions.n the caseof database ystems,serializableexecution of concurrenttransactionsmay also be of less nterest.

    A rcal-time databasesystem must operate within the context of the bsroperating system and use existing services.Hence, constructionof a real-time

    317

  • 8/9/2019 Real Time System 11 Philip A Lapalante 2nd Edition

    4/12

    318 Chap. 14 I Real-TimeApplications

    databases nearly impossiblewith non-real-time. peratingsystems,and mostreal-timedatabases re constructed n top of special eal-timeoperating ystems.Consequently, ommercial eal-timedatabase ystems aveyet to emerge.Mostof the available"hard" real-time databases se proprietaryalgorithmsand aresuitablechiefly for softer real-timeapplicationswhere ransaction eadlines re"negotiable."

    As an exampleof a real-timedatabase,he architectureor the U.S. spacestation Freedom" s shown n Figure l4.2.The primary role of this system s toprovide ntegrated ataprocessing nd communication ervices or both the corefunction andpayloads.The systemneeds o be robust n that it must support30yearsof continually changingdataprocessing nd networkingneeds.

    Figure 14,2 Data managementsystem of space reedom.

    The system consists of a Fiber Distributed Data Irfterface (FDDI) ring.Sel eral standarddata processorsare attached o the core network, along withspecializedhardware such as communicationand tracking hardware, defined asorbital replaceable nits (ORU). Thesedevicesare then nterfaces o other devicesvia the Mil-Std-15538 bus.architecturer via multiplexer/demultiplexerMDM)units.The standarddataprocessor s actually a multiprocessingsystemconnectedvia Multi Bus II andcontainsa network interfaceunit (NIU) that runs the networkoperatingsystemand a bus nterface unit (BIU) that interfaceswith the MDMs orthe ORU hardware hrough he 15538'bus.The embedded ataprocessor EDP)runs a version of real-timeUNIX (LynxOS),which is POSlX-compatlble. hiscomplex, multiprocess ing eal-time system s mission critical, and simulationshave shown that it must handle approximately 5000 database ueries n a period

  • 8/9/2019 Real Time System 11 Philip A Lapalante 2nd Edition

    5/12

    Sec. 14.,4 Real-Time maseProcessins

    of 6 seconds. ariousscheduling isciplines, ncluding rate-monotonic re beinginvestigatedo optimizeperformance. detaileddescnptionof the s1'stem anbefound n [28].

    14.4 REAL.TIME IMAGE PROCESSINGReal-time mageprocessing iffersfrom "ordinary" imageprocessingn that thelogical validity of the system equiresnot only correctbut also imely outputs. tis often said hat mageprocessingn real-time s no more thana minor variationon mageprocessing ithout regard o time; astermachinerywill makeany speedproblemseventuallygo away. But real-time maging is not just about speedyhardware. t involves at leastthree fundamental radeoffs:performance ersusimageresolution,performance ersusstorageand input/outputbandwidth, andnumber of tasks versussynchronization.Of theseproblems,only the first andpossibly the second might be solved by faster machines.Furthermore, heproblems of expressing image algorithms (especially for multiprocessingarchitectures), f finding appropriateprogramming anguages, f testing andreliability, and of practicalsoftwareengineeringechnique re not readilysolvedsimply with fasterhardware.Because f i ts nature, hereare both supports or andobstacleso real-timeimageproeessing. n thepositiveside,many magingapplications rewell-suitedfor parallelization and hence faster, parallel architectures.Furthermore, manyimaging applications an be constructedwithout using anguage onstructshatdestroydeterminism. inally, special eal-time magingarchitectures reavailableor can theoreticallybe constructed.On the down side, many imaging applicationsare time critical and arecomputationally intensive or data intensive. And there are no standardprogramming anguages vailable or real-time mageprocessing. inally, real-time processingscience tself is still struggling to produce usable results,especially or parallelprocessingmachines.Real-time mage processing overs a multidisciplinary range of researchareas, ncluding (but not limited to) image compression,argetacquisitionandtracking, remotecontrel and sensing, mageenhancement nd filtering, network-ing for real-time maging, advancedcomputerarchitectures, omputer vision.optical measurement nd inspection,and simulation.Theseresearcharasarecritical in such applicationsas robotics,virtual reality, multimedia, ndustrialinspection,high-definition elevision,advanced imulators, omputer-integratedmanufacturing,and intelligent vehicles.

    In summary, eal-timesystemsare unique n that semantic aliditl'entailsnot only functionalcorrectness ut also deadlinesatisfaction. generalizedeal-time imageprocessing ystem s shown n Figure 14.3. t functionsby taking ananalogvideo input from a Qamera r sensingdeviceand digitizing it . The imageis then enhancedor filtered to remove noise. If obiect or motion detection s

    319

  • 8/9/2019 Real Time System 11 Philip A Lapalante 2nd Edition

    6/12

    320 Chap. 14 I Real-TimeApplications

    Figure 14.3 A generalized eal-time image processingsystem.

    required, hatprocess s applied. f appropriate,anobjectrecognitionalgorithmorotherdecisiori ogic is applied o themodified mage. n most cases, omeson ofimage display is also required.For many applications, hese stepsmust beexecuted n real-time-for,example, at the 30 framesper second ate needed orcontinuousmotion PercePtion.

    14.4.1VirtualReality :To investigateone real-time imaging applicationbriefly, considervirtual reality.Virtual reality (VR) systemsare complexcomputersimulations nvolving visual,audio, actile, andotherfeedbackqoenticea person'sperceptualmechanismsntobelieving they are actually in an rtificial world. Although virtual reality hasobvious applications in combat simulation and training, its most promisingapplicationsare civilian, including exerciseand recreation,physical rehabilitationand therapy,occupational raining, and psychological diagnosis raining. In thesetypes of systems,high performanceand deadline guaranteesare essentialtoensure hat the illusion of reality is maintained'Virtual reality systemscome in at least threeparadigms:

    I Telepresence-where a human operator can remotely control robits orotherdevicesas f the operatorwere physically present.For example,anindividual can don a special suit that would pefmit the repair of anunderwaterstructurevia a robot whosemovernentseflected hose of theoperator.The operator "thinks" that they areunderwater and are workingon the real sffucture.

    I Immersion:-where a simulator s implemented hat can actually fool thesenses f the human subject nto believing that the simulatedscenario s

  • 8/9/2019 Real Time System 11 Philip A Lapalante 2nd Edition

    7/12

    14.4 I Real-Time mageProcessing

    real.Fansof televisionscienceiction programs, uchas "Star Trek:TheNext Generation,"are familiar with this type of virtual reality.

    r Augmented eality-where a displayof live information s supplementedwith simulated nformation.A simulatedX-ray view of a patient'sbodysuperimposed n a monitor display of the live patient for diagnosticpurposess suchan examPle.

    A generalized rchitectureor eachparadigm s shown n Figure I4.4.In case a),telepresence, human operator nteractswith a helmet-mounted isplay,handcontrols,and oot leversconnectedo theVR processor. heprocessorhen elaysthe control information via satellite to a remote ship. The ship is attached o atetheredobot hat moves n accordance ith thehuman'smovements. he humanalso receives eedback nformation from the robot in the form of visual imagesandpossibly orce fqedbackon the handor foot levers.In case (b), immersion, a specially designedroom provides a humanparticipant with simulated mages (criminals and bystanders) hrough a helmet-mounteddisplay.Motion sensorsn the ceiling and light reflectors on the floorhelp to track the participant'smovement n order to aid in generating he correctperspective or the 3-D images n the room.

    Finally, in case c), augmentedeality,a diver is equippedwith a goggle-mounted display that augments the real-world view of the submarine withcomputer-generated verlays that give the diver information about the innerworkings of the ship for the purposeof repair.In each case,extensiverun-time support is needed or high-resolutiongraphics,helmet-mounted isplays,digital cameras,motion sensors,orce andtactile feedbackperipherals,and other devices.BecauseVR systems epresent omplex,multitasking,graphics imulationsthat involve control and trackingproblems, hey areperhaps he mostchallengingof all real-time systems;using today's technology,perfect results are notobtainable. Virtual reality also involves concurrent programs and processors,sharedperipherals, and the important notion that synchronization s at least asimportant as timeliness. For example, in virtual-reality-type flight simulators,evena slight skew n the synchronizationof a pilot's commandsand the resultantdisplayupdate e.g.,a turn is made) cancausenausea'

    14.4.2 MultimediaAdvances in multimedia computers have significantly affected research inmultimedia computing. Multimedia systemscan be collectively viewed as acombination of voice, images, animation, full-motion video and audio. Theprim4ry area.of research in multimedia computing deals with multimediahardwareand softwaresystems,aswell astools development or computer-aidedleaming (e.g., encyclopedias, nteractive games). In particular, much researchfocuses on distributed multimedia systems. Distributed multimedia systems

    321

  • 8/9/2019 Real Time System 11 Philip A Lapalante 2nd Edition

    8/12

  • 8/9/2019 Real Time System 11 Philip A Lapalante 2nd Edition

    9/12

    I Real-Time mage Processing 323

    require synchronization, arge storage, ndexing, and retrieval of data. Forexample,as with VR, in multimedia applications, t is clear that audio speechoutput must be in synchronywith the imageof a personspeaking.Multimedia systems are complex systems hat need to deal with highprocessing ower,high-speed etworks, arge storagedevices,video and audiocompression echniques. eal -time operating systems,software development,storage nd retrievalof data,parallel echniques, nd architecturesor distributedenvironments. arge-scalemultimedia storagewill be an integral part of theemergingdistributedmultimedia cofilputing infrastructure.Work has beendone oprovide high bus bandrvidth afrd a high-performance multimedia real-time

    operating system that supports real-time scheduling. In the software toolsdevelopment, esearch as beencentered rounda new object-orientedanguageparadigm.A major concern n multimediasystem s audioandvideo compression.An importdnt consideration n constructing deterministic, predictable, andsynchronizedmultimedia systems s whether the compression echniquesaredeterministic.

    A generalizedmultimediaarchitectures given n Figure 4.5.In this design,compressgd nd uncompressed udio and video (and control inputs such astiming) are input into the system.A local databasemay be accessedor thepurpose of decompression such as in vector quantization echniquqs)or toprovide ocal information o supplement he system e.g.,background Ognery).

    Figure 14,5 A generalizedmultimedia architecture.

    Controlnputs

    Multimediaprocessrngsysrem

  • 8/9/2019 Real Time System 11 Philip A Lapalante 2nd Edition

    10/12

    324The processing ystemmanipulates heconsider he foreign film systemshownoutputsvideo and audio.

    14.5 REAL.TIME UNIX

    Chap. 14 I Real-TimeApplications

    data n a variety of ways (for example,in Chapter5), but ultimately the system

    An important real-time "application" is not really an applicationat all but anoperating system.However, becauseof its commercial mportance, he UNIXoperatingsystemand its real-time relativesare of great nterest o applicationsdevelopers.

    Real-time UNIX solutions seek to guarantee esponse imes thrt -:rconsiderationsn

  • 8/9/2019 Real Time System 11 Philip A Lapalante 2nd Edition

    11/12

  • 8/9/2019 Real Time System 11 Philip A Lapalante 2nd Edition

    12/12

    326 Chap. 14 I Real-TimeApplications

    PEARL: The Processand ExperimentAutomation Realtime Languagedeveloped n the early 1970sby a group of German researchers. earluses the augmentationstrategy and has fairly wide application inGermany,especially n industrial control settings.Real-timeEuclid:An experimentalanguagehat enjoys he distinctionofbeingone of the only languageso be cornpletely uited or schedulabili tyanalysis. his is achieved hrough anguageestriction.Unfortunately,helanguage as not found its way into mainsfrainapplication.Real-timeC: Actually a genericname or a variety of C macroextensionpackages. hese macroextensionsypically provide timing and controlconstructs hat.arenot found in standardC.

    r Real-time C++: A generic name for several object class librariesspecificallydeveloped or C++. These ibrariesaugment tandardC++ toprovide an increasedevel of timing and control.r Java: A languageused frequently in World Wide Web pages. t was

    originally intended or embedded ystemsike consumerelectronics ndis still gaining acceptancen that domain. Java combines a virtualmachine (an interpreter)with a C++-like languageand an associatedcompiler that converts he sourcecode nto interpreterdirectivescalledbyte codes.The advantage f this approach s that the code s machineindependenti.e., t is targetedor the virtual machine)-hence its use nthe heterogeneous orld of the Web. n someways,Java s a great eal-time language. t allows for multithreading(with POSIX compliancewhen running on UNIX platforms), provides explicit synchronizationrnechanisms uch as spinlocks,and is object-oriented, ut without suchdrawbacksas garbage ollectton.

    Thereare,of course,manyother eal-t ime anguages/operatingnvironmentswithnames ike MACH, EIFFEL, MARUTI and ESTEREL hat arewidely referencedin the literature. Many of these languagesare used for highly specializedapplications r in research nly.For a thoroughdiscussion f real-time anguages,see 156].

    14.7EXERCTSESl. Research he real-time programming anguagesdiscussedn this chapterand write a report

    comparingandcontrastinghese anguages ith respecto the anguage 'eatures iscussedin Chapter3.

    2. From the research iterature, identify and discussat least three real-time languagesnotmcntioned n this book.

    3. Using any of the anguages bove, onstructa softwaremodel or the systemdescribednSection 13.5.Many compilers or these anguages re available or fiee on the Intemet.