Introduction to Real Time Systems - 1 | Embedded Systems (Web) - Computer Science Engineering (CSE) PDF Download

Introduction

Commercial usage of computer dates back to a little more than fifty years.  This brief period can roughly be divided into mainframe, PC, and post-PC eras of computing.  The mainframe era was marked by expensive computers that were quite unaffordable by individuals, and each computer served a large number of users. The PC era saw the emergence of desktops which could be easily be afforded and used by the individual users. The post-PC era is seeing emergence of small and portable computers, and computers embedded in everyday applications, making an individual interact with several computers everyday. 

Real-time and embedded computing applications in the first two computing era were rather rare and restricted to a few specialized applications such as space and defense.  In the post-PC era of computing, the use of computer systems based on real-time and embedded technologies has already touched every facet of our life and is still growing at a pace that was never seen before.  While embedded processing and Internet-enabled devices have now captured everyone’s  imagination,  they  are  just  a  small  fraction  of applications  that  have  been  made  possible  by  real-time systems.  If we casually look around us, we can discover many of them often they are camouflaged inside simple looking devices.  If we observe carefully, we can notice several gadgets and applications which have today become in- dispensable to our every day life, are in fact based on embedded real-time systems.  

For example, we have ubiquitous consumer products such as digital cameras, cell phones, microwave ovens, camcorders, video game sets; telecommunication domain products and applications such as set-top  boxes, cable modems, voice over IP (VoIP), and video conferencing applications; office products such as fax machines, laser printers, and security systems. Besides, we encounter real-time systems in hospitals in the form of medical instrumentation equipments and imaging systems. There are also a large number of equipments and gadgets based on real-time systems which though we normally do not use directly, but never the less are still important to our daily life. A few examples of such systems are Internet routers, base stations in cellular systems, industrial plant automation systems, and industrial robots. 

It can be easily inferred from the above discussion that in recent times real-time computers have become ubiquitous and have permeated large number of application areas.  At present, the computers used in real-time applications vastly outnumber the computers that are being used in conventional applications. According to an estimate [3], 70% of all processors manufactured world-wide are deployed in real-time embedded applications. While it is already true that an overwhelming majority of all processors being manufactured are getting deployed in real-time applications, what  is more remarkable  is  the  unmistakable trend of steady rise in the fraction of all processors manufactured world-wide finding their way to real-time applications. 

Some  of  the  reasons  attributable  to  the  phenomenal  growth  in  the  use  of  real-time  systems  in  the  recent  years are  the  manifold  reductions  in  the  size  and  the cost  of  the  computers,  coupled  with  the  magical  improvements  to their  performance.  The  availability  of  computers  at  rapidly  falling  prices,  reduced  weight,  rapidly shrinking  sizes, and  their  increasing  processing  power  have  together  contributed  to  the  present  scenario. Applications which not too far back were considered prohibitively expensive to automate can now be affordably automated. For instance, when microprocessors cost several tens of thousands of rupees, they were considered to be too expensive to be put inside a washing machine; but when they cost only a few hundred rupees, their use makes commercial sense. 

The rapid growth of applications deploying real-time technologies has been matched by the evolutionary growth of the underlying technologies supporting the development of real-time systems.  In this book, we discuss some of the core technologies used in developing real-time systems. However, we restrict ourselves to software issues only and keep hardware discussions to the bare minimum. The software issues that we address are quite expansive in the sense that besides the operating system and program development issues, we discuss the networking and database issues. 

In this chapter, we restrict ourselves to some introductory and fundamental issues.  In the next three chapters, we  discuss  some  core  theories  underlying  the  development of  practical  real-time  and  embedded  systems. In the subsequent chapter, we discuss some important features of commercial real-time operating systems.  After that, we shift our attention to realtime communication technologies and databases. 

What is Real-Time? 

