⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 mitron3.02.txt

📁 rtai-3.1-test3的源代码(Real-Time Application Interface )
💻 TXT
📖 第 1 页 / 共 5 页
字号:
Computers built around a microprocessor, called microcomputers, are making in-roads into new computer applications, replacing various control equipment, byvirtue of their being small and inexpensive.  For example, they areincreasingly being used to replace all kinds of control devices, in otherwords, it has become possible for a small computer to replace control devicesformerly made up of relays, mechanical parts and analog circuits.Specifically, many products from telephone switching devices, industrial robotsand NC machine tools, to home appliances such as air conditioners, washers andtelevisions use microcomputer control.The microcomputers used as control devices are not intended to be used insideof standard computers such as mainframes, personal computers or workstations.The control computers are characterized by their use as a single part in alarger system.  For this reason they are called "embedded computer systems",or "embedded systems" in short.In general, embedded systems have the ability to detect various externalstimuli or changes in the environment using sensors and then initiate anoperation in response, or to initiate periodic operations so as to affect theoutside environment.  An air conditioner, for example, uses sensors to detectexternal temperature and humidity and controls its output level and winddirection in response.  Embedded system programs must perform their controlby following time-varying changes in the external environment without delay.It is this point that makes them essentially different from typical dataprocessing programs.In order to increase the productivity of embedded system programs andreduce the manufacturing cycle required, the programs themselves are notwritten directly using processor instructions, but rather are written using ashared management program, or OS.  Application programs written for a givensystem are then placed on top of this OS.  The OS itself differs fromoperating systems of the type used in a general-purpose computers.  The mainpurpose of these operating systems is protection among users and file systemmanagement, whereas embedded operating systems are designed to make it easierto program applications using concurrent processing and interrupts forsynchronization with external events.In general, computers, and the programs which run on them, are sequential innature.  They cannot do two things at once.  Embedded systems on the otherhand are often required to monitor the outputs from sensors concurrently.If there are two sensors requiring monitoring, it is intuitive for theprogram to be divided into two parts.  These parts can be thought of asrunning concurrently, thus making the task of programming simpler.  Theapproach that arose from this type of application is the basis of the conceptof multitasking.  All processing is divided into separate tasks each of whichare parallel in flow.  Programs can be produced more quickly and made easierto understand when divided into tasks in this way.  Of course, a processoralone is left only with the ability to execute instructions sequentially, somultitasking is implemented through time-sharing at the OS level.  The OShaving the multitasking capability is called multitasking OS, which is veryuseful for embedded systems.The operating systems used in general-purpose computers are also multitaskingin the sense that they execute multiple jobs (processes, tasks) based on time-sharing.  In the case of general-purpose computers, however, jobs (processes,tasks) are highly likely to be unrelated to each other.  In the sense that oneperson may be using the computer for document processing, while another isusing it for compiling a program, and yet another is using a text editor, thecomputer is in fact multitasking.  But each user is only interested in the job(program) he or she is executing.  They are not in the least concerned withwhat kind of concurrent processing may be going.  In this case, the reason forusing multitasking is mainly for improved cost performance.  In short, eventhough it would be ideal for each user to have his or her own computer, it isnecessary for them to share a single computer because there aren't enough togo around.  The result is multitasking.In embedded systems, on the other hand, a job having a single purpose isdivided into multiple tasks to make the program easier to write.  Furthermore,these tasks do not just run in total isolation, but rather have a verycomplicated relationship with each other.  In the case of an embedded system,the operation of any given task and its mutual relationship to other tasks iscontrolled by the designer of the overall system, and each of the individualtasks cooperate to achieve a single goal.  In this sense, the multitaskingused in a general-purpose computer is quite different from that used in anembedded system.Another important point about operating systems used in embedded systems isthat they operate in real time.  In abstract terms, real-time operation meansthat the computer processing follows changes in external states.  Specifically,the time required for the output of results is constrained.  In simplest terms,worst-case response time is predictable.With conventional computers which use batch or time-sharing processing, theuser waits for the computer.  In this case, the fact that the computer iscomputing is a goal in itself, and the computer is unrelated to any othersystems.  Accordingly, no matter how long processing takes, everything willcome out all right in most cases as long as the user waits.  True, the fasterthe processing, the better; however, there will be no fatal effects even if ittakes a long time.In the case of embedded systems, on the other hand, computation itself is notthe goal.  The goal is controlling other equipment based on the results ofcomputation.  The demand for fast processing is high.  If processing isdelayed, results may be meaningless by the time they are available.  Take thesafety control equipment of a train for example.  If the brakes are not appliedwithin a set amount of time when something wrong is detected, an accident willresult.  Or, let's say the spark plug timing of an automobile engine iscontrolled by an embedded system.  Results must be output before enginerotation reaches a certain point or the calculation will be useless.  In otherwords, it is not only important what happens to the results of processing, whenthey are obtained is also important.  Outputting late results is the same asnot outputting any results at all.In order to meet the strict demands on processing times, the computer mustwait for stimulus from the external environment.  This means the time thecomputer is in operation is reduced.  In other words the computer is beingused relatively seldom.  This extravagant use of computers has only becomepossible recently, thanks to the popularity of general-purpose computerhelping to reduce prices.  And that is the reason real-time, embeddedcomputers are a relatively recent application of computer technology.During programming, one may refer to the algorithm, data structure, or theefficiency of execution or the amount of calculations, but the absoluteexecution time required is rarely discussed.  But in applications intended forembedded systems, it is often critical to know ahead of time the amount ofexecution time required by a program.  And this does not just refer to the CPUtime required by each program (job, process, task).  It is necessary toestimate the absolute execution time required including the overall load onthe system down to the execution status of other tasks.  This is an extremelydifficult thing to do, and is just plain impossible under a complex OS likethose used in large machines, because unless the OS itself is fairly simple,it will be impossible to accurately estimate OS overhead.Operating systems used in embedded systems are greatly different fromoperating systems used for typical data processing or those used for softwaredevelopment.  An OS intended for an embedded system must be capable of bothmultitasking and real-time operation.*******************************************************************************    1.4 History of ITRON Specification and Planned Future Developments ******************************************************************************ITRON (Industrial - The Real-time Operating system Nucleus) is a real-time,multitasking OS specification intended for use in industrial embedded systems.Work on the ITRON specification began in 1984 with the start of the TRONProject, and the first specification was released in 1987.  That specificationis called the ITRON1 specification.  As an OS specification standardizedmainly for 16-bit microprocessors, ITRON1 specification was standardized forthe major 16-bit microprocessors of that time.  Several operating systemshave been implemented based on the ITRON1 specification.  These operatingsystems made invaluable contributions to the evaluations of the ITRONspecification.After this, work was conducted on the uITRON specification (Ver. 2.0), for usemainly on smaller 8-bit MCUs, and the ITRON2 specification, for use on higherperformance 32-bit microprocessors.  Both specifications were made public in1989.  uITRON specification is a highly condensed version of ITRONspecification.  System calls are divided into five levels depending ontheir importance.  uITRON specification operating systems have beenimplemented not only on 8-bit microcontrollers (MCUs), but also on 16 and32-bit microprocessors.  There have been over 20 implementation examples ofuITRON-based operating systems running on a variety of processors beingreported.  The ITRON2 specification, which is based on ITRON1 specification,with many high level functions added, has mainly been implemented on TRON-specification microprocessors.In parallel with the above work on OS specifications, work has progressed onthe standardization of external I/O used in conjunction with ITRON operatingsystems.  The ITRON/FILE specification, a specification for a file managementsystem under ITRON and uITRON specification kernel, was released in 1992.uITRON 3.0 specification is a version upgrade of the uITRON specificationbased on user feedback and experience in implementing ITRON1, ITRON2 anduITRON (Ver. 2.0) specification OS.  The ITRON2 and uITRON specificationshave been unified by adding object creation/deletion functions and some ofthe extended features of ITRON2 specification to uITRON specification.Support for distributed systems has also been made available byadding functions for the loosely-coupled networking of ITRON specificationcomputers.  Distributed systems supported under uITRON 3.0 specificationhave the restriction that node configuration does not change dynamically.As the future perspective for the ITRON specification, work is progressing onthe ITRON-MP specification for application in tightly-coupled multiprocessorsystems.  There are also plans to develop an IMTRON specification which willallow operation even in an environment where the node configuration of adistributed system does change dynamically.In the rest of this document, "uITRON (Ver. 2.0)" will be written as"uITRON 2.0".1st        : 2nd Generation  :   3rd GenerationGeneration :                 :           :                 :                                    ==========           :                 :                                    |        |           :                 :    ==============   ============   |        |           :     ==========  :    |            |   |          |   |        |           : +-->| ITRON2 |------>|            |-->| ITRON-MP |-->|        |           : |   |  Spec. |  :    |            |   |   Spec.  |   |        |========== : |   \--------+  :    |            |   |          |   | IMTRON || ITRON1 |---+ Intended for  :    | uITRON 3.0 |   \----------+   |  Spec. ||  Spec. |---+ 32-bit MPUs   :    |    Spec.   |                  |        |\--------+ : | such as TRON- :    |            |                  |        |Intended   : | specification : +->|            |----------------->|        |for        : | microprocessors |  |            |                  |        |general-   : |               : |  |            |                  |        |purpose    : |   ==========  : |  \------------+                  \--------+16-bit MPUs: +-->| uITRON |----+           :     |(Ver2.0)|  :           :     |  Spec. |  :           :     \--------+  :           : Intended for    :           : small scale,    :           : single-chip     :           : microcomputer   :           : based systems   :           :                 :               Figure 1 Development of the ITRON Specification*******************************************************************************    1.5 Features of ITRON Specification                               *******************************************************************************One of the main features of ITRON specification operating systems is the factthat although implementation on various types of processors is possible, nomore standardization or virtualization than necessary are made so that higherprocessing performance may be achieved.  Another main feature is that althoughthe operating systems provide many functions, thought has been given toadaptability such that actual object code can be made very compact.From the standpoint of software compatibility and ease of learning, it isdesirable to virtualize microprocessor architectures as much as possible andprovide a high level of standardization, but this has the negative impact ofdecreasing basic performance.  And although it may be desirable for an OS toinclude lots of functions from the standpoint of making programming easier andraising the performance of certain types of applications, there is again anegative impact in that object code size grows too large.  In designing an OS,these two considerations must be kept in balance.  One solution to this

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -