首页 | 本学科首页   官方微博 | 高级检索  
相似文献
 共查询到20条相似文献,搜索用时 125 毫秒
1.
基于多线程技术的异步串行通信的实现   总被引:2,自引:0,他引:2  
首先提出了目前异步串行通信技术中存在的问题及使用多线程技术解决这些问题的设想。重点讲述了C Builder提供的TThread线程对象类在串行通信编程中的使用方法,包括读线程、写线程的建立,串口通信程序流程的设计,最后提供了一个基于多线程技术的仿真程序。  相似文献   

2.
《电子技术应用》2016,(3):42-46
多核多线程处理器~([1])是并行技术的一个发展方向,基于多核多线程处理器,提出了一种时钟共享多线程处理器。该处理器有近邻通信和线程间通信两种通信机制,近邻通信采用近邻共享FIFO来传递信息,线程间通信通过线程间共享存储来传递信息,这样可以提高处理器的资源利用率和并行执行能力。  相似文献   

3.
采用C++面向对象思想,从快捷使用的角度,利用多线程将Vega Prime进行封装,主要解决了刷新线程与主线程同步、刷新线程暂停等关键技术,提供了主程序与Vega Prime之间的通信方法。  相似文献   

4.
在多线程工作环境中,提供线程级通信是十分必要的。本文通过分析和探讨PVM库在多线程通信环境中的不足,介绍一种基于标准PVM3版,利用pthread线程库优化线程级通信的LW_PVM通信库。  相似文献   

5.
Windows具有多线程处理能力,应用程序中可以创建多个线程,每个线程能够独立完成一个子任务。在通信程序中使用多线程技术,可提高程序的执行效率和反应速度。结合应用实例,介绍了VC++环境下基于Win32API的多线程、串口通信、异步I/O技术的原理和实现方法。  相似文献   

6.
Windows具有多线程处理能力,应用程序中可以创建多个线程,每个线程能够独立完成一个子任务。在通信程序中使用多线程技术,可提高程序的执行效率和反应速度。结合应用实例,介绍了VC++环境下基于Win32API的多线程、串口通信、异步I/O技术的原理和实现方法。  相似文献   

7.
多线程在同轴度测量中的应用   总被引:1,自引:0,他引:1  
简要介绍了直升机传动系统同轴度测量设备.根据测量结果的实时显示要求,系统程序中采用了多线程技术.第一线程(主线程)负责与外设通信、结果处理及与用户交互;第二线程负责图像处理.实践表明两线程并行工作时视频图像及测量结果的显示满足系统的实时性要求.  相似文献   

8.
多线程技术及其在串口通信中的应用   总被引:14,自引:0,他引:14  
首先阐述了线程的概念及其特点,然后探讨了多线程技术在串口通信中的应用,提出并实现了一个基于多线程的串口通信模型,最后指出了需要解决的一些问题。  相似文献   

9.
多线程应用程序中的同步控制技术及应用   总被引:2,自引:0,他引:2  
设计多线程应用程序必须在线程之间保持一定的同步关系,才能使用户能够对独立运行的线程进行有效的控制,以保证线程的安全运行。这是多线程编程中最关键也是最复杂的问题。本文将介绍多线程间的同步控制方法,并给出了在Delphi中的应用实例。  相似文献   

10.
基于Qt的多线程技术应用与研究   总被引:2,自引:0,他引:2  
图形用户界面(GUI)在嵌入式系统的应用非常广泛,为不影响图形界面的响应速度可以引入多线程技术。Qt是一个支持多线程、跨平台的GUI软件,在嵌入式系统的图形用户界面中应用广泛。对Qt的多线程技术进行讨论,研究Qt中线程的通信机制,并简要介绍了在Qt中创建一个线程的步骤。  相似文献   

11.
With recent efforts to build foundational certified software systems, two different approaches have been proposed to certify thread context switching. One is to certify both threads and context switching in a single logic system, and the other certifies threads and context switching at different abstraction levels. The former requires heavyweight extensions in the logic system to support first-class code pointers and recursive specifications. Moreover, the specification for context switching is very complex. The latter supports simpler and more natural specifications, but it requires the contexts of threads to be abstracted away completely when threads are certified. As a result, the conventional implementation of context switching used in most systems needs to be revised to make the abstraction work. In this paper, we extend the second approach to certify the conventional implementation, where the clear abstraction for threads is unavailable since both threads and context switching hold pointers of thread contexts. To solve this problem, we allow the program specifications for threads to refer to pointers of thread contexts. Thread contexts are treated as opaque structures, whose contents are unspecified and should never be accessed by the code of threads. Therefore, the advantage of avoiding the direct support of first-class code pointers is still preserved in our method. Besides, our new approach is also more lightweight. Instead of using two different logics to certify threads and context switching, we employ only one program logic with two different specifications for the context switching. One is used to certify the implementation itself, and the more abstract one is used as an interface between threads and context switching at a higher abstraction level. The consistency between the two specifications are enforced by the global program invariant.  相似文献   

