Overview Of Software Applications - Dalhousie University

Transcription

Overview of Software ApplicationsIt is somewhat difficult to develop meaningful generic categories for softwareapplications as the increasing complexity of software has made it difficult to classifyapplications into neat compartments. However the following software areas indicatethe breadth of potential applications.System SoftwareSystem software is highly specific to one domain and not easily adaptable to otherenvironments. System software can be classified in one of two ways¾ It is a collection of programs written to service other programs. ExamplesincludeooooOperating systemsCompilersEditorsDevice drivers¾ Software written specifically to solve one well defined and highly specificproblem, e.g. control of an industrial application or process such as theproduction line of an automobile plant, a nuclear reactor or a fly-by-wireaircraft. In this case, system software is often an embedded application whenit may not be apparent to the user that there is indeed a computer inside thesystem.In general system software is characterised by heavy interaction with computerhardware and highly specialised applications. These characteristics are what makesuch software difficult to ‘port’ of translate to other environments.Software EngineeringTopic 1Page 22

Real-Time Systems and SoftwareReal-time software is an example of both system software and, more often thannot, embedded software. That is such software concerns itself with softwaresolutions targeted at highly specific problems in which the computer and softwaremay not be visible to the user.There is no single, all embracing definition of what constitutes a real-time systemor its software. Indeed some popular definitions put forward may well apply tosituations that may be classed as non real-time, but the most popular of thesedefinitions are listed below.It should be pointed out that a real-time system does not have to meet all of thesedefinitions to be so classified. Furthermore, an actual real-time system may actcontrary to one or more of these definitions, but agree with others. The definitionsare listed mearly to give an indication of the sort of behaviour one could expectfrom a real-time system.Popular Real-Time Systems and Software Definitions."A real time system is a controlling system taking in information fromits environment, processing it and responding to it."."A real time system reacts, responds and alters its actions so as toeffect the environment in which it is placed."."A real time system implies some air of criticality in the response ofthe system to its external environment."."A real time system is one where the correct answer at the wrongtime is the wrong answer"."A real-time system does not have to mean fast, it just means 'timely'which varies from mSec to mins depending upon system"."A real time system has a guaranteed, calculatable (deterministic) ,worst case response time to an event under its control.".Classifications of Real-Time SystemsBroadly speaking, real-time systems can be classified into two categories, basedupon their responsiveness to the external environment, the categories include¾ Hard Real-time systems¾ Soft Real-time SystemsSoftware EngineeringTopic 1Page 23

Hard Real Time Systems.A hard real-time system is one in which a failure to meet a specified responseresults in overall system failure.A hard real-time system will have a specified maximum delay to a response, whichcan then be used to judge failure.Examples of a hard real time system might include(1) A robot or production line failing to assemble a component within the timeallotted to it.(2) A Railway level crossing system failing to detect a train approaching intime.(3) Fuel injection management system in a car.In other words, failure of a hard real-time system usually means some catastrophicfailure of the system perhaps resulting in loss of life, or causing damage. Thesesystems are ‘time critical’ and often safety critical.Soft Real Time SystemsA soft real-time system implies that failure to meet a specified response timemerely results in system degradation not necessarily outright failure.Of course system degradation ultimately becomes system failure if the response isintolerable. This can happen if the response that may have initiated the action hasdisappeared before it can acted upon.".A Soft Real time system has a typical, or average response timeagainst which degradation can be judged. This response time is notfixed and may improve or degrade depending upon loading"Example Soft real time systems(1)An Elevator controller. There is no maximum delay specified for thesystem by which failure can be judged, but the manufacturers mayspecify a suggested or average response time to a request.(2)Cash dispenser for a bank.Software EngineeringTopic 1Page 24

