1 A Survey Of Real-Time Operating Systems

3y ago
93 Views
4 Downloads
237.37 KB
8 Pages
Last View : 8d ago
Last Download : 3m ago
Upload by : Raelyn Goode
Transcription

1A Survey of Real-Time Operating SystemsAnthony Serino, Member, IEEE, Liang Cheng Senior Member, IEEEAbstract—The paper is a literature survey of RTOS (Real-Time Operating System) development. GPOS (General Purpose OperatingSystem) existed before RTOS but did not meet performance requirements for time sensitive systems. Many GPOS have put forwardadaptations to meet the requirements of real-time performance, and this paper compares RTOS and GPOS and shows their pros andcons. Furthermore, comparisons among select RTOS such as VxWorks, RTLinux, and FreeRTOS have been conducted in terms ofscheduling, kernel, and priority inversion. Various tools for WCET (Worst-Case Execution Time) estimation are discussed. This paperalso presents a use case of RTOS, i.e. JetOS, and future advancements such as multi-core RTOS, new RTOS architecture and RTOSsecurity.Index Terms—Real-time operating system, General purpose operating system, RTLinux, FreeRTOS, VxWorks, multi-core RTOS.F1I NTRODUCTIONRTOS (Real-Time Operating System) is used in a widerange of industrial systems, such as process control systems, avionics, and nuclear power plants. Most real-timeoperating systems run on embedded systems consisting ofpieces of hardware that work as controllers with dedicatedfunctions within mechanical or electronic systems. RTOS iscritical for those mechanical or electronic systems with realtime requirements because systems could not operate safelywithout it. In many real-time systems a missed deadline canlead to disastrous consequences.1.1Hard Real Time vs. Soft Real TimeHard real time systems and soft real time systems areboth used in industry for different tasks [15]. The primarydifference between hard real time systems and soft real timesystems is that their consequences of missing a deadline differ from each other. For instance, performance (e.g. stability)of a hard real time system such as an avionic control systemor a nuclear power plant, is dependent on the timelinessof the operation results and the correctness of the results.However, for soft real time systems such as a multimediaon-demand system, their performance is solely dependenton the results. A hard real time system is used in systemsthat are time sensitive and must meet their deadlines inorder to avoid disaster. However, deadlines in soft real timesystem are less strict so that if they miss their deadlines itdoes not result in disaster. Part of this is because hard realtime systems do not have an easy way to recover from afailure; where as a soft real time system can be time-elastic.Some of the advantages of a hard real time system is thatit has a faster reaction time than soft real time systems. Thehard real time system also has predefined deadlines andpredictable performance, where the soft real time systemsmay experience degraded performance. A. Serino was with a REU program hosted by the Department ofComputer science and engineering at Lehigh University.E-mail: serinot@yahoo.comL. Cheng is with the Department of Computer science and engineering atLehigh University. E-mail: cheng@lehigh.eduThis survey of RTOS covers related technologies andgives an introduction of them. It also includes select topicsincluding new adaptations on solving priority inversion, anewly purposed platform for WCET (worst-case executiontime) tool development, and a RTOS that supports multicore processing.This paper starts with a comparison between GPOS andRTOS, and their advantages and disadvantages for generalcomputing and for real-time systems. Section 2 discussesdifferent techniques used to handle task scheduling andsolve priority inversion. Section 3 provides a comparisonbetween three RTOS implementations, namely VxWorks,RTLinux, and FreeRTOS. This comparison covers kernelsof the operating systems, schedulers used, and how theysolve priority inversion. The next section discusses WCETanalysis tools used today in industry along with the development on a new platform to build and compare these tools.Section 5 provides a use case of a recently developed RTOS,i.e. JetOS in avionics. The final section of this paper discusses future developments of RTOS systems ranging froma multi-core RTOS (HIPPEROS) to a new RTOS platform(HERCULES).2GPOS VS RTOSA general comparison between RTOS and GPOS is providedbelow to show the advantages and weaknesses of theseoperating systems when used for real time system applications.2.1Task SchedulingThe first part of differences is the way where GPOS andRTOS perform their task scheduling. Generally speaking,a GPOS utilizes a fairness policy that allows all processesto share the processor. This hinders the GPOS ability tohandle time sensitive tasks because it cannot guaranteetask dispatch latencies. The RTOS uses a priority basedpreemptive scheduling system. This enables a high prioritytask to take the processor from a lower priority task, andallows the high priority task to run without interruption.

