检索规则说明:AND代表“并且”;OR代表“或者”;NOT代表“不包含”;(注意必须大写,运算符两边需空一格)
检 索 范 例 :范例一: (K=图书馆学 OR K=情报学) AND A=范并思 范例二:J=计算机应用与软件 AND (U=C++ OR U=Basic) NOT M=Visual
作 者:郭辉[1]
机构地区:[1]常熟理工学院计算机科学与工程学院,江苏常熟215500
出 处:《计算机应用》2008年第S2期141-143,共3页journal of Computer Applications
摘 要:用Java语言定义了一个线程类,并用System类中的静态方法currentTimeMillis()计算时间,从而比较了用不同个数的线程求数组元素和的时间。通过实验证明在Linux、Windows 2000 Advanced Server和Windows XPProfessional系统中,在加数个数一定的条件下,并不是线程数越多,效率越高,而是要用合适的线程数。同时通过分析了在Windows XP Professional中,不同配置的计算机线程个数与加数的关系相似。A thread class was defined in the Java language,and the times of determining the summation of elements in an array in different number of threads were compared.The calculation cost was obtained with the static method currentTimeMillis() in the system class.Given the definite number of addend,based on the most popular operating systems such as Linux,Windows 2000 Advanced Server,Windows XP Professional,the experiments show that not the more the number of the threads is,the better the efficiency is.In the meanwhile,the relation between the number of the threads and the number of addends was discussed.Based on Windows XP Professional,the experiment shows that the relation between the number of the threads and the number of the addends is similar on PCs with different configuration.
分 类 号:TP311.52[自动化与计算机技术—计算机软件与理论]
正在载入数据...
正在载入数据...
正在载入数据...
正在载入数据...
正在载入数据...
正在载入数据...
正在载入数据...
正在链接到云南高校图书馆文献保障联盟下载...
云南高校图书馆联盟文献共享服务平台 版权所有©
您的IP:18.226.88.145