首页 | 本学科首页   官方微博 | 高级检索  
相似文献
 共查询到20条相似文献,搜索用时 93 毫秒
1.
由于在Delphi环境中没有提供串行通信控件,本文介绍了用Delphi7.0实现的Windows95/NT环境下基于线程的串行通信程序设计。  相似文献   

2.
本文介绍了Win95下线程多任务的基本原理和串行通信中使用的主要API函数,并使用线程的方法在C++Builder下开发实时性要求很高的Win95下的串行通信程序。  相似文献   

3.
本文介绍了用Delphi4.0实现的Win32环境下基于线程的串行通讯程序能适当降低数据丢失率以及提高系统可靠性,并给出了一个通讯程序实例。  相似文献   

4.
本文介绍了一种WIN95环境下基于线程的实时串行通信的实现方法,并给出了用VC++50编写的串行通信程序。  相似文献   

5.
浅析Win32串行通信程序   总被引:3,自引:1,他引:2  
在实际工程设计过程中,经常会遇到编写串行通讯程序的问题。由于编写Windows串行通信程序要用到大量的WindowsAPI数据,再加上Win32串行通信与Win16串行通信有很大区别,所以,编写串行通讯程序的难度就比较大。本文详细介绍编写Win32串行通信程序的具体步骤。  相似文献   

6.
基于多线程技术的异步串行通信的实现   总被引:2,自引:0,他引:2  
首先提出了目前异步串行通信技术中存在的问题及使用多线程技术解决这些问题的设想。重点讲述了C Builder提供的TThread线程对象类在串行通信编程中的使用方法,包括读线程、写线程的建立,串口通信程序流程的设计,最后提供了一个基于多线程技术的仿真程序。  相似文献   

7.
本文详细介绍了在Win32环境下实现32位串行通信的方法,并且给出了在Windows NT环境下用Visual C++4.2编写的MFC32应用程序。  相似文献   

8.
智能开关柜监控系统的数据传输包括综合控制模块与工业触摸屏之间的RS232全双工串行通信,与其他测量模块的RS485半双工串行通信。综合控制模块需要实现数据接收、处理和发送功能。介绍一种在综合控制模块的控制中运用数据缓存技术和多线程处理技术来提高系统的数据传输效率的方法。数据缓存技术主要包括存储算法和提取帧算法。多线程处理包括RS232数据的接收线程、处理线程、发送线程和RS485的数据收发线程和处理线程等。  相似文献   

9.
讨论了在Visual FoxPro环境下实现串行通信的方法,详细介绍了如何利用通信控件MSCOMM32.OC来设计串行通信程序的方法。  相似文献   

10.
基于Windows CE的GPS串行通信的实现   总被引:1,自引:0,他引:1  
简单介绍了Windows CE下实现GPS串行通信的过程和一般方法.通过比较互斥对象和事件对象两种线程同步方法,结合GPS串行通信的实际需求,设计了一种基于事件对象的解决Windows CE下读/写操作冲突的方法.实验表明该方法有效,并为Windows CE下其他设备串行通信的实现提供了参考.  相似文献   

11.
基于线程池技术的文件传输模型的改进   总被引:2,自引:2,他引:0  
本文首先就涉及的文件传输模型和线程池技术作了分析,在考虑了文件传输的特点后,结合线程池技术来对原来的文件传输模型提出了一种改进方案,从而提高了传输效率,并改善了系统的性能。  相似文献   

12.
Threads of parallel applications need to communicate in order to fulfill their tasks. The communication performance between the cores in modern multi‐core architectures differs because of the memory and interconnection hierarchies. In these architectures, it is important to map the threads of parallel applications by taking into account the communication between them, to improve their performance and energy consumption. In parallel applications based on shared memory, communication is implicit, which makes it difficult to detect the communication pattern between the threads. In this paper, we introduce a new lightweight mechanism to detect the communication pattern between threads of shared memory applications using the translation lookaside buffer. Our mechanism relies on hardware features, which make it transparent to the programmer and allow the detection to be performed by the operating system during the execution of the application. We also developed a heuristic mapping algorithm that uses the detected pattern to dynamically map the threads to cores. Experiments were performed with applications from the NAS‐OMP and PARSEC parallel benchmark suites in a simulated machine as well as a real machine. Results show that our mechanism can substantially improve parallel application performance, as well as processor and DRAM energy consumption. Copyright © 2015 John Wiley & Sons, Ltd.  相似文献   

13.
Java 虚拟机用户级多线程的设计与实现   总被引:5,自引:0,他引:5  
丁宇新  程虎 《软件学报》2000,11(5):701-706
详细介绍了国产开放系统平台Java虚拟机多线程的设计与实现.在线程调度上,采用带有独立队列的静态级别轮巡调度,较好地解决了独立循环线程的调度问题.对于线程的同步,采用了哈希混合锁的设计方案.实验结果证明,该锁具有空间小、执行效率高等特点.  相似文献   

14.
本文介绍了应用MFC进行Windows多线程编程的原理和方法,特别阐述了线程间通信的实现方法。  相似文献   

