计算机组成结构化方法 在线阅读,计算机组成结构化方法答案.doc

STRUCTURED

COMPUTER ORGANIZATION

FIFTH EDITION

PROBLEM SOLUTIONS

ANDREW S. TANENBAUM

Vrije Universiteit

Amsterdam, The Netherlands

PRENTICE HALL

UPPER SADDLE RIVER, NJ 07458

PROBLEM SOLUTIONS 1

SOLUTIONS TO CHAPTER 1 PROBLEMS

1. a. A translator converts programs in one language to another.

b. An interpreter carries out a program instruction by instruction.

c. A virtual machine is a conceptual machine, one that does not exist.

2. An interpreter executes a program by fetching the first instruction, carrying it

out, then fetching the next one, and so on. A translator first converts the original

program into an equivalent one in another language and then runs the

new program.

3. It is possible, but there are problems. One difficulty is the large amount of

code produced. Since one ISA instruction does the work of many microinstructions,

the resulting program will be much bigger. Another problem is

that the compiler will have to deal with a more primitive output language,

hence it, itself, will become more complex. Also, on many machines, the

microprogram is in ROM. Making it user-changeable would require putting it

in RAM, which is much slower than ROM. On the positive side, the resulting

program might well be much faster, since the overhead of one level of

interpretation would be eliminated.

4. During the detailed design of a new computer, the device and digital logic

levels of the new machine may well be simulated on an old machine, which

puts them around level 5 or 6.

5. Each level of interpretation slows down the machine by a factor of n /m.

Thus the execution times for levels 2, 3, and 4 are kn /m, kn 2 /m2, and

kn 3 /m3, respectively.

6. Each additional level of interpretation costs something in time. If it is not

needed, it should be avoided.

7. You lose a factor of n at each level, so instruction execution times at levels 2,

3, and 4 are kn, kn 2, and kn 3, respectively.

8. Hardware and software are functionally equivalent. Any function done by

one can, in princi

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值