2The RTOS also utilizes every resource at its disposal to getpeak performance.2.1.1 Scheduling techniquesRound robin scheduling. This form of scheduling uses processor time sharing and gives every process with the samepriority a set of time slices [4] [5], each of which correspondsto a fixed amount of processor or CPU time. When a processuses up a CPU time slice the scheduler forces it out of theCPU so that it takes turns to use the CPU resource with otherprocesses. This scheduling technique may lead to relativelylarge overhead of context switching.Figure 3. Rate-monotonic SchedulingEarliest-deadline-first (EDF) scheduling. This schedulingmethod computes the priority of processes dynamicallybased on their arrival time and the execution requirementsand deadlines so that it schedules the task with the earliestdeadline first [4] [5]. EDF scheduler is more capable ofmaking all deadlines to be met when system load is highcomparing to rate-monotonic scheduling [4] [5].Figure 1. Round-robin SchedulingFirst-in-first-out (FIFO) scheduling. The FIFO schedulerwill try to execute the task with the highest priority first,but when the processes have the same priority they arescheduled in the order of their arrivals. The first task therewill run to completion before starting the next one, or untila higher priority task takes the processor [4] [5].Figure 2. FIFO SchedulingRate-monotonic scheduling. This scheduling method isa static-priority algorithm that sets the priority level foreach task in the order of their period information. Shortperiod tasks execute frequently, and a long period refersto infrequent execution. Short period tasks are given higherpriorities while long period ones are given low priorities.This lets high priority tasks run first, and it is best usedwhen there are well defined periodic tasks with the sameCPU run time length [4] [5].Figure 4. EDF Scheduling2.1.2 KernelGenerally the GPOS does not support preemption. Preemption is when processes and threads with higher priorities cantake the processor from lower priority tasks. By not allowingpreemption the GPOS suffers when trying to complete atask that is time sensitive as it can make the task waitand thus miss its deadline. The GPOS is unable to cancelsystem calls even if they are from a lower priority task andcreate unpredictable delays. The advantages of its kernelare in its support for widely used application programminginterfaces (APIs) and customizable operating system components for application-specific demands.The RTOS fully supports preemption where it imposesan upper bound on how long the preemption has its interrupts disabled. This allows a high priority task to run tocompletion without interruption and thus let time sensitivetasks meet their deadlines. The kernel of a RTOS try to usethe least amount of resources possible. To keep it simpleonly services with short execution paths are allowed in thekernel, and its process loading happens outside along withits file systems. This architecture makes it so that if one ofthese systems fails it does not corrupt other services or thekernel. The benefit of the RTOS kernel is that there is only a

