-
各个线程任务分配是这样实现的。在开始下载时,文件平均分成若干块进行下载。如第一个线程一开始的任务是从文件的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
-
delphi服务端和客户端的连接.rar
delphi服务端和客户端的连接.rar-delphi client service and client connectivity. rar
- 2022-08-13 18:11:38下载
- 积分:1
-
这是一个关于XML的程序作业,包括XML和XSL两部分,以及XML中经常用到的各种属性,有助于XML初学者学习...
这是一个关于XML的程序作业,包括XML和XSL两部分,以及XML中经常用到的各种属性,有助于XML初学者学习-This is a process of XML operations, including XML and XSL two elements, and XML often use the various attributes, help beginners learn XML
- 2022-02-04 08:47:57下载
- 积分:1
-
可以检测网络状态,包挂是否伤亡,打开生么网址很好
可以检测网络状态,包挂是否伤亡,打开生么网址很好-can detect network state, linking packet casualties, the website opened Mody good health
- 2023-06-18 18:50:03下载
- 积分:1
-
此同学录系统为各在校计算机专业学生课程设计所准备
此同学录系统为各在校计算机专业学生课程设计所准备-this college system for the computers in the school curriculum design students prepared
- 2022-07-04 02:21:27下载
- 积分:1
-
聊天工具,可以实现悄悄话功能,此是改动网上的小程序
聊天工具,可以实现悄悄话功能,此是改动网上的小程序-Chat tools, whispering function can be achieved, this is a small program changes online
- 2022-04-01 08:54:10下载
- 积分:1
-
记数统计功能,全面记载浏览者的ip,操作系统,浏览时间等参数
记数统计功能,全面记载浏览者的ip,操作系统,浏览时间等参数-counting statistics functions, comprehensive records of surfers ip, operating systems, time and other parameters View
- 2022-01-26 07:31:41下载
- 积分:1
-
< 网络通信编程实用>>一书的源代码。有vc各种通信编成的实例。...
< 网络通信编程实用>>一书的源代码。有vc各种通信编成的实例。-lt; Lt; Network programming practical gt; Gt; A book of the source code. There are various communications into vc examples.
- 2022-05-31 20:32:35下载
- 积分:1
-
ASP编写,网络时时人事薪资管理系统,数据库采用SQL方式。
ASP编写,网络时时人事薪资管理系统,数据库采用SQL方式。-ASP preparation, constant network management personnel pay systems, databases using SQL methods.
- 2022-03-04 13:19:27下载
- 积分:1
-
局域网点对点语音聊天程序,只要输入对方的IP地址就可以聊天了...
局域网点对点语音聊天程序,只要输入对方的IP地址就可以聊天了-LAN peer-to-peer voice chat program, as long as the importation of each other"s IP addresses on a chat
- 2022-11-10 18:15:03下载
- 积分:1