Application of multi-core technology in embedded real-time system

Source: Internet
Author: User

Transferred from: http://blog.csdn.net/seawaywjd/article/details/6633640

Summary

Multicore processors are also known as on-chip multi-processor (chip multi-processor,cmp). Since 1996 Stanford University first introduced the on-chip multi-processor (CMP) idea and the first multi-core architecture prototype, to 2001 MM launched the first commercial multi-core processor POWER4, and then to 2005 Intel and AMD Multicore processors in large-scale applications, and finally to now multicore become the mainstream of the market, Multicore processors have undergone more than more than 10 years of development. In this process, multicore processors have been applied to many fields, such as multimedia computing, embedded devices, personal computers, commercial servers, and high-performance computer, and the multi-core technology and related research are also rapidly developing, such as multi-core structure design method, on-chip interconnection technology, reconfigurable technology, the next generation of core technology.

With the rapid development of embedded technology, embedded processing demand is also growing rapidly, in the rapid development of integrated circuit technology today, the performance of single-core processor has developed to a relatively high level, relying solely on improving the performance of single-core processor to improve the real-time system is not enough, The system architecture is developing in the direction of multiprocessor design to solve the problem that the complexity of single processor system is too high and the computing power is insufficient. This paper mainly discusses the application of multi-core technology in embedded system, and uses multi-processor in the embedded system to accomplish the task, when the data arrives, it is distributed by the packet distribution processor to the processing packet processor, and multiple processing packet processors are symmetrical and equal processing data to achieve the purpose of improving the real-time system.

This paper mainly discusses the application of multi-core technology in improving the real-time of embedded system.

Objective

In recent years, processor speed has encountered bottlenecks. Moore's law shows that every 18-24 months the number of transistors in the chip increases by one, and the chip performance increases linearly, and over the past 40 years, chip manufacturers have increased the processor's clock speed to improve chip performance, from 100MHz to 200MHz to the nearest GHz range. But today, due to the limitations of power and cooling, the method of increasing the clock speed to increase performance is not feasible. As a result, chip makers are turning to another new chip architecture, which is to have a single chip with multiple processor cores that can be plugged directly into a single processor socket, while the operating system uses all the relevant resources to make each of its execution cores a discrete logical processor. By dividing tasks between two execution cores, multicore processors can perform more tasks within a specific clock cycle. Multicore architectures enable the current software to run better and create a more complete architecture for future software authoring.

Common uses for multiple processors are:

1. Multiple independent functions. The design may need to deal with multiple independent processing tasks, the best way to solve this problem is to create a separate dedicated processing module for each processing task and assign a dedicated processor and peripheral set to each processing module.

2. Interface processing. A system that acts as a bridge or switch between multiple interfaces can be assigned a slave processor for processing data on each interface, while one or more master processors handle more advanced bridging or switching tasks.

3. Data stream processing. For data flow computing problems, you can schedule multiple processors to process data streams in a pipelined manner, with each level of the multiprocessor pipeline completing a subset of the computational tasks before transmitting the data to the next processor, which is an effective way to improve system throughput.

4. Reliability and redundancy. Processing systems can be replicated multiple times to improve reliability and redundancy.

5. Symmetric processing. Traditional symmetric processing (SMP) is a useful solution for improving application performance without explicitly dividing boundaries. The OS layer of a specific SMP feature can manage parallel tasks and automatically dispatch them across multiple processors.

Development status at home and abroad

Embedded real-time technology is one of the most popular and emerging technologies in recent years, and it is also the hottest topic in China's IT field. With the popularization of computer applications, the development of Internet technology, the whole process of automated product manufacturing, large-scale e-commerce activities, highly collaborative scientific experiments and the rise of digital home, a large number of embedded devices are embedded in people's work, living space. In the face of the complexity of embedded system function, the demand of performance and power consumption is increasing, more and more embedded applications need the hardware environment based on multi-core processor.