3small core of fundamental operating system services in thekernel. These fundamental services are signal, timers, andthe scheduler [14].2.2Priority InversionPriority inversion occurs when two tasks of differentpriorities share a resource and the higher priority taskcannot get the resource from the lower priority task. Thisis an issue for time sensitive tasks as it can prevent it frommeeting its deadline by forcing it to wait for a resource.This needs to be fixed as it can result at best in blocking, butcan also result in chain blocking or worse a full deadlock.There are a couple of protocols to solve priority inversion.2.2.1 Priority inheritanceThe priority inheritance protocol is where if a higherpriority process is waiting for a lower priority processfor a resource the process scheduling algorithm gives ahigher/highest priority to the lower priority task on theprocessor so that it cannot be preempted by a different taskuntil it completes the execution of its critical section. Forexample, there is a process A on the processor of priority2 and there is a higher priority process B that could notpreempt it at priority 7. The process scheduling algorithmwould assign process A priority 9 temporarily so that itfinishes its critical section on the processor without beinginterrupted by other processes which would delay processB further. This allows process B to get access to the resourceas fast as possible, and once the resource is freed by processA the process scheduling algorithm reverts process A backto its original priority of 2 [2].2.2.2 Priority ceilingThe priority ceiling is where each resource is assigned apriority ceiling where the priority is equal to the highestpriority of any task which may lock the resource. Thisworks by temporarily raising the priority of tasks in certainsituations. Basically if process A tries to preempt the criticalsection of another process to execute in its own criticalsection Z; then the priority of the new section should behigher than the priority of inherited properties of all thepreempted sections. If this fails then process A is deniedentry into the critical section and is suspended [2].2.2.3 Other priority inversion solutionsPriority remapping. As an improvement to the priority inheritance protocol, the priority remapping method expandsthe highest priority from 64 to 128 without change its interface. This means that users still only see 64 priorities, but itsinternal task creation is multiplied by 2. Its internal priorityis extended to (0,2,4,.,126,128) even priority, where theodd priorities are left for changing when priority inversionhappens.Priority exchange. This method is also an improvementon priority inheritance protocol. It swaps the tasks prioritieswhen a higher priority task is blocked by a lower prioritytask. The priorities will be swapped back after the criticalsection finishes running the lower priority task [3].2.3Modified GPOSA modified GPOS is the result produced by people whohave tried to adapt and change GPOS to have the samecapabilities of both GPOS and RTOS. It has a major advantage in that if it works like a GPOS it can be usedmore widely for a greater amount of tasks, and if it hasthe capabilities of an RTOS then it supports tasks for timecritical systems. For example, Linux 2.6 added preemption[11]. Generally when a GPOS is directly modified to supportRTOS functionality high-resolution timers will be used. Thismodification enables the process scheduler to make thesystem more reactive and event-driven. However, Linux 2.6is not as fast as other RTOS and the low latency patches forthe GPOS timers do not solve the priority inversion issue[14].Another way people have tried to improve GPOS is byintroducing a new architecture called dueling kernels wherethe GPOS is ran on top of an RTOS [14]. This architecturesends real time tasks to run on the RTOS, with a higherpriority than other tasks running on the GPOS. The RTOSgives these tasks the ability to preempt the tasks on GPOS,and then gives the CPU back to the GPOS when it finishesrunning the high priority tasks. This system has an issuewhere the tasks running on the RTOS have limited use ofthe GPOS services due to preemption issues. This causesRTOS to recreate services that exist in the GPOS. RTOS tasksalso cannot use the memory management unit which is usedby the GPOS for non-realtime processes. GPOS services thatare ported often have different vendor extensions that donot work with other vendor’s extensions.3V X W ORKS , F REE RTOS, RTL INUXThe RTOS chosen for comparisons in this paper are some ofthe industries’ top competing RTOS. VxWorks and RTLinuxhave been extensively compared to each other throughresearch due to the continuing development on both thecommercially available VxWorks and the free RTLinux.FreeRTOS being a more recent RTOS compared to VxWorksand RTLinux has seen little comparisons with either VxWorks or RTLinux directly. Important aspects to comparethem include their kernels, schedulers, and how they handlepriority inversion.3.1Kernel3.1.1 RTLinuxRTLinux has a special design for its kernel because it hastwo kernels. RTLinux uses a specialized real time kernelcalled the RTCore [4]. The second kernel is the standardLinux kernel which is used for regular applications thatdo not have time constraints. Both interrupt handling andthread handling are controlled by RTCore. The RTCore willsend these interrupts to the appropriate interrupt handler.This RTCore also restricts the Linux kernel by makingit unable to disable interrupts to make sure it does notinterfere with process scheduling. Thus the Linux kernelcan only run when there is a task that is not real time.Real time applications can communicate with Linux kernelsthrough first-in-first-out pipes. This enables the RTCoreAPI threading that helps programmers learn to program