12.
描述了网络通信原理概念及原理,并使用Java多线程实现了网络聊天室,程序综合了网络、线程、集合、文件输入输出流等多种Java知识.  相似文献   

13.
On Migrating Threads   总被引:1,自引:0,他引:1  
Based on the notion of persistent threads in Tycoon (Matthes and Schmidt, 1994), we investigate thread migration as a programming construct for building activity-oriented distributed applications. We first show how a straight-forward extension of a higher-order persistent language can be used to define activities that span multiple (semi-) autonomous nodes in heterogeneous networks. In particular, we discuss the intricate binding issues that arise in systems where threads are first-class language citizens that may access local and remote, mobile and immobile resources.We also describe how our system model can be understood as a promising generalization of the more static architecture of first-order and higher-order distributed object systems. Finally, we give some insight into the implementation of persistent and migrating threads and we explain how to represent bindings to ubiquitous resources present at each node visited by a migrating thread on the network to avoid excessive communication or storage costs.  相似文献   

14.
在DNA序列相关物理特性的模拟计算中,计算时间随DNA比较序列数的增加而延长。该研究成功应用分布式运算实现了对DNA序列间相关物理特性的模拟计算。该研究表明:对较大的DNA序列进行比较时,使用JavaParty和增加线程数能有效地缩短运行时间。  相似文献   

15.
分析了Krinke切片算法对循环体内嵌套有线程的程序结构会产生切片不精确的现象,认为其原因是该算法对线程间数据依赖的定义过于粗糙,且对程序行为约束不够。该文提出一种新算法,在并发程序内部表示中,增加跨线程边界循环-承载数据依赖,并引入区域化执行证据约束程序行为。实例研究表明,该算法克服了Krinke算法的不精确现象。  相似文献   

16.
We present the design and implementation of Arachne, a threads system that can be interfaced with a communications library for multithreaded distributed computations. In particular, Arachne supports thread migration between heterogeneous platforms, dynamic stack size management, and recursive thread functions. Arachne is efficient, flexible, and portable-it is based entirely on C and C++. To facilitate heterogeneous thread operations, we have added three keywords to the C++ language. The Arachne preprocessor takes as input code written in that language and outputs C++ code suitable for compilation with a conventional C++ compiler. The Arachne runtime system manages all threads during program execution. We present some performance measurements on the costs of basic thread operations and thread migration in Arachne and compare these to costs in other threads systems  相似文献   

17.
Win32操作系统为我们提供了在应用程序中执行多个线程的能力。本文介绍Win32操作系统中进程和线程的概念,然后讨论Delphi所提供的TThread线程类,最后,说明多线程应用程序的开发。  相似文献   

18.
同时多线程处理器允许多个线程同时执行,一方面提高了处理器的性能,另一方面也为通过线程冗余执行来容错提供了支持.冗余多线程结构将线程复制成两份,二者独立执行,并比较结果,从而实现检错或者容错.冗余多线程结构主要采用ICOUNT调度策略来解决线程间资源共享问题.然而这种策略有可能造成"饥饿"现象,并降低处理器吞吐率.提出一...  相似文献   

19.
Multiple-context processors provide register resources that allow rapid context switching between several threads as a means of tolerating long communication and synchronization latencies. When scheduling threads on such a processor, we must first decide which threads should have their state loaded into the multiple contexts, and second, which loaded thread is to execute instructions at any given time. In this paper we show that both decisions are important, and that incorrect choices can lead to serious performance degradation. We propose thread prioritization as a means of guiding both levels of scheduling. Each thread has a priority that can change dynamically, and that the scheduler uses to allocate as many computation resources as possible to critical threads. We briefly describe its implementation, and we show simulation performance results for a number of simple benchmarks in which synchronization performance is critical.  相似文献   

20.
Speculative multithreading (SpMT) promises to be an effective mechanism for parallelizing nonnumeric programs, which tend to have irregular and pointer-intensive data structures and complex flows of control. Proper thread formation is crucial for obtaining good speedup in an SpMT system. This paper presents a compiler framework for partitioning a sequential program into multiple threads for parallel execution in an SpMT system. This framework is very general and supports speculative threads, nonspeculative threads, loop-centric threads, and out-of-order thread spawning. It is therefore useful for compiling for a wide variety of SpMT architectures. For effective partitioning of programs, the compiler uses profiling, interprocedural pointer analysis, data dependence information, and control dependence information. The compiler is implemented on the SUIF-MachSUIF platform. A simulation-based evaluation of the generated threads shows that the use of nonspeculative threads and nonloop speculative threads provides a significant increase in speedup for nonnumeric programs.  相似文献   

设为首页 | 免责声明 | 关于勤云 | 加入收藏

Copyright©北京勤云科技发展有限公司  京ICP备09084417号