REAL TIME

ABSTRACT

A real-time operating system (RTOS) is an • Media playback operating system (OS) intended for real-time • Scientific visualization applications . Such operating systems serve • Games application requests nearly real-time. A real- • Interactive applications time operating system offers programmers more Distributed real-time systems are those which have control over priorities. Real time means multiple resources with non-negligible latency among immediate response from the computer. Thus them. Examples include the multiple processors in a a system in which a transaction that we access car, or media being streamed and update a file quickly enough to affect original decision making is called a real time The term real-time derives from its use in early operating system. A real time operating system simulation. While current usage implies that a has well defined time constraints. computation that is 'fast enough' is real-time, originally it referred to a simulation that proceeded at a rate that matched that of the real process it was INTRODUCTION simulating. Analog computer especially, were often capable of simulating much faster than real-time, a An operating system (OS) is a software , consisting situation that could be just as dangerous as a slow of programs and data that runs on computers and simulation if it were not also recognized and manages the computer hardware and provides accounted for. common services for efficient execution of various application software.A good operating system (OS) Hard and soft real-time systems provides a solid interface to the hardware and allows A system is said to be ''real-time'' if the total the application to be managed in the most efficient correctness of an operation depends not only upon its manner possible. logical correctness, but also upon the time in which it is performed. The classical conception is that in a Real-time operating systems are software/hardware '''hard real-time''' or '''immediate real-time system''', systems in which timing the completion of an operation after its deadline is constraints must be met for correctness. “Real-time” considered useless - ultimately, this may cause a does not mean “really fast”, but rather “get this done critical failure of the complete system. A '''soft real- by the deadline or else you have failed.” Such hard time system''' on the other hand will tolerate such real-time systems are ubquitous and vital in a range lateness, and may respond with decreased service of places from everyday life to quality (e.g., omitting frames while displaying a estoteria: video). • The ignition, fuel injection, and timing of most car engines is handled by a real-time system. Hard real-time systems are used when it is imperative • The antilock brake system in most cars is a real-time that an event is reacted to within a strict deadline. system. Such strong guarantees are required of systems for . which not reacting in a certain interval of time would • The software of the Mars Rovers is architected cause great loss in some manner, especially damaging around VxWorks, a commercial real-time operating the surroundings physically or threatening human system.Most hard real-time systems are embedded lives (although the strict definition is simply that systems, meaning the software is missing the deadline constitutes failure of the system). codesigned with the hardware, under often severe cost For example, a [automobile|car] [engine] control constraints, to accomplish a specific task. The user system is a hard real-time system because a delayed doesn't see the system as a general purpose computer. signal may cause engine failure or damage. Other examples of hard real-time embedded systems include Soft real-time systems are penalized by how much medical systems such as heart[artificial pacemaker| they miss the desired deadlines and by the variance of pacemaker] and industrial process controllers. Hard their latency. Such systems show up in many familiar real-time systems are typically found interacting at a places in general purpose computers, or should: low level with physical hardware, in [[embedded system]]s. Early video game systems such as the Windows operating system. Components installed on [[Atari 2600]] and [[Cinematronics]] vector graphics Windows include a Windows kernel driver and a had hard real-time requirements because of the nature number of Windows services. The driver manages of the graphics and timing hardware. memory for the kernel and real-time applications to run in, and manages the communications Soft real-time systems are typically used where there interface between the two systems. is some issue of concurrent access and the need to keep a number of connected systems up to date with changing situations; for example software that A Windows service loads the real-time kernel into the maintains and updates the flight plans for commercial allocated memory and then causes a [[airline]]rs. The flight plans must be kept reasonably from Windows to the INtime kernel. A low-priority current but can operate to a latency of seconds. is created whose function is to switch the machine context back to the Windows system. Because this thread will be preempted by all other real-time threads, as far as the real-time kernel is RECENT WORK IN FIELD concerned, the Windows system is the real-time system's idle task. The 31st IEEE Real-Time Systems Symposium (RTSS) in San Diego, California, will follow the When in the INtime context, any real-time format of recent RTSSs, with multiple tracks. RTSS is are handled directly, and all other interrupts are the premier conference in the area of real-time masked at the controller. When the context computing, presenting innovations in the field with returns to Windows, these interrupts are unmasked to respect to theory and practice. allow normal processing by Windows. When a real- time interrupt occurs in the Windows context, the RTSS provides a forum for the presentation of high- Windows IDT is patched so as to cause a context quality, original research covering all aspects of real- switch to the INtime context so the interrupts may be time systems design, analysis, implementation, handled. evaluation, and experiences. RTSS’10 continues the trend of making RTSS an expansive and inclusive The system timer is usually shared between Windows symposium, looking to embrace new and emerging and INtime. The hardware timer is reprogrammed to areas of real-time systems research. interrupt at a higher rate than Windows requires, and the Windows handler is only invoked as required. RTSS’10 welcomes the submission of mature papers Typically, the INtime kernel takes timer interrupts at a in several areas of real-time computing, including but much higher rate (a period as low as 100µs is not limited to scheduling; databases; observability; possible) to allow for finer granularity timing services. composability; security for real-time systems; tools Optimization of the timer handling avoids and reduction to practice; control and adaptive RT unnecessary context switches between Windows and systems theory; testing and debugging; modeling; INtime. formal methods; communications (wireless, wireline, and sensor networks); power, thermal, and energy Certain layer (HAL) entry points management; embedded systems; sensor and are intercepted and monitored in order to prevent the implantable devices; robustness; fault tolerance and Windows kernel from performing unwanted actions robustness; intelligent behavior; time-sensitive such as masking a real-time interrupt, or changing the robotics; emergency/disaster management; embedded hardware system timer frequency. The HAL file is not real-time systems and infrastructures; QoS support; modified or replaced by the software. real-time systems middleware, and cyber-physical systems.

