共查询到20条相似文献,搜索用时 109 毫秒
1.
基于多线程技术的异步串行通信的实现 总被引:2,自引:0,他引:2
曹罗生 《计算机应用与软件》2004,21(6):60-62
首先提出了目前异步串行通信技术中存在的问题及使用多线程技术解决这些问题的设想。重点讲述了C Builder提供的TThread线程对象类在串行通信编程中的使用方法,包括读线程、写线程的建立,串口通信程序流程的设计,最后提供了一个基于多线程技术的仿真程序。 相似文献
2.
3.
采用C++面向对象思想,从快捷使用的角度,利用多线程将Vega Prime进行封装,主要解决了刷新线程与主线程同步、刷新线程暂停等关键技术,提供了主程序与Vega Prime之间的通信方法。 相似文献
4.
在多线程工作环境中,提供线程级通信是十分必要的。本文通过分析和探讨PVM库在多线程通信环境中的不足,介绍一种基于标准PVM3版,利用pthread线程库优化线程级通信的LW_PVM通信库。 相似文献
5.
郭小梅 《数字社区&智能家居》2009,(27)
Windows具有多线程处理能力,应用程序中可以创建多个线程,每个线程能够独立完成一个子任务。在通信程序中使用多线程技术,可提高程序的执行效率和反应速度。结合应用实例,介绍了VC++环境下基于Win32API的多线程、串口通信、异步I/O技术的原理和实现方法。 相似文献
6.
郭小梅 《数字社区&智能家居》2009,(9X):7583-7586
Windows具有多线程处理能力,应用程序中可以创建多个线程,每个线程能够独立完成一个子任务。在通信程序中使用多线程技术,可提高程序的执行效率和反应速度。结合应用实例,介绍了VC++环境下基于Win32API的多线程、串口通信、异步I/O技术的原理和实现方法。 相似文献
7.
8.
9.
多线程应用程序中的同步控制技术及应用 总被引:2,自引:0,他引:2
设计多线程应用程序必须在线程之间保持一定的同步关系,才能使用户能够对独立运行的线程进行有效的控制,以保证线程的安全运行。这是多线程编程中最关键也是最复杂的问题。本文将介绍多线程间的同步控制方法,并给出了在Delphi中的应用实例。 相似文献
10.
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.
刘艳梅 《电脑编程技巧与维护》2013,(24):68-70
描述了网络通信原理概念及原理,并使用Java多线程实现了网络聊天室,程序综合了网络、线程、集合、文件输入输出流等多种Java知识. 相似文献
13.
On Migrating Threads 总被引:1,自引:0,他引:1
Bernd Mathiske Florian Matthes Joachim W. Schmidt 《Journal of Intelligent Information Systems》1997,8(2):167-191
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.
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. 相似文献