Example Suppose it takes 4. 5 microseconds,also written 4. 5 s,to transfer some information across the bus from one component to another. (a)How many seconds are required for the transfer?(b)How many transfers can take place during one minute?[2]
(a)A time of 4. 5 s is 4. 5 × 10-6 from Table 1-1 or 0. 000 0045 s.(b)Because there
are 60 seconds in one minute,the number of times the transfer can occur is(60 s)/(0. 000 004 5 s/transfer)or 13 300 000 transfers. Note that since the original value was given with two significant figures,the result should not be given to more than two or three significant figures.
Table 1-1 shows that in the metric system the prefix kilo-is 1 000 and mega-is 1 000 000. But in computer science,a kilo-is 210 or 1024.The different between 1 000 and 1 024 is less than 3%,so you can think of a computer science kilo-as being about 1 000 even though it is a little more. The same applies to mega-and giga-,as in Table 1-2. This time,the approximation is a little worse,but for mega-it is still within 5%.
一台大型机的CPU往往要占用一个机柜。它的输入输出(I/O)设备和存储器可能塞满一个屋子。微型计算机可以小到能放在桌子上或公文包里。随着技术的进步,以前只能在大型机上进行的大量处理工作,现在可以在更小的机器上进行。很多过去只能在小型或大型机上做的工作现在微型计算机都能完成。
上面所述是按物理尺寸的大小不是按存储器的大小来分类的。计算机系统用户通常更关心存储器的大小,因为这更直接地表明硬件所能完成的有效工作量。运算速度对用户来说是另一个重要特性。一般来讲,用户需要快速的CPU和大容量存储器,而I/O设备和主存储器的体积则要小。
因而,在计算机科学家研究问题时,他们所关心的是空间和时间-一计算机系统内部的必要空间是为了存储问题,而解决问题需要时间。他们通常使用表1-1中所列的词头去表示空间或时间量的大或小。
【例】假设在总线上从一个部件向另一个部件传送某个信息需要4. 5微秒,也写成4.5 s。
(a)传送需要多少秒钟?
(b)1分钟能传送多少次?
解:(a)如表1-1所示,4. 5 s是4. 5× 10-6s,即0. 000 004 5秒;
(b)由于1分钟有60秒,所以传送次数是60s/0.000 004 5s,即13 300 000。请注意,由于原始数只有两位有效值,所以结果也不应超过两位或三位有效数。
表1-1表明在量度系统中,词头kilo为1000, mega为1 000 000。但在计算机科学中, kilo为210 或1024。1000与1024之间的误差不到3%,因而可以认为计算机科学中kilo大约为1000,虽然它稍小一些。对于mega和giga的情形也是如此,如表1-2所示。这时,近似程度稍差一些,但对mega而言,仍在5%以内。
责任编辑:小草