15.
在虚拟分布式共享存储系统(SVM)中,为了保证程序在分布式环境下正确运行,维护存储一致性是关键问题之一,本文提出了一种全新的一致性模型-线程一致性模型(TC),并阐述了基于TC模型的虚拟分布式共享存储系统MTK的实现,线程一致性模型从操作系统内核的角度出发,把程序执行过程中的同步点与线程状态结合起来考虑存储一致 性问题,有利于数据局部性的开发,另外,多线程体系结构的一个显著优势就是能把计算和通信重叠起来,从而有效地隐藏通信延迟,在内核级实现线程一致性模型时,线程 及同步原语(锁、栅栏)都维护一个写记录,同时定义了同构唤醒线程簇。  相似文献   

16.
In parallel to the changes in both the architecture domain–the move toward chip multiprocessors (CMPs)–and the application domain–the move toward increasingly data-intensive workloads–issues such as performance, energy efficiency and CPU availability are becoming increasingly critical. The CPU availability can change dynamically due to several reasons such as thermal overload, increase in transient errors, or operating system scheduling. An important question in this context is how to adapt, in a CMP, the execution of a given application to CPU availability change at runtime. Our paper studies this problem, targeting the energy-delay product (EDP) as the main metric to optimize. We first discuss that, in adapting the application execution to the varying CPU availability, one needs to consider the number of CPUs to use, the number of application threads to accommodate and the voltage/frequency levels to employ (if the CMP has this capability). We then propose to use helper threads to adapt the application execution to CPU availability change in general with the goal of minimizing the EDP. The helper thread runs parallel to the application execution threads and tries to determine the ideal number of CPUs, threads and voltage/frequency levels to employ at any given point in execution. We illustrate this idea using four applications (Fast Fourier Transform, MultiGrid, LU decomposition and Conjugate Gradient) under different execution scenarios. The results collected through our experiments are very promising and indicate that significant EDP reductions are possible using helper threads. For example, we achieved up to 66.3%, 83.3%, 91.2%, and 94.2% savings in EDP when adjusting all the parameters properly in applications FFT, MG, LU, and CG, respectively. We also discuss how our approach can be extended to address multi-programmed workloads.  相似文献   

17.
We have designed and implemented a light‐weight process (thread) library called ‘Lesser Bear’ for SMP computers. Lesser Bear has high portability and thread‐level parallelism. Creating UNIX processes as virtual processors and a memory‐mapped file as a huge shared‐memory space enables Lesser Bear to execute threads in parallel. Lesser Bear requires exclusive operation between peer virtual processors, and treats a shared‐memory space as a critical section for synchronization of threads. Therefore, thread functions of the previous Lesser Bear are serialized. In this paper, we present a scheduling mechanism to execute thread functions in parallel. In the design of the proposed mechanism, we divide the entire shared‐memory space into partial spaces for virtual processors, and prepare two queues (Protect Queue and Waiver Queue) for each partial space. We adopt an algorithm in which lock operations are not necessary for enqueueing. This algorithm allows us to propose a scheduling mechanism that can reduce the scheduling overhead. The mechanism is applied to Lesser Bear and evaluated by experimental results. Copyright © 2001 John Wiley & Sons, Ltd.  相似文献   

18.
FairThreads introduces fair threads which are executed in a cooperative way when linked to a scheduler, and in a preemptive way otherwise. Constructs exist for programming the dynamic linking/unlinking of threads during execution. Users can profit from the cooperative scheduling when threads are linked. For example, data only accessed by the threads linked to the same scheduler does not need to be protected by locks. Users can also profit from the preemptive scheduling provided by the operating system (OS) when threads are unlinked, for example to deal with blocking I/Os. In the cooperative context, for the threads linked to the same scheduler, FairThreads make it possible to use broadcast events. Broadcasting is a powerful, abstract, and modular means of communication. Basically, event broadcasting is made possible by the specific way threads are scheduled by the scheduler to which they are linked (the ‘fair’ strategy). FairThreads give a way to deal with some limitations of the OS. Automata are special threads, coded as state machines, which do not need the allocation of a native thread and which have efficient execution. Automata also give a means to deal with the limited number of native threads available when large numbers of concurrent tasks are needed, for example in simulations. Copyright © 2005 John Wiley & Sons, Ltd.  相似文献   

19.
线程池技术应用研究   总被引:1,自引:0,他引:1  
目前几乎所有操作系统都支持多线程的工作方式,以提高系统的处理能力.本文研究了采用线程池技术可以提高服务器程序性能,并通过一个实例分析了线程池技术中线程池尺寸和任务数对服务器程序的性能影响.  相似文献   

20.
多线程的效率   总被引:3,自引:0,他引:3  
用Java语言定义了一个线程类,并用System类中的静态方法eurrentTimeMillis()计算时间,从而比较了用不同个数的线程求数组元素和的时间.通过实验证明在LimLx、Windows 2000 Advanced Server和Windows XPProfessional系统中,在加数个数一定的条件下,并不是线程数越多,效率越高.而是要用合适的线程数.同时通过分析了在Windows XP Professional中,不同配置的计算机线程个教与加数的关系相似.  相似文献   

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

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