本文是计算机专业的留学生作业范例，题目是“Characteristics of Real Time Systems（实时系统的特性）”，在本文中，我们描述了可表示为时间函数的实时系统的显著特征。本文也以实时操作系统的时间驱动模型的形式进行了描述，并提供了一个测量实时系统有效性的工具。对于这个模型，我们已经生成了一个实时系统，在这个系统中我们测量了许多著名的调度算法。为了满足任务调度的实时性约束，采用了不同的调度算法。实时系统大多采用基于优先级的抢占式调度和最坏情况下的执行时间。
In this paper we describe the distinguished characteristics of real time systems which can be expressed as a function of time. This paper is also described in the form of a time driven model for a real time operating system and also provides a tool for measuring the effectiveness of a real time system. For this model, we have generated a real time system in which we measure a number of well known scheduling algorithms. To meet the real time constraints for scheduling the task different algorithms were used. Most of the real time system are designed using prioty based preemptive scheduling and worst case execution time.
Scheduling refers to the set of policies and mechanism to control the order of work to be performed by a computer system. process scheduling in real time system has almost used many more algorithms like FIFO, Round ROBIN, Uniprocessor Multiprocessor etc. The choices for these algorithms are simplicity and speed in the operating system but the cost to the system in the form of reliability and maintainability have not been assessed.
In real time operating systems like embedded system the scheduler also perform that the process can meet deadline that is necessary for stabling the system. Schedular are sent to mobile devices and managed by an administrative back end. A common characteristic of many real-time systems is that their requirements specification includes timing information in the form of deadlines. The time taken to complete an event is mapped against the “value”this event has to the system. Here “value” is loosely defined to mean the contribution this event has to the system’s objectives. The mapping of time to value between start-time and deadline is application dependent.
In computer science, scheduling is the procedure by which threads, process or given the access to system resources. The scheduling is mainly concerned with these things throughout:
Total number of processes that complete their execution per unit time.
Response time: when a request was submitted what amount of time takes when first response produced.
Turnaround time: total time between completion and submission of process.
Fairness: equal time to each process.
In a general purpose computer system a scheduler is considered good if it is fair and gives execution time to all tasks equally. When scheduling a real-time system what is most important is that all tasks meet their deadlines and are executed so that any task depending on them, meet their deadlines as well.
Types of scheduling
Multilevel queue scheduling
First in first out
Process scheduling is divided into four main types
1 long term scheduling which determines which programs are admitted to the system for execution and when, and which ones should be exited. Concept of scheduling in real time system
2 medium scheduling: Which determines when processes are to be a suspended and remain.
3 short term scheduling ordispatcher which determine which process have cpu resources and for how long.
Process scheduling in computer operating system is instance of extensively studied problem from operation research which in form of producing a sequence of jobs which must a common resource. all decisions should be made dynamically for example all jobs have to be scheduled and processing time requirements are available at the start of sequence time =0 the new job will not come during processing. if it happens the priviouly computed job is invalidated and scheduling must be started overif is maintained. Now process scheduling in real time system can categorized into two categories:
Periodic processes: which arrive at regular intervals are called periodic process and aperiodic are those which arrive at irregular. the main difference between real time systems and other computer system have not understood. the time to complete a process is important in all computer systems but in real time response time play a cruicial part in the correctness of the application software
Real-time systems are divided into two classes: Hard real -time systems and soft real -time systems.
Hard real-time systems are those whose deadlines must absolutely be met and system will be considered to have failed whereas soft real-time systems allow for some more deadlines, at least occasionally, to be missed with only adegradation performance but not a complete failure of the system. In judge a number of existing real time systems we study the DMA cycling ,interrupt processing blocking ang non-blocking. The deadline scheduler gives no reasonable control over the choice of which deadlines are delayed and which lead to unperictable failures result to the impact on reliability and maintainability of the real time system. real process completion is handled by step function in which there is no any value in completing the process after its deadline the characteristic of a real-time system is that correctness is determined not only by what is done, but when itis done, we propose to use a representation of a process completion value to measure the algorithms in real time system.
Computational model consists a set of processes every process has a request time R ,Time interval c and avalue function R.
Its value function become zero or negative. the value function may be negative at R,not rise above zero the request time R may be future time or past time . if request time r is future time then process is not scheduable but attributes in computations asre load in which current scheduling decisions are made classical algorithms are.
Deadline:The earlist critical time in process at each decision point
FIFO:The longest request set is executed in process at decision point
Random:chosen from the request set and executed
stack:the process with the smallest stack time is executed in each decision point
SPT:The shortest completion time is executed in each decision point.
There are many approaches for utilizing a time driven model in real time system. real time operating system support or modify the value for the process or the set of processes during run time. In this way application designr can set and modify scheduling policy for various systems. For describing these processes we assume primtives to creat and kill processes already exist. There are three real time interfaces
Time control primitive: The arguments of these operating systems communicate the information needed to implement the model but the issue is the structure of informative that passed to the operating system. In single primitive each parameter would be flexible but in user might set inconsistent parametres.
Scheduling policies: In real time operating system it is compulsory to provide a mechanism to express the scheduling model to implentour model. the system should also able to modify these policies to take advantage or flexibility of the system.
Periodic policies: There is one way to describe a periodic policies to using optional arguments in a creative process. The creative Process make new instance of process at a specific node 5 ways for scheduling the task in real time systems.
3.Real time system and scheduling techniques实时系统与调度技术
Real time scheduling techniques are divided into two main categories. One is called static scheduling techniqueAnd other is called dynamic scheduling technique. Dynamic may be static perioty or dynamic perioty. Static prioty is divided into two types
1 rate monolithic : rate-monotonic scheduling is a scheduling algorithm used in real- time operating systems with a static-priority scheduling class. 
The static priorities are assigned on the basis of the cycle duration of the job: the shorter the cycle duration is, the higher is the job’s priority.
These operating systems are generally preemptive and have deterministic guarantees with regard to response times. Rate monotonic analysis is used in conjunction with those systems to provide scheduling guarantees for a particular application.
2 deadline monolithic : Dynamic prioty is also divided into two types
1)earlist time first
2)least stack time first
4.System and the task model系统和任务模型
Each type and unit of work that is scheduled and execute the system as a job. ALL the tasks are taken to be periodic. the system knows all the things about arrival time ,periodexecution time. the task are ready to execute if it arrives the system. IN soft real time system each task has a real positive value. The main goal of the task is to obtain a value as much as possible.
There are the two conditions if the task succeed the system acquire that value if the task is not succeed the ystem gain less value in a special case like soft real systems the task has nothing a vale
5.Basic requirements of schedulars in real time operating system实时操作系统中调度程序的基本要求
There are five basic requirements of scheduler in real time operating system .Multitasking and preemptable In real time operating applications real time operating system should be multitask and preemtable. the scheduler are able to preempt any kind of task in the system and give the resources to task that the system needs it .Dynamic deadline identification With the earlist deadline RTOS should be able to identify the task. deadline information may be converted to prioty levels for resource allocation .Predictable synchronization To communicate multiple threads among themselves in a timely fashionsynchronization mechanism also reqired and also the abiliy to lock or unlock is the resource to achieve dta integrity. Sufficient perioty levels The real time operating systems must also have a sufficient number of priority levels for effective implementation. Namelypurety,inheritance,ceiling protocol need sufficient prioty levels .Predefined latencies the timing of system call define the following specifications.
Task awitching latency :time to save the context of a current execution time and switch to another
Interrupt latency:the time elaped between first instruction of the handler and execution time of the last instruction of the interrupt task
Dynamic scheduling algorithm: Dynamic algorithm at runtime assign perioties based on the execution parametres of tasks the most important dynamic scheduling with puriotysscheduling algorithms are
1 EArlist deadline first algorithm The perioty of each task based on the value of itsdeadlinethe algorithm is simple and preemptive.
2 ACO Based scheduling algorithms. The ACO algorithms are computational models for the collective foraging behavior of ants . Ant is an agent that generate a path. ANT do not need synchronization. ant moves to the good looking neighbor for the crrent node probabaisatically
When scheduling a distributed system using offline scheduling the whole system including the communication is scheduled before the start of the system giving a very rbust system but the cost of adding a new node is high, complete rescheduling of the whole system. To schedule a time-triggered distributed real-time system we use the same techniques as we did with the single processor system, but understandably with more complex graphs. For example we might have a precedence graph, where one task is preceded by several tasks on different nodes. Making a schedule that have a task precede by tasks on several nodes requires more of the system then of the schedule, even the best schedule will fail if the nodes time references is not synchronized and tasks are not executed in time. This requires all nodes to synchronize time with each other. This can be done at an application level like in normal distributed systems, with a common time reference with a communication protocol that handles time synchronization TTCAN, TTP and FlexRay to namea few.
We have looked at the most commonly used scheduling techniques and communication protocols used in distributed realtimesystems. When we started this paper we where looking at doing a survey of everything related to distributed real-time systems,but found that to be a to vast and growing field so we narrowed our field to communication protocols and scheduling algorithms used in distributed real-time systems. During our research for this paper we have been looking atschedulers that are created to work better with the FlexRaycommunications bus or in a similar fashion. We have taken a real interest in distributed real-time systems and are looking forward to seeing the advances in scheduling and communication for distributed real-time systems and maybe one day join the research field our selves. With this paper we hoped to introduce the reader to the problem of scheduling real-time tasks in distributed systems. We presented the different interpretations of the problem and the various options available to the solution designers. Our analysis of some of the existing scheduling algorithms tried to focus on the affect of the specific problem on the choices made in the solution. We hope that what we presented provides the reader with a broad understanding of the problem and a range available solutions. This paper was also aimed at providing the reader with a solid foundation for further research on the subject. Finally, we suggested possible future research directions.