Business SoftwareBusiness software is probably the largest application area for software developmenttoday. Examples of business software include¾ Information systems¾ Databases¾ PayrollSoftware in these areas often access large information data bases and re-structure theinformation to present it in many different ways to facilitate management decisionmaking. This is why such software is often referred to as MIS software ofManagement information systems software.A simple example of this might be an excel spreadsheet that can access informationfrom a file and display it in literally dozens of different ways from tables to piecharts to histograms etc, in other words the emphasis is on the way that data issummarised and presented. Other examples might include¾ Revenue Canada ability to access all your tax contributions based upon theentry of a S.I.N number¾ The ability of the police to access your criminal record based on an ID oraddress.¾ The ability of ICBC to recall the terms and conditions of your Vehicleinsurance based upon a licence plate.¾ A personnel departments ability to access information about youremployment (Position, home address, terms and conditions and contract,salary, length of service etc) based on your name and departmentEngineering and Scientific SoftwareTraditionally this field of software development has encapsulated mostly numbercrunching applications and/or the production of libraries of algorithms to solvemathematical problems. Traditional applications include¾ Astronomy, e.g. imaging enhancement algorithms, predicting orbits, mappingstar/planet orbits¾ Volcanology and earth quake prediction¾ Finite element analysis for predicting stress in materials and how shapes,(such as car) buckle and deform in impactsMore recently the emphasis has been on computer simulation and computer aideddesign, e.g. designing virtual components such as Aircraft, cars, production linerobots etc.Software EngineeringTopic 1Page 25

Embedded softwareEmbedded software includes a broad range of applications where the use of acomputer in the production of a system may not be obvious to the end user.Typically embedded software is based around small embedded micro-controllerssuch as Intel 8051, Motorola 6811 and, at an even simpler level, PIC devicesExamples of embedded software include microwave ovens, CD players, enginemanagement systems in Cars. Think about how many small embedded devicesexist in your Home PC, you should easily be able to come up with 10. Now thinkabout how many embedded system exist within a typical luxury Car.Rather than put this into my own words, here is an excellent article outlining thenature of and problems associated with designing real-time embedded systems.(Extract from: Real-Time UML,BP Douglass, Addison-Wesley ISBN:0-201-65784-8)If you read the popular computer press, you would come away with the impression that most computers siton a desktop (or lap) and run Windows. In terms of the number of deployed systems, embedded real-timesystems are orders of magnitude more common than their more-visible desktop cousins. A tour of theaverage affluent American home might find one or even two standard desktop computers, but literallydozens of smart consumer devices, each containing one or more processors. From the washing machineand microwave oven to the telephone, stereo, television, and automobile, embedded computers areeverywhere They help us to toast our muffins and to identify mothers-in-law calling on the phone.Embedded computers are even more prevalent in industry. Trains, switching systems, aircraft, chemicalprocess control, and nuclear power plants all use computers to safely and conveniently improve ourproductivity and quality of life (not to mention, they also keep a significant number of us gainfullyemployed) .The software for these embedded computers is more difficult to construct than it is for the desktop. Realtime systems have all the problems of desktop applications plus many more. Non-real-time systems do notconcern themselves with timelines, robustness, or safety - at least not to the same extent as real-timesystems. Real-time systems often do not have a conventional computer display or keyboard, but lie at theheart of some apparently non-computerized device. The user of these devices may never be aware of theCPU embedded within, making decisions about how and when the system should act. The user is notintimately involved with such a device as a computer per se, but rather as an electrical or mechanicalappliance that provides services. Such systems must often operate for days or even years, in the mosthostile environments, without stopping. The services and controls provided must be autonomous andtimely. Frequently, these devices have the potential to do great harm if they fail unsafely.An embedded system contains a computer as part of a larger system; it does not exist primarily to providestandard computing services to a user. A desktop PC is not an embedded system unless it is within atomographical imaging scanner or some other device. A computerized microwave oven or VCR is anembedded system because it does no "standard computing." In both cases, the embedded computer is partof a larger system that provides some noncomputing feature to the user, such as popping corn or showingSchwarzenegger ripping telephone booths from the floor.'Most embedded systems interact directly with electrical devices and indirectly with mechanical ones.Frequently, custom software, written specifically for the application, must control the device. This is whyembedded programmers have the reputation of being "bare-metal code pounders." You cannot buy astandard device driver or Windows VxD to talk to custom hardware components. Programming thesedevice drivers requires very low-level manipulation and intimate knowledge of the electrical propertiesand timing characteristics of the actual devices.Virtually all embedded systems either monitor or control hardware, or both. Sensors provide informationto the system about the state of its external environment. Medical monitoring devices, such aselectrocardiography (EGG) machines, use sensors to monitor patient and machine status. Air speed, enginethrust, attitude, and altitude sensors provide aircraft information for proper execution of flight-controlplans. Linear and angular position sensors sense a robot's arm position and adjust it via DC or steppermotors.Software EngineeringTopic 1Page 26