SCOPE FOR THE RESEARCH

WORK RELATED DATA

INtime is implemented as a real-time operating system which shares the hardware platform with the The INtime kernel provides operating system services links are supported through Serial Line Internet for the real-time virtual machine. It provides the real- Protocol (SLIP). time services expected of such a kernel, consisting of a priority-based preemptive scheduler with priority- USB support is provided as a development kit for based interrupt handling. Thread priorities range from developing USB client software. Standard drivers are 0 (highest priority) to 255 (lowest priority) and provided for Universal Host Controller (UHCI), Open threads below a configurable priority threshold can Host Controller (OHCI), and Enhanced Host time-slice with threads of equal priority. The kernel Controller (EHCI) interfaces. scheduler has been optimized for maximum interrupt performance. Other drivers are provided for a range of standard and industrial interface.

The resulting platform exhibits good performance, and above all its behavior is predictable.

Win32 API

Win32 API lacks some useful features for real-time programming, INtime provides a Win32 API for ease of transporting code from Windows applications. This implementation is a rich subset of the Windows CE Win32 implementation, including a useful subset of Win32 objects, WaitForMultipleObjects, and with extensions to manage interrupts and Peripheral Component Interconnect (PCI) bus configuration

Windows PRESENTATION WORK APIs are provided for Windows applications to allow them to share objects created on the real-time kernel. queue to have a greater number of overall tasks in the Both standard real-time objects and Win32 objects are ready to be executed state Usually the data structure shareable so that Windows and real-time applications of the ready list in the scheduler is designed to may synchronize and share data. Blocking calls are minimize the worst-case length of time spent in the handled by a pool of proxy threads on the real-time scheduler's critical section, during which kernel. REAL TIME SCHEDULING

