Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

REAL TIME SYSTEM.docx

...Read more
QUESTIONS & ANSWERS 1. How do you define a Real Time System? Any system in which the time at which output is produced is significant. This is usually because the input corresponds to some movement in the physical world, and the output has to relate to that same movement. The lag from input time to output time must be sufficiently small to be of acceptable timeliness. A real-time system is any information processing system which has to respond to externally generated input stimuli within a finite and specified period of time. The correctness of a real-time system depends not only upon the logical result of the computation, but also on the time at which the results are produced. A system in which the time where the outputs are produced is significant. A software system where the correct functioning of the system depends on the results produced by the system and the time at which these results are produced. A system can give response with some event in a time with yield accurate Inner event – some events happened in system such as interrupt process Outer event – Some events happen at out of system such as signal from temperature detector Duration – Follow the requirement and some application 2. When a system is a real time?
When any information processing activity or system which has to respond to externally generated input stimuli within a finite and specified period. The term is used to describe a number of different computer features. For example, real-time operating systems are systems that respond to input immediately. They are used for such tasks as navigation, in which the computer must react to a steady flow of new information without interruption. Most general-purpose operating systems are not real-time because they can take a few seconds, or even minutes, to react. Real time can also refer to events simulated by a computer at the same speed that they would occur in real life. In graphics animation, for example, a real-time program would display objects moving across the screen at the same speed that they would actually move. 3. Briefly describe the design issues in real time system. Designing Real-time systems is a challenging task. Most of the challenge comes from the fact that Real-time systems have to interact with real world entities. These interactions can get fairly complex. A typical Real-time system might be interacting with thousands of such entities at the same time. For example, a telephone switching system routinely handles calls from tens of thousands of subscriber. The system has to connect each call differently. Also, the exact sequence of events in the call might vary a lot. Real-time Response Real-time systems have to respond to external interactions in a predetermined amount of time. Successful completion of an operation depends upon the correct and timely operation of the system. Design the hardware and the software in the system to meet the Real-time requirements. Recovering from Failures
QUESTIONS & ANSWERS How do you define a Real Time System? Any system in which the time at which output is produced is significant. This is usually because the input corresponds to some movement in the physical world, and the output has to relate to that same movement. The lag from input time to output time must be sufficiently small to be of acceptable timeliness. A real-time system is any information processing system which has to respond to externally generated input stimuli within a finite and specified period of time. The correctness of a real-time system depends not only upon the logical result of the computation, but also on the time at which the results are produced. A system in which the time where the outputs are produced is significant. A software system where the correct functioning of the system depends on the results produced by the system and the time at which these results are produced. A system can give response with some event in a time with yield accurate Inner event – some events happened in system such as interrupt process Outer event – Some events happen at out of system such as signal from temperature detector Duration – Follow the requirement and some application When a system is a real time? When any information processing activity or system which has to respond to externally generated input stimuli within a finite and specified period. The term is used to describe a number of different computer features. For example, real-time operating systems are systems that respond to input immediately. They are used for such tasks as navigation, in which the computer must react to a steady flow of new information without interruption. Most general-purpose operating systems are not real-time because they can take a few seconds, or even minutes, to react. Real time can also refer to events simulated by a computer at the same speed that they would occur in real life. In graphics animation, for example, a real-time program would display objects moving across the screen at the same speed that they would actually move. Briefly describe the design issues in real time system. Designing Real-time systems is a challenging task. Most of the challenge comes from the fact that Real-time systems have to interact with real world entities. These interactions can get fairly complex. A typical Real-time system might be interacting with thousands of such entities at the same time. For example, a telephone switching system routinely handles calls from tens of thousands of subscriber. The system has to connect each call differently. Also, the exact sequence of events in the call might vary a lot. Real-time Response Real-time systems have to respond to external interactions in a predetermined amount of time. Successful completion of an operation depends upon the correct and timely operation of the system. Design the hardware and the software in the system to meet the Real-time requirements. Recovering from Failures Real-time systems must function reliably in event of failures. These failures can be internal as well as external. The following sections discuss the issues involved in handling these failures. Working with Distributed Architectures Most Real time systems involve processing on several different nodes. The system itself distributes the processing load among several processors. This introduces several challenges in design: Maintaining Consistency Initializing the System Inter-Processor Interfaces Load Distribution Centralized Resource Allocation Asynchronous Communication Remote procedure calls (RPC) are used in computer systems to simplify software design. RPC allows a programmer to call procedures on a remote machine with the same semantics as local procedure calls. RPCs really simplify the design and development of conventional systems, but they are of very limited use in Real time systems. The main reason is that most communication in the real world is asynchronous in nature, i.e. very few message interactions can be classified into the query response paradigm that works so well using RPCs. Race Conditions and Timing It is said that the three most important things in Real time system design are timing, timing and timing. A brief look at any protocol will underscore the importance of timing. All the steps in a protocol are described with exact timing specification for each stage. Most protocols will also specify how the timing should vary with increasing load. Real time systems deal with timing issues by using timers. Timers are started to monitor the progress of events. If the expected event takes place, the timer is stopped. If the expected event does not take place, the timer will timeout and recovery action will be triggered. Apply the round robin scheduling algorithm for the following data and find the turn around time and average turn around time.{time slice = 2 } (refer to table 4.1) Jobs Time Arrived Duration A 0 10 B 2 8 C 1 6 D 3 12 E 4 5 Table 4.1 Jobs Time Arrived Duration Time Left Time Left Time Left Time Left Time Left Time Left A 0 10 8 6 4 2 0 0 B 2 8 6 4 2 0 0 0 C 1 6 4 2 0 0 0 0 D 3 12 10 8 6 4 2 0 E 4 5 3 1 0 0 0 0 Job A Job B Job C Job D Job E 0 2 4 6 8 10 Job A Job B Job C Job D Job E 10 12 14 16 18 20 Job A Job B Job C Job D Job E 20 22 24 26 28 29 Job A Job B Job D 29 31 33 35 Job A Job D Job D 35 37 39 41 Turnaround time for A = 37 – 0 = 37 Turnaround time for B = 33 – 2 = 31 Turnaround time for C = 26 – 1 = 25 Turnaround time for D = 41 – 3 = 38 Turnaround time for E = 29 – 4 = 25 Average turnaround time = (37 + 31 + 25 + 38 + 25) / 5 = 31.2 What is polling? And why is it considered important in RTS? Justify your answer. Polling is the process where the computer or controlling device waits for an external device to check for its readiness or state, often with low-level hardware. For example, when a printer is connected via a parallel port, the computer waits until the printer has received the next character. These processes can be as minute as only reading one bit. Polling is sometimes used synonymously with busy-wait polling. In this situation, when an I/O operation is required, the computer does nothing other than check the status of the I/O device until it is ready, at which point the device is accessed. In other words, the computer waits until the device is ready. Polling also refers to the situation where a device is repeatedly checked for readiness, and if it is not, the computer returns to a different task. Although not as wasteful of CPU cycles as busy waiting, this is generally not as efficient as the alternative to polling, interrupt-driven I/O. In a simple single-purpose system, even busy-wait is perfectly appropriate if no action is possible until the I/O access, but more often than not this was traditionally a consequence of simple hardware or non-multitasking operating systems. Polling is often intimately involved with very low-level hardware. For example, polling a parallel printer port to check whether it is ready for another character involves examining as little as one bit of a byte. That bit represents, at the time of reading, whether a single wire in the printer cable is at low or high voltage. The I/O instruction that reads this byte directly transfers the voltage state of eight real world wires to the eight circuits (flip flops) that make up one byte of a CPU register. Polling has the disadvantage that if there are too many devices to check, the time required to poll them can exceed the time available to service the I/O device.