Real-time is a quantitative notion of time. Real-time is measured using a physical (real) clock. Whenever we quantify time using a physical clock, we deal with real time. An example use of this quantitative notion of time can be observed in a description of an automated chemical plant.  Consider this: when the temperature of the chemical reaction chamber attains a certain predetermined temperature, say 250oC, the system automatically switches off the heater within a predetermined time interval, say within 30 milliseconds. In this description of a part of the behavior of a chemical plant, the time value that was referred to denotes the readings of some physical clock present in the plant automation system. 

In contrast to real time, logical time (also known as virtual time) deals with a qualitative notion of time and is expressed using event ordering relations such as before, after, sometimes, eventually, precedes, succeeds, etc.  While dealing with logical time, time readings from a physical clock are not necessary for ordering the events.  As an example, consider the following part of the behavior of library automation software used to automate the book-keeping activities of a college library:  “After a query book command is given by the user, details of all matching books are displayed by the software.” In this example, the events “issue of query book command” and “display of results” are logically ordered in terms of which events follow the other. But, no quantitative expression of time was required. Clearly, this example behavior is devoid of any real-time considerations. We are now in a position to define what a real-time system is: 

A system is called a real-time system, when we need quantitative expression of time (i.e. real-time) to describe the behavior of the system. 

Remember that in this definition of a real-time system, it is implicit that all quantitative time measurements are carried out using a physical clock. A chemical plant, whose part behavior description is - when  temperature  of the  reaction  chamber  attains  certain  predetermined  temperature  value,  say  250oC,  the  system automatically  switches off the  heater  within  say  30  milliseconds - is clearly a real-time system. Our examples so far were restricted to the description of partial behavior of systems.  The complete behavior of a system can  be  described  by  listing  its  response  to  various  external  stimuli. It  may  be  noted  that  all  the  clauses  in  the description of the behavior of a real-time system need not involve quantitative measures of time. That is, large parts of a description of the behavior of a system may not have any quantitative expressions of time at all, and still qualify as a real-time system. Any system whose behavior can completely be described without using any quantitative expression of time is of course not a real-time system. 

Applications  of  Real-Time  Systems 

Real-time  systems  have  of  late,  found  applications  in  wide  ranging  areas.   In  the  following,  we  list  some  of  the prominent areas of application of real-time systems and in each identified case, we discuss a few example applications in  some  detail. As  we  can  imagine,  the  list  would  become  very  vast  if  we  try  to  exhaustively  list all areas  of applications of realtime systems. We have therefore restricted our list to only a handful of areas, and out of these we have explained only a few selected applications to conserve space. We have pointed out the quantitative notions of time used in the discussed applications. The examples we present are important to our subsequent discussions and would be referred to in the later chapters whenever required. 

Industrial Applications 

Industrial applications constitute a major usage area of real-time systems.  A few examples of industrial applications of real-time systems are:  process control systems, industrial automation systems, SCADA applications, test and measurement equipments, and robotic equipments.

Example 1: Chemical Plant Control  

Chemical plant control systems are essentially a type of process control application.  In an automated chemical plant, a real-time computer periodically monitors plant conditions. The plant conditions are determined based on  current  readings  of  pressure,  temperature,  and  chemical  concentration  of  the  reaction  chamber. These parameters are sampled periodically. Based on the values sampled at any time, the automation system decides on the corrective actions necessary at that instant to maintain the chemical reaction at a certain rate.  

Each time the plant conditions are sampled, the automation system should decide on the exact instantaneous corrective actions  required  such  as  changing  the  pressure,  temperature,  or  chemical  concentration  and  carry  out  these actions  within  certain  predefined  time  bounds. Typically,  the  time  bounds  in  such  a  chemical  plant  control application range from a few micro seconds to several milliseconds. 

Example 2: Automated Car Assembly Plant 

An automated car assembly plant is an example of a plant automation system.  In an automated car assembly plant, the work product (partially assembled car) moves on a conveyor belt (see Fig. 28.1). By the side of the conveyor belt, several workstations are placed.  Each workstation performs some specific work on the work product such as fitting engine, fitting door, fitting wheel, and spray painting the car, etc.  as it moves on the conveyor belt. An empty chassis is introduced near the first workstation on the conveyor belt.  A fully assembled car comes out after the work product goes past all the workstations.  At each workstation, a sensor senses the arrival of the next partially assembled product.  As  soon  as  the  partially  assembled product  is  sensed,  the  workstation begins  to  perform  its  work  on  the  work  product.  The time constraint imposed on the workstation computer is that the workstation must complete its work before the work product moves away to the next workstation. The time bounds involved here are typically of the order of a few hundreds of milliseconds. 

Introduction to Real Time Systems - 1 | Embedded Systems (Web) - Computer Science Engineering (CSE)

Fig. 28.1 Schematic Representation of an Automated Car Assembly Plant 

Example 3: Supervisory Control And Data Acquisition (SCADA)

SCADA are a category of distributed control systems being used in many industries. A SCADA system helps monitor and control a large number of distributed events of interest. In SCADA systems, sensors are scattered at various geographic locations to collect raw data (called events of interest). These data are then processed and stored in a real-time database.   The  database  models  (or  reflects)  the  current  state  of  the  environment. The database is updated frequently to make it a realistic model of the up-to-date state of the environment. An example of a SCADA application is an Energy Management System (EMS). An EMS helps to carry out load balancing in an electrical energy distribution network.  The EMS senses the energy consumption at the distribution points and computes the load across different phases of power supply.  It also helps dynamically balance the load.  Another example of a SCADA system is a system that monitors and controls traffic in a computer network.  Depending  on  the  sensed  load  in different  segments  of  the  network,  the  SCADA  system  makes  the router change its traffic routing policy dynamically. The time constraint in such a SCADA application is that the sensors must sense the system state at regular intervals (say every few milliseconds) and the same must be processed before the next state is sensed. 

Medical 

A few examples of medical applications of real-time systems are:  robots, MRI scanners, radiation therapy equipments, bedside monitors, and computerized axial tomography (CAT). 

Example 4: Robot Used in Recovery of Displaced Radioactive Material 

Robots  have  become  very  popular  nowadays  and  are  being  used  in  a  wide  variety  of  medical  applications. An application that we discuss here is a robot used in retrieving displaced radioactive materials.  Radioactive materials such as Cobalt and Radium are used for treatment of cancer. At times during treatment, the radioactive Cobalt (or Radium) gets dislocated and falls down.  Since human beings can not come near a radioactive material, a robot is used to restore the radioactive material to its proper position. The robot walks into the room containing the radioactive material, picks it up, and restores it to its proper position.  The robot has to sense its environment frequently and based on this information, plan its path.  The real-time constraint on the path planning task of the robot is that unless it plans the path fast enough after an obstacle is detected, it may collide with it.  The time constraints involved here are of the order of a few milliseconds. 

Peripheral equipments 

A few examples of peripheral equipments that contain embedded real-time systems are: laser printers, digital copiers, fax machines, digital cameras, and scanners. 

Example 5: Laser Printer 

Most laser printers have powerful microprocessors embedded in them to control different activities associated with printing. The important activities that a microprocessor embedded in a laser printer performs include the following:  getting data from the communication port(s), typesetting fonts, sensing paper jams, noticing when the printer runs out of paper, sensing when the user presses a button on the control panel, and displaying various messages to the user. The most complex activity that the microprocessor performs is driving the laser engine. The basic command that a laser engine supports is to put a black dot on the paper. However, the laser engine has no idea about the exact shapes of different fonts, font sizes, italic, underlining, boldface, etc. that it may be asked to print. The embedded microprocessor receives print commands on its input port and determines  how  the  dots  can  be  composed  to  achieve  the  desired  document  and  manages  printing  the  exact shapes through a series of dot commands issued to the laser engine.  The time constraints involved here are of the order of a few milli seconds. 