Many embedded systems use actuators to control their external environment or guide some externalprocesses. Flight-control computers command engine thrust and wing and tail control surface orientationso that the aircraft follows the intended flight path. Chemical process control systems control when, whatkind, and the amounts of reagents added to mixing vats. Pacemakers make the heart beat at appropriateintervals, with electrical leads attached to the walls inside the (right-side) heart chambers.Naturally, most systems containing actuators also contain sensors. While there are some open-loop control2systems, the majority of control systems use environmental feedback to ensure that the control loop isacting properly.3Standard computing systems react almost entirely to the user and nothing else. embedded systems, on theother hand, may interact with the user but have more concern for interactions with their sensors andactuators.One problem that arises with environmental interaction is that the universe has an annoying habit ofdisregarding our opinions of how and when it ought to behave. External events are frequently notpredictable. The system must react to events when they occur rather than when it might be convenient. Tobe of value, an ECG monitor must alarm quickly following the cessation of cardiac activity. The systemcannot delay alarm processing until later that evening, when the processor load is less. Many embeddedsystems are reactive in nature, and their responses to external events must be tightly bounded in time.Control loops, as we shall see later, are very sensitive to time delays. Delayed actuations destabilizecontrol loops.Most embedded systems do one or a small set of high-level tasks. The actual execution of those high-leveltasks requires many simultaneous lower-level activities. This is called concurrency. Since single-processorsystems can do only one thing at a time, they implement a scheduling policy that controls when tasksexecute. In multiple-processor systems, true concurrency is achievable because the processors executeasynchronously. Individual processors within such systems schedule many threads pseudo-concurrently(only a single thread may execute at any given time, but the active thread changes according to somescheduling policy), as well.Embedded systems are usually constructed with the least expensive (and, therefore, less powerful)computers that can meet the functional and performance requirements. Embedded systems ship thehardware along with the software, as part of a complete system package. As many products are extremelycost sensitive, marketing and sales concerns push for using smaller processors and less memory. Providingsmaller CPUs with less memory lowers the manufacturing cost. This per-shipped-item cost is calledrecurring cost; it recurs as each device is manufactured. Software has no significant recurring cost, all thecosts are bound up in development, maintenance, and support activities, making it appear to be free.4 Thismeans that choices are most often made to decrease hardware costs while increasing software developmentcosts.Under UNIX, a developer needing a big array might just allocate space for 1,000,000 floats with littlethought of the consequences. If the program doesn't use all that space, who cares? The workstation hashundreds of megabytes of RAM and gigabytes of virtual memory in the form of hard disk storage. Theembedded-systems developer cannot make these simplifying assumptions. He or she must do more withless, which often results in convoluted algorithms and extensive performance optimization. Naturally, thismakes the real-time software more complex and expensive to develop and maintain.Embedded developers often use tools hosted on PCs and workstations but targeted to smaller, less-capablecomputer platforms. This means they must use cross-compiler tools, which are often more temperamentalthan the more widely used desktop tools. In addition, the hardware facilities available on the targetplatform, such as timers, A/D converters, and sensors, cannot be easily simulated on a workstation. Thediscrepancy between the development and the target environments adds time and effort for the developerwanting to execute and test his or her code. The lack of sophisticated debugging tools on most smalltargets complicates testing, as well. Small embedded targets often do not even have a display on which toview error and diagnostic messages.Frequently, the embedded developer must design and write software for hardware that does not yet exist.This creates very real challenges because the developer cannot validate his or her understanding of howthe hardware functions. Integration and validation testing become more difficult and lengthy.Embedded systems must often run continuously for long periods of time. It would be awkward to have toreset your flight-control computer because of a General Protection Fault while you're in the air aboveNewark airport. The same applies to cardiac pacemakers, which last up to 10 years after implantation.Unmanned space probes must function properly for years on nuclear or solar power supplies. This isdifferent from desktop computers that may be frequently reset. It may be acceptable to reboot your desktopSoftware EngineeringTopic 1Page 27

