Real-Time Operating Systems at CERN
Total Page:16
File Type:pdf, Size:1020Kb
cmu — cw -%~*> H CERN/cN/96/11 Paper submitted to the VITA Europe Congress 1996 3 Q q' Brussels, Belgium, 8-9 October 1996 Real-Time Operating Systems at CERN ]. Blake, C. Eck, M. Merkel, L. Pregemig CERN, CN Division CH-1211 Geneva 23, Switzerland Abstract territory". For instance, the LEP (Large Electron Positron Collider) machine and the corresponding control sys Real—time operating systems (RTOS) have been in use at tems have been improved over the years. Its peak CERN for many years in systems to control particle luminosity (i.e., collision rate per second and square accelerators, and in data acquisition and industrial centimetre) increased from 4.25*1030 in 1989 to 24.9*103 control systems for experiments. The paper (i) briefly in 1995 and the integrated luminosity was 26 times overviews CERN’s embedded-systems environment, (ii) higher in 1995 than it was in 1989 ll]. This also had a discusses the reasons for using RTOS at CERN, (iii) gives major impact on the data acquisition systems of the LEP the status of RTOS at CERN, (iv) describes the support, experiments. including netbootable systems, software distribution via servers, and CERN-specific developments. Finally the Athird major distinction between CERN and industry is paper summarizes the experience gained over the years the composition of the experimental work force. In and draws some conclusions. modern experiments several hundred (more than 1000 for next generation experiments) people from dozens of 1. Tm; CERN ENVIRONMENT institutes spread out over Europe and the world collabo rate. Graduate students form an important part of each 1.1 Systems, Changes, and the Workforce collaboration and provide valuable contributions to experiments. Many of them take on other responsibilities At CERN (European Laboratory for Particle Physics), or leave the collaborations, once they have earned their scientists study the structure of matter and the funda degree. This results in high personnel turnover and may mental forces in nature. They use particle accelerators to cause maintenance problems. Giving preference to accelerate such particles as electrons, positrons, protons, standards and widely available commercial products antiprotons, or heavy ions to high energy and to bring (e.g., VMEbus modules, RTOS, etc.) over proprietary them into collisions with other particles moving in the solutions helps to reduce that risk. opposite direction or with fixed targets. Large detectors around the collision areas collect the information on the 1.2 Embedded-Systems Environment at CERN events resulting from the collisions. Physicists use data acquisition systems to record the interesting events for Modular electronics is widely used at CERN and further analysis and to discard the uninteresting ones. VMEbus is the leading bus standard. As a consequence, Motorola's 68k is the dominant processor family Intel The systems to control particle accelerators consist of x86 is also used, in accelerator control. PowerPC is several layers. Some parts are relatively simple and coming up as a replacement for both. One finds Unix industry standard, like the ventilation of accelerator workstations at the upper system layers and for software tunnels. Others are highly complex and specific to development. Concerning networking, Ethernet is the CERN, like the control and synchronization of the workhorse for general purpose connectivity: boot, TCP / superconducting radio frequency cavities to accelerate IP, NFS. Specific data channels are in place for high particles. The same applies to experiments, where gas bandwidth data moving (e.g., FDDI). RS232, MIL1553B flow control is more like an industry-type application, and other field busses connect to embedded computers unlike data acquisition systems with several millions of (controllers) in a variety of equipment. The real—time detector channels. operating systems OS-9/ 68K and LynxOS run on development systems with disks or on netbooted After complexity constant changes are the second diskless target systems. In addition, some truly embed peculiar aspect in CERN’s environment. Research, as ded applications, written at CERN, stored in EPROM, carried out at CERN, requires constant changes to adapt run on microcontrollers from Motorola (MC683xx) or to the conditions that occur when exploring "unkown Intel, with or without a commercial RTOS. IIIIIIIIIIIIIIIIII CERN-CN-96-01 1 OCR Output CERN/CN/96/11 2. Wm DOES CERN Us}; REAL-TIME where these systems find their way into particle physics O1>ERAT1Nc SYsTEMs? applications is in the area of ”third level trigger" pro cessing. 2.1 Definitions 2.2.3 Proprietary Real-Time Operating Systems Real—Time Operating Systems (RTOS) in this context means systems written and maintained by an external The arguments put forward for choosing to write one’s company i.e., commercial RTOSS as compared to own proprietary operating system concentrate on the proprietary (home grown) RTOSs. This distinction seems cost of corrunercial solutions and the possibility to appropriate as still the majority of RTOSs used (some optimise the functionality of the written system to a 50%-80%) fall in the class of proprietary systems *2]- The given set of applications. The manpower cost of writing definition of rea1—time used in this paper is: "Real—time in and maintaining such a system over its lifetime weakens operating systems: the ability of the operating system to the cost argument. It is also fairly obvious that a propri provide a required level of service in a bounded re etary system is a bad choice for an environment with a sponse time." This definition says nothing about the high turnover of the user community as is typical for speed with which a given RTOS reacts to a request for research laboratories where a large number of the users service as long as the service is provided in a time which of the system consists of visitors and not of stable staff. is consistently smaller than the guaranteed response By definition, a proprietary system is not known by time. In reality the usefulness of a RTOS depends not newcomers and requires a considerable training effort. only on its response time being bounded but also on the CERN is certainly not an environment where a propri value of the bound. This requirement for a RTOS is etary system would normally be considered appropriate. described more loosely by the terms "hard real- time' and "soft real-time" —- more loosely because hard real 2.2.4 Commercial Real-Time Operating Systems time implies a certain speed of reaction without being explicit about it and soft real-time is used not only to This is the choice retained for systems requiring real label systems with relaxed speed requirements but also time features at CERN. Yet, given the large number of systems where response times are typically within a such systems on the market, choosing this broad cat given bound but could lie outside of it in some cases. egory does not help much in picking the right system amongst the many possible candidates. A careful evalua 2.2 Possible Choices tion of these systems based on an equally careful analy sis of its required functionality has to be made. The next 2.2.1 No Operating System section will address this in more detail. lt is also clear that this selection procedure has to be repeated at Coding real-time applications without the help of an regular intervals. The frequency of these intervals will operating system is a valid solution in some cases. For have to be chosen based on an optimal balance between example, when extremely fast response and execution a natural wish for stability and the need to adapt to times are required the overhead of system calls may be changing requirements and a changing market for intolerable. Another typical example is coding simple hardware and software for our systems. repetitive tasks as they can often be found executing on Digital Signal Processors (DSPs). In any case, the deci 2.3 Requirements for Real-Time Operating Systems sion not to use an operating system will only be justifi at CERN able if the overall size of the given application is small enough to permit understanding and maintaining the 2.3.1 Availability on CERN’s Hardware code without the underlying structure of an RTOS. CPU boards used at CERN for control and data acquisi 2.2.2 Regular Operating Systems tion applications are mainly based on Motorola 68k processors. Recently PowerPC based boards have been Into this class fall systems like UNIX, MacOS, Windows added. A smaller, but not negligible, number of Intel NT, or even Windows95. They provide useful alterna processor based PCs are used for accelerator control tives for soft real-time applications with the added applications. The chosen RTOS(s) will have to support benefit that they are often better known and therefore these CPU architectures. In addition, it is important to easier handled by people without any special knowledge choose a RTOS which not only can run potentially on of the RTOS world. Ports of these systems appear now our boards but has actually already been ported to them. also for the processors and CPU boards used in our Many of our CPU boards have no Memory Management environment. In addition, the procedures for handling Unit (MMU). Even if the number of these boards will basic real-time requirements are more and more often certainly diminish with time we do require also a RTOS also added to this class of systems. A typical example for which can run without MMU support. At least one of OCR Output CERN /CN/96/11 the chosen RTOSs has to be sufficiently small to fit on on a very large number of runtime systems. CERN and CPU boards with small memory even if these restric similar organisations need a rather unusually high tions are rapidly diminishing also.