4on this system. The duel kernels gives RTLinux the fullfunctionality of Linux, while adding real time capacity to it[6].3.2SchedulerThe scheduler of the RTOS is an important part of howan RTOS decides the next task to be put on the processor,and to make sure that all tasks meet their deadlines. Thissection of the paper will discuss similarities and differencesbetween the schedulers used by RTLinux, VWorks, andFreeRTOS.3.2.1RTLinuxRTLinux has a flexible scheduler by allowing differentscheduling techniques to be used based off the programmersneeds. The RTLinux scheduler supports FIFO scheduling,EDF scheduling, and rate-monotonic scheduling. Thisflexibility allows for better suited schedulers for differentsystems [5].Figure 5. RTLinux Architecture Overview3.2.23.1.2 VxWorksVxWorks uses a single microkernel to handle basic kernelfunctions [4]. Additional functions like file sharing andnetworking have to be loaded from provided libraries. Thissystem provides flexibility to fit its functionality withoutloosening its constraints on available memory and resources[8] [9].3.1.3 FreeRTOSFreeRTOS also utilizes a single microkernel to handle realtime tasks. This kernel supports dynamic scheduling or apriority based scheduler, blocking and deadlock avoidance,and scheduler suspension. It can utilize fully featured API,or a lightweight API [8] [9].VxWorksVxWorks uses a preemptive round-robin schedulingalgorithm. Task priorities can range from 0 to 255 where 0is the highest priority [11]. If a task with a higher prioritythan the one on the processor is ready to run, then thelower priority task will be suspended so that the higherpriority task can be ran. If the two tasks have the samepriority then they go into round-robin scheduling. If aresource is unavailable then the processor swaps back to alower priority task until the resource is available. VxWorkssupports POSIX API which makes the system FIFO. Thismakes the system more flexible and easier to meet differentindustrial needs [5].3.2.3FreeRTOSFreeRTOS uses a dynamic preemptive priority basedscheduling algorithm [9]. This scheduler can allow theuser to choose to run processes in a co-operative manneror using a preemptive policy. The difference is that thepreemptive policy always runs the highest priority task,and when two tasks have the same priority they share CPUtime. The co-operative manner only allows context switchesto occur by calling a function or when a task gets blocked.Both RTLinux and VxWorks use the priority inheritanceprotocol. However, FreeRTOS does not use one of the typical ways of dealing with priority inversion; it deals withdeadlocks formed by priority inversion by enforcing nonblocking tasks and by blocking tasks for fixed amounts oftime.Figure 6. Architecture Overview for VxWorks and FreeRTOSThese kernels are similar in how they all have a meansto handle real-time tasks. Some of the major contrasts forRTLinux is that it supports a duel kernel which allows it tohandle a wide variety of tasks at the cost of being a largerkernel by having both the standard Linux kernel and theRTCore. While, the structure of VxWorks and FreeRTOS aresimilar in both using micro kernels.4WCET TOOLSWCET analysis tools give an estimated worst case executiontime of a task. Modern processor components like cachesand pipelines complicate the task of estimating the WCET[18]. If a tool does not take pipelines or cache behavior intoconsideration it may over-estimate the WCET by multipleorders of magnitude.

