| With the development of multicore processor, data flow programming model is proposed to solve the complex programming problem of multi-core processors. In the existing data flow programming models, static scheduling is widely used. Although the performance is greatly improved, it does not apply to a lot of dynamic data flow applications. There are a number of languages that can be used to deal with dynamic streaming applications, but they do not use the parallelism of the program.In order to solve the problem of availability of data flow programming models, which can be used for flow applications of dynamic data exchange rate under the premise of taking into account the parallelism of programs, we design and implement a dataflow compiling system which combine dynamic scheduling and static scheduling. The compiling system uses COStream programs as its input. It analyzes the program and uses communications with dynamic rate to divide stream application to coarse-grained sub graphs. Then in sub graphs, static optimizations are used. The system assigns the computing units of sub graphs to CPU cores base on the workload of each computing unit and the using of computing resource. After stage division, the system allocates each computing unit to its corresponding pipeline stage. At runtime, each sub graph starts a thread on each processor core. The optimization of communications between threads avoids the expenses of multiple threads reading or writing memory at the same time. We use semphare to control the synchronization between threads and dynamically schedule each sub graph base on the dynamic rates of communications and the states of threads.Then we make the software pipeline scheduling and create the multi-thread code.In the experiment we choose common X86-64 as the experiment platform to test programs and analyze the result. The experimental result shows that the compiling system can realize dynamic stream applications. It expands the usability of the system and has acceleration effects. |