Automotive and Transportation 

A few examples of automotive and transportation applications of real-time systems are:  automotive engine control systems, road traffic signal control, air-traffic control, high-speed train control, car navigation systems, and MPFI engine control systems. 

Example 6: Multi-Point Fuel Injection (MPFI) System 

An MPFI system is an automotive engine control system.  A conceptual diagram of a car embedding an MPFI system is shown in Fig.28.2. An MPFI is a real-time system that controls the rate of fuel injection and allows the engine to operate at its optimal efficiency.  In older models of cars, a mechanical device called the carburetor was  used  to control  the  fuel  injection  rate  to  the  engine.  It  was  the  responsibility  of  the  carburetor  to  vary the  fuel  injection  rate  depending  on  the  current  speed  of  the vehicle  and  the  desired  acceleration. Careful experiments have suggested that for optimal energy output, the required fuel injection rate is highly nonlinear with respect to the vehicle speed and acceleration.  Also, experimental results show that the precise fuel injection through multiple points is more effective than single point injection.  In MPFI engines, the precise fuel injection rate at each injection point is determined by a computer. An MPFI system injects fuel into individual cylinders resulting in better ‘power balance’ among the cylinders as well as higher output from each one along with faster throttle response. The processor primarily controls the ignition timing and the quantity of fuel to be injected.

The latter is achieved by controlling the duration for which the injector valve is open — popularly known as pulse width.  The actions of the processor are determined by the data gleaned from sensors located all over the engine. These sensors constantly monitor the ambient temperature, the engine coolant temperature, exhaust temperature, emission  gas  contents,  engine  rpm  (speed),  vehicle  road  speed,  crankshaft  position,  camshaft position, etc. An MPFI engine with even an 8-bit computer does a much better job of determining an accurate fuel injection rate for given values of speed and acceleration compared to a carburetor-based system. An MPFI system not only makes a vehicle more fuel efficient, it also minimizes pollution by reducing partial combustion. 

Introduction to Real Time Systems - 1 | Embedded Systems (Web) - Computer Science Engineering (CSE)

Fig. 28.2 A Real-Time System Embedded in an MPFI Car

Telecommunication  Applications 

A few example uses of real-time systems in telecommunication applications are: cellular systems, video conferencing, and cable modems.

Example 7: A Cellular System  

Cellular systems have become a very popular means of mobile communication. A cellular system usually maps a city into cells. In each cell, a base station monitors the mobile handsets present in the cell. Besides, the base station performs  several tasks such as locating a user, sending and receiving control messages to a handset, keeping track of  call  details  for  billing  purposes,  and  hand-off  of  calls  as  the  mobile  moves. Call hand-off is required when a mobile moves away from a base station.  As a mobile moves away, its received signal strength (RSS) falls at the base station. The  base  station  monitors  this  and  as  soon  as  the  RSS  falls  below  a  certain threshold value, it hands-off the details of the on-going call of the mobile to the base station of the cell to which the mobile has moved. The hand-off must be completed within a sufficiently small predefined time interval so that the user does not feel any temporary disruption of service during the hand-off. Typically call hand-off is required to be achieved within a few milliseconds. 

Aerospace 

A  few  important  use  of  real-time  systems  in  aerospace  applications  are:  avionics,  flight  simulation, airline cabin management systems, satellite tracking systems, and computer on-board an aircraft. 

Example 8: Computer On-board an Aircraft 

In many modern aircrafts, the pilot can select an “auto pilot” option. As soon as the pilot switches to the “auto pilot” mode, an  on-board  computer  takes  over  all  controls  of the aircraft  including  navigation,  take-off,  and landing of the aircraft. In the “auto pilot” mode, the computer periodically samples velocity and acceleration of the aircraft. From the sampled data, the on-board computer computes X, Y, and Z co-ordinates of the current aircraft position and compares them with the pre-specified track data. Before the next sample values are obtained, it computes the deviation from the specified track values and takes any corrective actions that may be necessary. In this case, the sampling of the various parameters, and their processing need to be completed within a few micro seconds. 

Internet and Multimedia Applications 

Important use of real-time systems in multimedia and Internet applications include: video conferencing and multimedia multicast, Internet routers and switches.

Example 9: Video Conferencing 

In a video conferencing application, video and audio signals are generated by cameras and microphones respectively.   The data are sampled at a certain pre-specified frame rate. These are then compressed and sent as packets to the receiver over a network. At the receiver-end, packets are ordered, decompressed, and then played. The time constraint at the receiver-end is that the receiver must process and play the received frames at a predetermined constant rate. Thus if thirty frames are to be shown every minute, once a frame play-out is complete, the next frame must be played within two seconds.

Consumer Electronics 

Consumer electronics area abounds numerous applications of real-time systems. A few sample applications  of real-time  systems  in consumer electronics  are: set-top boxes, audio  equipment, Internet  telephony, microwave ovens, intelligent  washing machines,  home  security systems, air conditioning and refrigeration, toys, and cell phones.

Example 10: Cell Phones  

Cell  phones  are  possibly  the  fastest  growing  segment  of  consumer  electronics. A cell phone at any point of time carries out a number of tasks simultaneously.  These include:  converting input voice to digital signals by deploying digital signal processing (DSP) techniques, converting electrical signals generated by the microphone to output voice signals, and sampling incoming base station signals in the control channel. A cell phone responds to the  communications  received  from  the  base  station  within  certain  specified  time  bounds. For example, a base station might command a cell phone to switch the on-going communication to a specific frequency. The cell phone must comply with such commands from the base station within a few milliseconds.

Defense Applications  

Typical defense applications of real-time systems include:  missile guidance systems, anti- missile systems, satellite-based surveillance systems. 

Example 11: Missile Guidance System 

A guided missile is one that is capable of sensing the target and homes onto it.  Homing becomes easy when the target emits either electrical or thermal radiation.  In a missile guidance system, missile guidance is achieved by a computer mounted on the missile.  The mounted computer computes the deviation from the required trajectory and effects track changes of the missile to guide it onto the target.  The time constraint on the computer-based guidance system is that the sensing and the track correction tasks must be activated frequently enough to keep the missile from diverging from the target.  The target sensing and track correction tasks are typically required to  be  completed  within  a few  hundreds  of  microseconds  or  even  lesser  time  depending  on  the  speed  of  the missile and the type of the target. 

Miscellaneous  Applications

Besides the areas of applications already discussed, real-time systems have found numerous other applications in our every day life.  An example of such an application is a railway reservation system. 

Example 12: Railway Reservation System 

In a railway reservation system, a central repository maintains the up-to-date data on booking status of various trains.  Ticket booking counters are distributed across different geographic locations.  Customers queue up at different booking counters and submit their reservation requests. After a reservation request is made at a counter, it normally takes only a few seconds for the system to confirm the reservation and print the ticket.

A real-time constraint in this application is that once a request is made to the computer, it must print the ticket or display the seat unavailability message before the average human response time (about 20 seconds) expires, so that the customers do not notice any delay and get a feeling of having obtained instant results. However, as we discuss a little later (in Section 1.6), this application is an example of a category of applications that is in some aspects different from the other discussed applications. For example, even if the results are produced just after 20 seconds, nothing untoward is going to happen - this may not be the case with the other discussed applications. 

The document Introduction to Real Time Systems - 1 | Embedded Systems (Web) - Computer Science Engineering (CSE) is a part of the Computer Science Engineering (CSE) Course Embedded Systems (Web).
All you need of Computer Science Engineering (CSE) at this link: Computer Science Engineering (CSE)
47 videos|69 docs|65 tests