Embedded systems also inevitably encounter power and heat dissipation problems, for embedded systems, multicore technology can provide higher processor performance, more efficient power utilization, and occupy less physical space, so many single-core processors do not have the advantage. In the past, the real-time research of embedded system mainly focused on task scheduling and switching, real-time task communication and fault tolerance, which did not involve the transformation of real-time task itself. The current multi-core optimization focuses on the throughput of the system rather than on the optimization of a real-time task. Multicore processors are now the mainstream of servers and desktops and will soon be widely used in high-end embedded areas.

Application in embedded real-time system

A. Introduction to Embedded systems and real-time systems

Embedded systems (Embedded system) is the abbreviation of embedded computer system, which is relative to the general computer systems. IEEE (International Electrical and Electronic Engineering Association) Definition: Embedded systems are "devices for control, monitoring, or ancillary equipment, machines and workshops". At present, the definition of comparative identity from the technical point of view, is based on the application as the center, computer technology as the basis, software hardware can be cut to adapt to the application system to function, reliability, cost, volume and power consumption requirements of the dedicated computer system. From the system point of view, it refers to the design of the hardware and software to complete complex functions, and make it tightly coupled to the computer system.

Definition of real-time system: whether a task is correct or not depends not only on its logical correctness, but also on its completion time. In a hard real-time system, time-out is meaningless, and in a soft real-time system it can tolerate such timeouts, resulting in a drop in quality (such as losing frames when playing video).

two. Application of multi-core technology in embedded real-time system

In the embedded system, the core problem is the real-time system, which is the fundamental difference between the embedded system and other systems. Nowadays, the research on improving the real-time of embedded system is a hot issue, and many researches are focused on improving the real-time of embedded system by improving the performance of embedded devices. However, with the development of integrated circuit technology, the performance of the processor can not be expected to improve the frequency, because the power consumption and the generated heat with the clock frequency increases exponentially. Considering the use of multiprocessor in the system to work together to accomplish tasks can greatly improve the efficiency of the whole system.

Multi-processor system is in a system containing multiple CPUs, each CPU independently processing one or a small amount of transactions, under the control of the operating system, control the data flow reasonably to complete the design requirements of the system. The structure of a multiprocessor system is shown in Figure 2-1. There are two main purposes of using multiprocessor: one is to use multiple processors for multitasking, and one is to rely on redundant processors and reassembly capabilities to improve system reliability, adaptability, and availability.

In multiprocessor systems, there are two types of relationships that can be divided between multiple processors: symmetric multiprocessor and asymmetric multi-processor. In symmetric multiprocessor systems, system resources such as memory and disk input/output (I/O) are shared by all microprocessors in the system, and workloads are evenly distributed across all available processors, avoiding certain tasks, some processors being busy, and others idle. When a new processor is added to the system, the performance of the symmetric multiprocessor system increases for all tasks. Symmetric multi-processor access to memory using a uniform storage access mode, the structure is shown in Figure 2-2, which is characterized by:

1. The physical memory is shared evenly by all processors;

2. All processors access any storage unit at the same time;

3. Each processor is available with a private cache;

4. Peripheral devices can also be shared in a certain form

In an asymmetric multiprocessor system, tasks and system resources are managed by different processors. For example, one processor handles I/O while the other processor handles network operating system tasks. Asymmetric multiprocessor systems are not load-balanced due to the different characteristics of different CPUs in a multiprocessor system and their controlled peripheral devices. One microprocessor may be busy, while another may be idle.

Analysis of core technical situation (2500 words)

A. Multi-core Technology

Multicore technology can be seen as a CPU-integrated technology that can integrate 2 or more CPUs on a single CPU processing module, but they are also separate physical CPUs.

Multi-core processors integrate multiple fully functional cores into the same chip, providing services to the entire chip as a unified structure, outputting performance. Multi-core processors, first by integrating multiple single-threaded processing cores or by integrating multiple simultaneous multithreading cores, enable the entire processor to concurrently execute several times as many threads or tasks as a single processor, which greatly improves the processor's parallel performance. Secondly, multiple cores are integrated in-chip, which greatly shortens the interconnection between the nuclei, reduces the delay between the inter-core communication, improves the communication efficiency and improves the data transmission bandwidth. Furthermore, multi-core structures effectively share resources, the utilization of on-chip resources has been improved, and the power consumption has been reduced with the decrease of the device. Finally, the multi-core structure is simple, easy to optimize design, and strong extensibility. These advantages ultimately drive the development of multicore and gradually replace the single processor into the mainstream.

two. Multi-processor Architecture

Multi-processor structure is used to process data information, and multi-processor work can enhance the speed and information processing ability of the control system. For example, the main task of the processor in the measurement and control system is data processing, of course, the data processing also contains a lot of I/O work. If a symmetric multiprocessor structure is used in the system, each processor averages the data that is returned by the acquisition point, which equates to multiple processors processing multiple data at the same time, which in the first place can radically shorten the processing times used by the data itself. Second, because multiprocessor is symmetric, the returned data can be processed on any processor, so the workload can be evenly distributed across all processors, eliminating the real-time bottlenecks described above. However, multiple processors are symmetric, how to assign packets to the processor, how to make the workload more balanced, which requires the scheduling algorithm in the operating system to control. Scheduling algorithms often use polling to allocate packets to the processor, which consumes a certain amount of time and does not help to improve the real-time of the system. In view of the disadvantages of the above structure, according to the characteristics of the embedded real-time monitoring system to monitor the point and the large data acquisition, the asymmetric multiprocessor structure and symmetric multiprocessor structure are combined, the design idea is as follows:

When a large amount of data is sent to a multiprocessor system, it is possible to set up a processor dedicated to the distribution of the packet, and the processor will monitor the working state of the other processors at all times, depending on the working state of the other processors to determine how to distribute the packets. This avoids the time it takes to poll each processor after a packet enters a multiprocessor system. Packets collected by each monitoring point are first queued for processing before the packet distribution processor. The packet distribution processor distributes the packets to each processing packet processor based on the priority of the packets in the queue and the working state of each processing packet processor. Because the packet distribution processor is only responsible for simple packet distribution work, the packet is not waiting for a long time on the front row of the processor. Packets are sent to the processing packet processor in an idle state after the packet is distributed. Each processing packet processor is only responsible for the processing of the data, which is a complete symmetric relationship. After the data is processed, the processed data is then transferred back to the remote server. The multi-processor architecture of the embedded measurement and control system is shown in Figure 2-3.

The packet distribution processor is asymmetric with the processing packet processor. The packet distribution processor is responsible for the distribution of the packets only. The distribution is based on the priority of the packet, which is allocated to the processing of the packet processor without polling, because polling consumes a certain amount of time. Priority-determined packets are queued in the buffer, waiting for the processor in the multiprocessor to handle the idle state. More than one processing packet processor is a fully equal relationship that is connected in a shared memory manner. If the management platform uses the common symmetric multiprocessor system, the data packets sent back by the collection point need to be distributed to the processing packet processor under the control of the system scheduling algorithm, the use of the scheduling algorithm will occupy certain system resources, and the implementation cost is very high. With the addition of the packet distribution processor, the processor is still in a symmetrical position, but the specific division of labor is different. The distribution is all done by the packet distribution processor, which allows each processing packet processor to concentrate on the packet, without the need for a scheduling algorithm, which is less expensive and more efficient.

three. Problems in multi-processor systems

Compared to a single-processor system, the implementation of multiprocessor architectures must consider and address some special issues:

1. Load issues between processors

There is no problem of uneven load in a single processor structure. However, in multiprocessor architectures, how to distribute the work more evenly to each processor makes the load of multi-processors more balanced is an important problem. In symmetric multiprocessor architectures, it is necessary to distribute the work equally to each processor, whereas for asymmetric processor architectures, each processor has its own specific work and is accountability at work, so it is not possible to distribute the load evenly in many cases. How to solve the problem of different allocation load in the system needs the operating system scheduling algorithm to realize.

2. Problems with inter-processor communication

There is no communication between processors in a single-processor fabric, only communication between processes. Each process appears to be parallel, but it is actually serial, because only one process is actually running at any one time. In such a system, synchronization and mutual exclusion between processes are relatively easy. No process scheduling occurs in the middle of a critical resource operation, and there is no interruption associated with the critical resource used to guarantee the mutex of the operation. In multiprocessor architectures, processors are not isolated from each other, but work together. Communication between the processors is required. The common methods used in the existing system are: using the two-port RAM to realize the communication between the CPUs, using the shared memory method to realize the communication between the CPUs, and using the bus method to realize the communication between the CPUs.

3. Consistency of content between cache and memory

In a single-processor architecture, caching is used only to improve the performance of the system by increasing the speed at which the CPU takes commands and reads and writes data. Caches are typically internal to the CPU and have very high access efficiencies. In multiprocessor architectures, because one CPU does not know when other CPUs will change what is stored, it can result in inconsistent data between the cache of a single CPU and the memory shared with multiple CPUs. Caching in a symmetric multiprocessor architecture is more important than in a single-processor architecture because it improves the speed of fetching and reading data, and reduces the number of CPU collisions when accessing memory. General memory is not allowed to be accessed by multiple CPUs at the same time, so in a symmetric multiprocessor architecture, there is usually a large cache per CPU, so that once the cache is full, it can run for quite a long time without having to read and write physical memory often.

4. Interrupt Handling Issues

In a single-processor fabric, all interrupt requests are responded to and processed by the same CPU. However, in multiprocessor architectures, because of the presence of multiple CPUs, it is very difficult to handle interrupts if they are managed using a set of operating systems. Some hardware is even needed to support it.

Trend

The most impressive feature of multi-core processors is the outstanding multitasking performance, which can improve productivity more quickly for users who have this need, in layman's terms, to allow computers to do more things at the same time. However, players familiar with the computer also clearly see, from single-core to dual-core, multi-tasking performance improvement is very obvious, but from the dual-core to four-core, this increase is relatively reduced, not a simple "double" relationship. Therefore, as the number of cores increases, how to improve the parallel processing efficiency of multi-core products on software and hardware will be a direction for upstream manufacturers to develop in the future.

From an energy point of view, an important aspect of multicore processor development should include how to conserve energy. What is currently being addressed or will be addressed is a multi-core processor that is dynamically implemented to use core quantities to conserve energy based on actual usage requirements. At present, the random opening or shielding core number has realized this function to a certain extent, and the opening and closing of the core number will be more and more energy-saving in the future.

The development of the microprocessor and DSP (digital processor) as the embedded "brain" is also the focus of the industry. However, the growing power consumption of a single-core processor is already close to the limit, and as a new multi-core processing technology in the germination stage, the multi-core structure can alleviate the difficulties faced by single-core. Vigorously developing multi-core technology will cause the embedded technology to take off again.

Conclusion

With the rapid development of consumer electronics market, the demand of consumers is more and more high, based on multi-core technology in the embedded system products should be to high-real-time, off-performance, low power, system can be cut, upgradeable and other aspects of development. There are many problems in the design and development of the embedded system with multi-core technology, the embedded system based on multi-core technology is a comprehensive design with high knowledge and technology content, and its leap development brings new challenges to the designers.

Reference documents

[1] Xiangqing, Wang Xin, Wenxin, Wang Perseverance. The new development of multi-core technology in the field of embedded. Wuhan. Journal of Instrumentation, 2006.6.

[2] Yujiand. Support for heterogeneous multi-core embedded real-time operating system Smartosek os-m. Zhejiang University. 2008.6.

[3] Hao Wang. Real-time research in embedded system. Shandong University, 2008.4.

[4] Zhingqing cool. Based on Rtems multi-core embedded system security and guidance technology. Harbin Institute of Technology. 2010.6.

[5] Vasanth Asokan. Multi-core processor Soc design to meet embedded system applications. Xilinx Corporation.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.