C Library and C++ Support In typical designs, a task has three states: 1) running (executing on the CPU), 2) ready (ready to be Embedded C++) ANSI standard, with the Standard executed), 3) blocked (waiting for input/output). Most Template Library (STL). INtime provides an tasks are blocked or ready most of the time because American National Standard Institute (ANSI- generally only one task can run at a time per CPU. compatible) C library, and support for the EC++ ( The number of items in the ready queue can greatly vary, depending on the number of tasks the system Other Services needs to perform and the type of scheduler that the system uses. On simpler non-preemptive but still A Transmission Control Protocol/Internet Protocol multitasking systems, a task has to give up its time on (TCP/IP) stack is provided which is derived from the the CPU to other tasks, which can cause the ready is BSD Net3 architecture. Ethernet drivers are provided inhibited, and, in some cases, all interrupts are for Intel, 3Com, and Realtek interface adapters, as disabled. But the choice of data structure depends also well as for NE2000-compatible ISA interfaces. Serial on the maximum number of tasks that can be on the ready list. If there are never more than a few tasks on the ready CONCLUSION list, then a doubly linked list of ready tasks is likely optimal. If the ready list usually contains only a few If users have at their disposal a DO-178B Level A tasks but occasionally contains more, then the list certifiable system, most of the work for a high- should be sorted by priority. That way, finding the assurance OS is already done. The NSA and highest priority task to run does not require iterating embedded-OS industry consensus is that most of the through the entire list. Inserting a task then requires work will be in formal methods necessary to achieve walking the ready list until reaching either the end of an EAL 7 rating, provided that the kernel is kept the list, or a task of lower priority than that of the task small and only provides the minimal functionality to being inserted. support information flow and data isolation. LynuxWorks' own research has show that a working Care must be taken not to inhibit preemption during prototype system with the separation kernel to this search. Longer critical sections should be divided demonstrate functionality. An external agency will be into small pieces. If an interrupt occurs that makes a used to achieve formal methods certification to EAL high priority task ready during the insertion of a low 7. priority task, that high priority task can be inserted LynuxWorks is pioneering in this technology. and run immediately before the low priority task is Currently, LynuxWorks offers an RTOS that is inserted. certified by the FAA to the DO-178B Level A standard. As mentioned above, this product The critical response time, sometimes called the (LynxOS-178 ) can be easily certified to the flyback time, is the time it takes to queue a new ready Common Criteria EAL [4]. LynuxWorks is building task and restore the state of the highest priority task to on this technology to be able to deliver a real_time running. In a well-designed RTOS, readying a new operating system certifiable to the Common task will take 3 to 20 instructions per ready-queue Criteria EAL 7. entry, and restoration of the highest-priority ready task will take 5 to 30 instructions. REFERENCES In more advanced systems, real-time tasks share computing resources with many non-real-time tasks, Mark Vanfleet, "MASK Mathematically Assured and the ready list can be arbitrarily long. In such Separation Kernel, Separation Kernel Paradigm", systems, a scheduler ready list implemented as a NSA linked list would be inadequate. RTCA. DO-178B/ED-12B. Software Considerations in Airborne Systems and Equipment Certification. RTCA, 1992 Algorithms J. Alves-Foss, C. Taylor, and B. Rinker. "Merging Safety and Assurance: The Process of Dual Some commonly used RTOS scheduling algorithms Certification for Software", 2002, are: http://www.csds.uidaho.edu/papers/Taylor02d .pdf . • Cooperative scheduling NIST. Common Criteria for W Information Security • Preemptive scheduling Evaluation. Parts 1, 2, 3, 1999. • Round-robin scheduling • Fixed priority pre-emptive scheduling , an YOUR CONTRIBUTION implementation of preemptive time slicing Fixed-Priority Scheduling with Deferred My experience was very good in using REAl TIME Preemption OPERATING SYSTEM.I found is to be very • Fixed-Priority Non-preemptive Scheduling powerful,robust and strong real-time,and explain to Critical section preemptive scheduling others. • Static time scheduling • Earliest Deadline First approach

• Non-Preemptive: Non-preemptive algorithms are designed so that once a process enters the running state(is allowed a process), it is not removed from the processor until it has completed its service time ( or it explicitly yields the processor). • context_switch() is called only when the process terminates or blocks. • Preemptive: Preemptive algorithms are driven by the notion of prioritized computation. The process with the highest priority should always be the one currently using the processor. If a process is currently using the processor and a new process with a higher priority enters, the ready list, the process on the processor should be removed and returned to the ready list until it is once again the highest-priority process in the system • context_switch() is called even when the process is running usually done via a timer interrupt

• contribution

This paper presents and discusses a special case of RTPS in which the state variable changes following an exponential behavior. The goal is to schedule resources using traditional real-time scheduling algorithms while achieving some given constraints on the state variable. In particular, we provide results regarding the working range of the state variable, i.e., we are interested in bounding the physical value within a given range. For this purpose, we relate real-time parameters of scheduled resources to the bounds of the working range. Despite we focus on a specific RTPS, the proposed model and results are general enough to model several real physical systems. In fact, the exponential behavior of the proposed RTPS arises froma modelization based on affine time-invariant dynamic systems, which can describemany existing physical systems. For this purpose, a differential equation is associated to each real-time resource which determine the physical value behavior. [1] R. Braden. D. and Clack. S. Shenker, "Integrated Service in the internet Architecture: an Overview,"RFC 1633. June 1994 [2] Paul P. Write. "RSVP and Integrated Services in the internet: A Tutorial," IEEE Communications Area in Comm. Vol. 9. No. 9. pp. 1524- Magazine. pp.100-106. May. 1997. [3] W.T.Chen. and C. F. Huang. and S. C. Ding."A Scheme for QoS Control in ATM Switching Systems," J. of High Speed Networks. pp.221-236. June. 1997.. [4] A. Y. M Lin. and J. A. Silvester. "Priority Queueing Strategies and Buffer Allocation Protocols for Traffic Control at an ATM Integrated Broad-band Switching System," IEEE J. on Sel.1536. Dec.1991. [5] L. Li. C. Hu. and P. Liu. "Maximum Throughput of an Input Queueing Packet Switch with Two Priority Classes," IEEE Trans. on Comm. Vol. 42. No. 12. pp.3095- 3097. Dec. 1994 [6] K.W.Ross and E.biersack. "Topology Centric Lookup Service," 5th. Int. Workshop Network Group Communications, NGC. 2003. [7] T.Takine. and B. Sengupta. T. Hasegawa. "An Analysis of a Discrete-Time Queue for Broadband ISDN with Priorities among Trafic Classes," IEEE Trans. on Comm. Vol. 42. No. 2. pp. 1837-1845.Feb. 1994 [8] I. Stavrakakis, "Delay Bounds on a Queueing System with Consistent Priorities." IEEE Trans. On Comm Vol. 42. No. 2/3/4, pp.615-624.Feb./Mar./Apr. 1994 [9] S. Keshav. REAL 5.0 Overview. http://www.cs.cornell.edu/skeshav/real/overview.html [10] J.F. Kurose and K.W. Ross, Computer Networking, Addison Wesley, 2009. Contribution:This paper presents and discusses a special case of RTPS(REAL TIME POLLING SERVICE) in which the state variable changes following an exponential behavior. Despite we focus on a specific RTPS, the proposed model and results are general enough to model several real physical systems. In fact, the exponential behavior of the proposed RTPS arises froma modelization based on affine time-invariant dynamic For this purpose differential equation is associated to each real-time resource which determine the physical value behavior. systems, wh provides common services for efficient execution of various application software.A good operating system (OS) provides a solid interface to the hardware and allows the application to be managed in the most efficient manner possible. A real-time operating system (RTOS) is an operating system (OS) intended for real-time applications . Such operating systems serve application requests nearly real-time. A real-time operating system offers programmers more control over process priorities. Real time means immediate response from the computer. Thus a system in which a transaction that we access and update a file quickly enough to affect original decision making is called a real time operating system. A real time operating system has well defined time constraints. A real-time system is one in which time plays an essential role.Typically, one or more physical devices external to the generate stimuli,and the computer must react appropriately to them within a fixed amount of time. For example, the computer in a compact disc player gets the bits as they come off the drive and must convert them into music within a very tight time interval.If the calculation takes too long, the music will sound peculiar.Other real-time systems are patient monitoring in a hospital intensive care unit,the autopilot in an aircraft, and robot control in an automated factory.In all these cases, having the right answer but having it too late is often just as bad as not having it at all.

• Real-time systems are generally categorized as hard real time,meaning there are absolute deadlines that must be met,or else ,soft real time,meaning that missing an occasional deadline is undesirable,but nevertheless tolerable.The events a real-time system may have to respond to can be further categorized as periodic(occurring at regular intervals) or aperiodic ich can describe many existing