Top Courses for Computer Science Engineering (CSE)

FAQs on Introduction to Real Time Systems - 1 - Embedded Systems (Web) - Computer Science Engineering (CSE)

1. What is a real-time system?
A real-time system is a computer system that is designed to respond and process data in a time-constrained manner. It is characterized by its ability to provide timely and predictable responses to events or inputs within a specific timeframe. This is crucial in applications where time is critical, such as in industrial control systems, medical devices, and aerospace systems.
2. What are the different types of real-time systems?
There are two main types of real-time systems: hard real-time systems and soft real-time systems. Hard real-time systems have strict timing constraints, where missing a deadline can result in catastrophic consequences. Examples include air traffic control systems and pacemaker devices. Soft real-time systems have timing constraints, but missing a deadline does not have severe consequences. Examples include multimedia streaming and online gaming.
3. What are some challenges in developing real-time systems?
Developing real-time systems comes with its set of challenges, such as: - Predictability: Ensuring that the system can consistently meet its timing constraints. - Scheduling: Properly allocating system resources to tasks to meet deadlines. - Verification and Validation: Ensuring that the system operates correctly and reliably under different scenarios. - Fault Tolerance: Handling failures and recovering from them to maintain system integrity. - Performance Optimization: Balancing the system's computational and communication resources to achieve optimal performance.
4. How does a real-time operating system (RTOS) differ from a general-purpose operating system?
A real-time operating system (RTOS) is specifically designed for real-time systems, prioritizing time-critical tasks and providing deterministic behavior. In contrast, a general-purpose operating system (GPOS) is designed to handle a wide range of applications and focuses more on resource sharing and multitasking. RTOS prioritizes tasks based on their deadlines and provides mechanisms for task scheduling, synchronization, and communication that are optimized for real-time requirements. GPOS, on the other hand, may not guarantee timely execution of tasks and may have higher latencies due to its focus on providing a flexible and general-purpose environment.
5. What are some examples of real-time systems in everyday life?
Real-time systems are present in various aspects of our daily lives, including: - Traffic light control systems: These systems must respond to changing traffic conditions in real-time to ensure smooth traffic flow and safety. - Smart home automation systems: These systems process sensor inputs and control devices, such as lighting and temperature, to adapt to the user's preferences in real-time. - Electronic payment systems: When making a payment using a credit card or mobile device, the system must process the transaction in real-time to authorize the payment and update the account balance. - Online reservation systems: Systems used for booking flights, hotels, or concert tickets need to process requests and provide immediate responses to ensure availability and confirmations in real-time. - Medical monitoring devices: Devices like heart rate monitors or insulin pumps need to continuously monitor and respond to the patient's vital signs or insulin levels in real-time to ensure appropriate actions are taken.
47 videos|69 docs|65 tests
Download as PDF
Explore Courses for Computer Science Engineering (CSE) exam

Top Courses for Computer Science Engineering (CSE)

Signup for Free!
Signup to see your scores go up within 7 days! Learn & Practice with 1000+ FREE Notes, Videos & Tests.
10M+ students study on EduRev
Related Searches

Sample Paper

,

past year papers

,

ppt

,

Introduction to Real Time Systems - 1 | Embedded Systems (Web) - Computer Science Engineering (CSE)

,

Important questions

,

Introduction to Real Time Systems - 1 | Embedded Systems (Web) - Computer Science Engineering (CSE)

,

Exam

,

practice quizzes

,

Objective type Questions

,

Semester Notes

,

video lectures

,

Free

,

shortcuts and tricks

,

mock tests for examination

,

study material

,

pdf

,

Previous Year Questions with Solutions

,

Summary

,

Extra Questions

,

Introduction to Real Time Systems - 1 | Embedded Systems (Web) - Computer Science Engineering (CSE)

,

MCQs

,

Viva Questions

;