54.1AbsInt aiTAbsInT aiT is a worst-case execution time analysis tool.This tool solves the cache and pipeline issue by staticallyanalyzing the task’s cache and pipeline behavior. Thisenables it to get the correct upper bounds of WCET of thetask. This tool uses the technique of abstract interpretation,and offers a graphical user interface to visualize the WCETpath, and allows for an interactive way to inspect pipelinesand caches [18]. The abstract interpretation is a methoduses a semantic based method for safe and static programanalysis. The overall method applied by AbsInT aiT breaksit into multiple steps to find the WCET.1. Reconstruction of the control flow2. Value analysis: computation of address ranges forinstructions access memory3. Cache analysis: classifies memory references as cache hitsor misses4. Pipeline analysis: predicts the behavior of the programon the processor5. Path analysis: determine the worst case execution path6. Analysis of loops and recursive proceduresSteps 2, 3, and 4 are done with abstract interpretation;path analysis is done using integer linear programming [18].4.2Bound-T ToolThe Tidorum Ltds Bound-T tool is software used for staticanalysis of code to estimate its WCET and stack usage forembedded systems. This tool in its current state is not goingthrough further development, and is currently open source.The Bound-T tool uses the same static analysis approach asthat used by AbsInT aiT. The Bound-T tool was developedfor local and safe analysis of simple control flows. Thissystem used a PA (Presburger Arithmetic)-based analysiswhere an approximate model of computer arithmetic isused, which assumes that integer variables never overflowor wrap around. However this approximation leads to anissue of not being able to find a feasible execution path. Inorder for Bound-T to start getting back on track to findingWCET for embedded systems it either has to drop the PAbased analysis, or find a new form of preliminary analysisto ensure that the PA analysis can be applied [16].4.3OTAWA ToolboxThe OTAWA toolbox is a proposed WCET analysis toolframework that allows it to host researchers WCET algorithms and includes an abstraction layer that separates thehardware analysis from the instruction set architecture. Thisframework should also allow for the comparison betweentools to be easier to do, and support the development ofnew tools. The OTAWA toolbox was used in the MERASAproject to help find the most optimal WCET analysis toolfor a multicore processor running mixed-critical workloads[17

1.1 Hard Real Time vs. Soft Real Time Hard real time systems and soft real time systems are both used in industry for different tasks [15]. The primary difference between hard real time systems and soft real time systems is that their consequences of missing a deadline dif-fer from each other. For instance, performance (e.g. stability) of a hard real time system such as an avionic control .

Related Documents:

Survey as a health service research method Study designs & surveys Survey sampling strategies Survey errors Survey modes/techniques . Part II (preliminary) Design and implementation of survey tools Survey planning and monitoring Analyzing survey da

new survey. Select one of those options to apply to your new survey form. 1)Create a new survey from scratch - will create a blank survey form that you can use to add your own questions 2)Copy an existing survey - can be used to create a copy of a survey form you have already created 3)Use a Survey Template - will allow you to select

1. A recruitment survey (public survey) will be used to recruit subjects in the study. Public survey link. 2. If a participant agrees to participate, a demographic survey (private survey) will be sent to the participant to fill out. Automatic survey invitation. 3. Based on the answer in the demographic survey, the

akuntansi musyarakah (sak no 106) Ayat tentang Musyarakah (Q.S. 39; 29) لًََّز ãَ åِاَ óِ îَخظَْ ó Þَْ ë Þٍجُزَِ ß ا äًَّ àَط لًَّجُرَ íَ åَ îظُِ Ûاَش

Collectively make tawbah to Allāh S so that you may acquire falāḥ [of this world and the Hereafter]. (24:31) The one who repents also becomes the beloved of Allāh S, Âَْ Èِﺑاﻮَّﺘﻟاَّﺐُّ ßُِ çﻪَّٰﻠﻟانَّاِ Verily, Allāh S loves those who are most repenting. (2:22

Section III – Conducting an Employee Satisfaction Survey 8 Steps in Process 9 Survey Design/Construction 11 Packaging and Layout of Survey 14 Section IV – Employee Satisfaction Survey Template 15 Section V – Employee Satisfaction Survey Report Template 21 Processing Survey Responses 22 Survey Report Content 24 Example 1 25

6. Survey of Deuteronomy - Deuteronomy 11:1-12:32 24 7. Survey of Deuteronomy - Deuteronomy 13:1-14:29 29 8. Survey of Deuteronomy - Deuteronomy 15:1-16:22 33 9. Survey of Deuteronomy - Deuteronomy 17:1-19:21 38 10. Survey of Deuteronomy - Deuteronomy 20:1-21:23 43 11. Survey of Deuteronomy -

Novagen pET System Manual 11th Edition TABLE OF CONTENTS TB055 11th Edition 01/06. 2 USA and Canada United Kingdom and Ireland Germany All Other Countries Tel 800 526 7319 UK Freephone 0800 622935 Freephone 0800 100 3496 Contact Your Local Distributor novatech@novagen.com Ireland Toll Free 1800 409445 techservice@merckbiosciences.de www.novagen.com techservice@merckbiosciences.co.uk .