多线程------外文翻译.doc

约6页DOC格式手机打开展开

多线程------外文翻译,1.multithreaded overviewin computer programming, a basic concept of multiple tasks at the same time try to control. many of the programs are required to design ...
编号:10-270295大小:42.00K
分类: 论文>外文翻译

内容介绍

此文档由会员 wanli1988go 发布

1. Multithreaded overview
In computer programming, a basic concept of multiple tasks at the same time try to control. Many of the programs are required to design program can stop the job in hand, to deal with other problems, again to return to main process. Through various ways to achieve this objective. In the beginning, the master machine low-level languages of programmers to write some "interrupt service routines", the main process is suspended by the interruption of the hardware level to realize. Although this is a useful method, but make up the transplant program is hard, which caused the other kind of costly problems. Interrupt for those very strong missions real-time is very necessary. But for many other problems, only request will be divided into


independent operation of the procedure of pieces, make the process can more quickly respond to user request.



1.多线程概述
在计算机编程中,一个基本的概念就是同时对多个任务加以控制。许多程序设计问题都要求程序能够停下手头的工作,改为处理其他一些问题,再返回主进程。可以通过多种途径达到这个目的。最开始的时候,那些掌握机器低级语言的程序员编写一些“中断服务例程”,主进程的暂停是通过硬件级的中断实现的。尽管这是一种有用的方法,但编出的程序很难移植,由此造成了另一类的代价高昂问题。中断对那些实时性很强的任务来说是很有必要的。但对于其他许多问题,只要求将问题划分进入独立运行的程序片断中,使整个程序能更迅速地响应用户的请求。
  最开始,线程只是用于分配单个处理器的处理时间的一种工具。但假如操作系统本身支持多个处理器,那么每个线程都可分配给一个不同的处理器,真正进入“并行运算”状态。从程序设计语言的 角度看,多线程操作最有价值的特性之一就是程序员不必关心到底使用了多少个处理器。程序在逻辑意义上被分割为数个线程;假如机器本身安装了多个处理器,那么程序会运行得更快,毋需作出