-
各个线程任务分配是这样实现的。在开始下载时,文件平均分成若干块进行下载。如第一个线程一开始的任务是从文件的0位置开始下载一直到72908位置处。线程1每次下载...
各个线程任务分配是这样实现的。在开始下载时,文件平均分成若干块进行下载。如第一个线程一开始的任务是从文件的0位置开始下载一直到72908位置处。线程1每次下载一块数据后就要调整任务,如第一次下载了20800字节的数据,那么线程1的任务将改为:20800-72908。如此下去,直到任务为72908-72908时表示线程1完成了当前的下载任务。此时,线程1就分析各个线程的任务,找出任务最为繁忙的一个线程:如线程3:14816-218724。那么线程1就自动去调整任务,拿50%的任务来再次下载。周而复始直到各个线程都完成任务。不过这里有一点需要注意:为了避免重复下载部分数据,在调整任务的时候,起始的文件便移量必须加上接受缓冲器的字节数,因为如前面所举的列子来看。线程1和线程3在平衡负载的时候,线程正在下载数据,如果所剩的数据比接受缓冲器的大小还小,线程1和线程3的部分下载数据将会重复。
在调整任务和分析任务的时候,会发现一个问题。就是读取文件数据太过频繁。于是我用了一个数据结构。在下载文件的过程中始终打开配置文件,这样速度提高了很多。在文件下载完毕后关闭文件。-various threads assignment is achieved. At the beginning of the download, the paper divided into a number of pieces of the download. As a thread of a task is to start from the position paper of 0 to start the download has 72,908 locations Department. Thread a download each one will have to adjust the data tasks, such as the first downloaded 20,800 gigabytes of data, then threaded a task will be re :20800- 72908. This situation continues until the mandate of 72908-72908 said threaded a completion of the cu
- 2022-03-20 03:50:55下载
- 积分:1
-
wTerm-2.tar
wTerm-2 easy windows terminal
- 2011-06-09 21:12:39下载
- 积分:1
-
aiutils
Linux driver , Aic94xx SAS/SATA driver register access.
- 2013-03-04 13:12:31下载
- 积分:1
-
这是一个用vC++开发的八十分源码!
但是还没完全开发好.
有兴趣的可以参考一下...
这是一个用vC++开发的八十分源码!
但是还没完全开发好.
有兴趣的可以参考一下
-This is a used vC++ Developed eight great source! But not yet fully developed well. Are interested can refer to
- 2022-09-11 19:40:03下载
- 积分:1
-
qifei
起飞文章管理系统采用一级分类,界面简洁大方,功能简单易用,可远程自动上传图片,删除文章后,文章相关图片也一并删除减少垃圾文件的存在。后台管理入口http://域名/admin 用户名和密码都是admin(Takeoff article management system using a classification, simple and elegant interface, easy to use functions, remote automatically upload pictures, delete the article, the article s picture also be deleted to reduce the presence of junk files. Manage entry http: // domain/admin user name and password are admin
)
- 2016-05-15 19:38:12下载
- 积分:1
-
LBM-simulated-natural-convection
格子Boltzmann方法模拟封闭方腔热自然对流(Lattice Boltzmann method to simulate a closed square cavity hot natural convection lattice Boltzmann method to simulate a closed square cavity natural convection heat)
- 2021-02-19 15:39:44下载
- 积分:1
-
shellicon_demo
从windows程序种查找图标资源,提取图标。(Find the icon resource the windows program, extract the icon.)
- 2017-03-14 01:36:13下载
- 积分:1
-
这是一个数据库转换的VC程序
这是一个数据库转换的VC程序-This is a database conversion VC Program
- 2023-08-04 17:10:03下载
- 积分:1
-
是一个获取网络DNS、子网掩码、网卡地址的综合程序,注意该程序包括了第四章的4.2节、4.3节的两个程序。(最好在win98中测试)。
是一个获取网络DNS、子网掩码、网卡地址的综合程序,注意该程序包括了第四章的4.2节、4.3节的两个程序。(最好在win98中测试)。-access to a network of DNS, subnet mask, Ethernet addresses the integrated process, including attention to the procedures of Chapter IV of 4.2, 4.3 of the two procedures. (Preferably in the win98 test).
- 2022-03-10 14:35:19下载
- 积分:1
-
a very useful network programming, which is equivalent to a mail server, able to...
一个很有用的网络程序,相当于一个邮件服务器,能实现邮件的转发-a very useful network programming, which is equivalent to a mail server, able to forward mail
- 2022-03-23 04:46:12下载
- 积分:1