首页| JavaScript| HTML/CSS| Matlab| PHP| Python| Java| C/C++/VC++| C#| ASP| 其他|
购买积分 购买会员 激活码充值

您现在的位置是:虫虫源码 > 其他 > multithreaded process as a multi

multithreaded process as a multi

  • 资源大小:2.50 kB
  • 上传时间:2021-06-30
  • 下载次数:0次
  • 浏览次数:1次
  • 资源积分:1积分
  • 标      签: Linux-Unix program others

资 源 简 介

多线程程序作为一种多任务、并发的工作方式,有以下的优点:   1) 提高应用程序响应。这对图形界面的程序尤其有意义,当一个操作耗时很长时,整个系统都会等待这个操作,此时程序不会响应键盘、鼠标、菜单的操作,而使用多线程技术,将耗时长的操作(time consuming)置于一个新的线程,可以避免这种尴尬的情况。   2) 使多CPU系统更加有效。操作系统会保证当线程数不大于CPU数目时,不同的线程运行于不同的CPU上。   3) 改善程序结构。一个既长又复杂的进程可以考虑分为多个线程,成为几个独立或半独立的运行部分,这样的程序会利于理解和修改。 -multithreaded process as a multi-task, complicated by the way, has the following advantages : 1) improve application response. This graphical interface is especially meaningful, when a very long time-consuming operation, the entire system will wait for the operation, this procedure will not respond to keyboard, mouse, the menu of operations, and the use of multithreading technology, long will be time-consuming operation (time consuming) under a new thread, avoided this embarrassing situation. 2) multi-CPU system more effective. When the operating system would ensure that not more than a few threads CPU number of different threads running on different CPUs. 3) to improve program structure. A long and complex

文 件 列 表

pthread_examples
dthread2.c
dthread3.c
dthread4.c
dthread5.c
Makefile
dthread1.c

相 关 资 源

您 可 能 感 兴 趣 的

同 类 别 推 荐

VIP VIP
0.357060s