PC when you discover one of those hidden Excel "features," but it is much less acceptable for a lifesupport ventilator or the control avionics of a commercial passenger jet.Embedded system environments are often computer-hostile. In surgical operating rooms, electrosurgicalunits create electrical arcs to cauterize incisions. These produce extremely high EMI (electromagneticinterference) and can physically damage unprotected computer electronics. Even if the damage is notpermanent, it is possible to corrupt memory storage, degrading performance or inducing a systems failure.Apart from increased reliability concerns, software is finding its way ever more frequently into safetysystems. Medical devices are perhaps the most obvious safety related computing devices, but computerscontrol many kinds of vehicles, such as aircraft, spacecraft, trains, and even automobiles. Softwarecontrols weapons systems and ensures the safety of nuclear power and chemical plants. There is5compelling evidence that the scope of industrial and transportation accidents is increasingFor all the reasons mentioned above, developing for embedded software is generally much more difficultthan for other types of software. The development environments have fewer tools, and the ones that existare often less capable than those for desktop environments or for Big Iron mainframes. Embedded targetsare slower and have less memory, yet must still perform within tight deadlines. These additional concernstranslate into more complexity for the developer, which means more time, more effort, and (unless we'recareful, indeed) more defects than standard desktop software of the same size.2An open loop system is one in which feedback about the performed action is not used to control theaction. A closed loop system is one in which the action is monitored and that sensory data is used tomodify the action.3 It is true that behind the scenes even desktop computers must interface with printers, mice, keyboards,and networks. The point is that they do this only to facilitate the user's whim4 Unfortunately, many companies opt for decreasing (primarily hardware) recurring costs withoutconsidering all the development cost ramifications.5 It is not a question of whether safety-critical software developers are paranoid. The real question is, "arethey paranoid enough?"Software EngineeringTopic 1Page 28

Web Based (Client-Server) SoftwareWeb based software is a fairly new (year 2000 ) area of software development but isexploding rapidly.Web based software is based around the idea of a Client and at least one Servercomputer connected via a network such as the World Wide Web. The client is themachine the customer sits in front. He/She interrogates a server machine with the aidof a ‘browser’, a package able to display Hypertext mark up language (HTML)content which is both graphical, textual and occasionally multi-media (sound andpictures) and can be produced easily from within a package such as Microsoft word.Typical browsers include Internet Explorer or Netscape Navigator to name but two.The idea is simple. A business wishing to advertise some product or servicepublishes a web-page on their server outlining, in HTML, anything they wish to sayor advertise. A potential customer wishing to read this content directs their clientcomputer browser to the location of the web-page on the server using a URL(universal resource locator

Software Engineering Topic 1 Page 22 Overview of Software Applications It is somewhat difficult to develop meaningful generic categories for software applications as the increasing complexity of software has made it difficult to classify applications into neat compartments. Howev