计算机组织与结构(英文版)课后答案.pdf
《计算机组织与结构(英文版)课后答案.pdf》由会员分享,可在线阅读,更多相关《计算机组织与结构(英文版)课后答案.pdf(72页珍藏版)》请在淘文阁 - 分享文档赚钱的网站上搜索。
1、SOLUTIONS MANUALCOMPUTER ORGANIZATION ANDARCHITECTUREDESIGNING FOR PERFORMANCESEVENTH EDITIONWILLIAM STALLINGSCopyright 2005:William Stallings-2-2005 by William StallingsAll rights reserved.No part of this document maybe reproduced,in any form or by any means,orposted on the Internet,without permiss
2、ion inwriting from the author.NOTICEThis manual contains solutions to all of the review questions andhomework problems in Computer Organization and Architecture,Seventh Edition.If you spot an error in a solution or in the wording of aproblem,I would greatly appreciate it if you would forward theinfo
3、rmation via email to .An errata sheet for this manual,if needed,is available at WilliamSW.S.-4-TABLE OF CONTENTSChapter 2:Computer Evolution and Performance.5Chapter 3:Computer Function and Interconnection.9Chapter 4:Cache Memory.14Chapter 5:Internal Memory.27Chapter 6:External Memory.33Chapter 7:In
4、put/Output.37Chapter 8:Operating System Support.43Chapter 9:Computer Arithmetic.48Chapter 10:Instruction Sets:Characteristics and Functions.61Chapter 11:Instruction Sets:Addressing Modes and Formats.72Chapter 12:Processor Structure and Function.77Chapter 13:Reduced Instruction Set Computers(RISCs).8
5、3Chapter 14:Instruction-Level Parallelism and Superscalar Processors.87Chapter 15:The IA-64 Architecture.93Chapter 16:Control Unit Operation.97Chapter 17:Microprogrammed Control.100Chapter 18:Parallel Processing.103Appendix A:Number Systems.112Appendix B:Digital Logic.113-5-CHAPTER 2COMPUTER EVOLUTI
6、ON ANDPERFORMANCE即 注 眶 四to umsmoNs2.1 In a stored program computer,programs are represented in a form suitable forstoring in memory alongside the data.The computer gets its instructions byreading them from memory,and a program can be set or altered by setting thevalues of a portion of memory.2.2 A m
7、ain memory,which stores both data and instructions:an arithmetic and logicunit(ALU)capable of operating on binary data;a control unit,which interprets theinstructions in memory and causes them to be executed;and input and output(VO)equipment operated by the control unit.2.3 Gates,memory cells,and in
8、terconnections among gates and memory cells.2.4 Moore observed that the number of transistors that could be put on a single chipwas doubling every year and correctly predicted that this pace would continue intothe near future.2.5 Similar or identical instruction set:In many cases,the same set of mac
9、hineinstructions is supported on all members of the family.Thus,a program thatexecutes on one machine will also execute on any other.Similar or identicaloperating system:The same basic operating system is available for all familymembers.Increasing speed:The rate of instruction execution increases in
10、 goingfrom lower to higher family members.Increasing Number of I/O ports:In goingfrom lower to higher family members.Increasing memory size:In going fromlower to higher family members.Increasing cost:In going from lower to higherfamily members.2.6 In a microprocessor,all of the components of the CPU
11、 are on a single chip.处BO近 史M T WRO目 上 运 M S2.1 This program is developed in HAYE98.The vectors A,B,and C are each stored in1,000 contiguous locations in memory,beginning at locations 1001,2001,and 3001,respectively.The program begins with the left half of location 3.A countingvariable N is set to 9
12、99 and decremented after each step until it reaches-1.Thus,the vectors are processed from high location to low location.-6-Location InstructionComments0999Constant(count N)11Constant21000Constant3LLOAD M(2000)Transfer A(I)to AC3RADD M(3000)Compute A(I)+B(I)4LSTOR M(4000)Transfer sum to C(I)4RLOAD M(
13、0)Load count N5LSUB M(l)Decrement N by 15RJUMP+M(6,20:39)Test N and branch to 6R if nonnegative6LJUMP M(6,0:19)Halt6RSTOR M(0)Update N7LADD M(l)Increment AC by 17RADD M(2)8LSTOR M(3,8:19)Modify address in 3L8RADD M(2)9LSTOR M(3,28:39)Modify address in 3R9RADD M(2)10LSTOR M(4,8:19)Modify address in 4
14、L10RJUMP M(3,0:19)Branch to 3L2.2 a.Opcode OperandI o o o o o o o i|000060000010 Ib.First,the CPU must make access memory to fetch the instruction.Theinstruction contains the address of the data we want to load.During the executephase accesses memory to load the data value located at that address fo
15、r a totalof two trips to memory.2.3 To read a value from memory,the CPU puts the address of the value it wants intothe MAR.The CPU then asserts the Read control line to memory and places theaddress on the address bus.Memory places the contents of the memory locationpassed on the data bus.This data i
16、s then transferred to the MBR.To write a value tomemory,the CPU puts the address of the value it wants to write into the MAR.TheCPU also places the data it wants to write into the MBR.The CPU then asserts theWrite control line to memory and places the address on the address bus and thedata on the da
17、ta bus.Memory transfers the data on the data bus into thecorresponding memory location.-8-2.4Address Contents08A LOAD M(OFA)STOR M(OFB)08B LOAD M(OFA)JUMP+M(08D)08C LOAD-M(OFA)STOR M(OFB)08DThis program will store the absolute value of content at memory location OF A intomemory location OFB.2.5 All
18、data paths to/from MBR are 40 bits.All data paths to/from MAR are 12 bits.Paths to/from AC are 40 bits.Paths to/from MQ are 40 bits.2.6 The purpose is to increase performance.When an address is presented to a memorymodule,there is some time delay before the read or write operation can beperformed.Wh
19、ile this is happening,an address can be presented to the othermodule.For a series of requests for successive words,the maximum rate is doubled.2.7 The discrepancy can be explained by noting that other system components aside from clockspeed make a big difference in overall system speed.In particular
20、,memory systems andadvances in I/O processing contribute to the performance ratio.A system is only as fast as itsslowest link.In recent years,the bottlenecks have been the performance of memorymodules and bus speed.2.8 As noted in the answer to Problem 2.7,even though the Intel machine may have afas
21、ter clock speed(2.4 GHz vs.1.2 GHz),that does not necessarily mean the systemwill perform faster.Different systems are not comparable on clock speed.Otherfactors such as the system components(memory,buses,architecture)and theinstruction sets must also be taken into account.A more accurate measure is
22、 to runboth systems on a benchmark.Benchmark programs exist for certain tasks,such asrunning office applications,performing floating point operations,graphicsoperations,and so on.The systems can be compared to each other on how longthey take to complete these tasks.According to Apple Computer,the G4
23、 iscomparable or better than a higher-clock speed Pentium on many benchmarks.2.9 This representation is wasteful because to represent a single decimal digit from 0through 9 we need to have ten tubes.If we could have an arbitrary number of thesetubes ON at the same time,then those same tubes could be
24、 treated as binary bits.With ten bits,we can represent 210 patterns,or 1024 patterns.For integers,thesepatterns could be used to represent the numbers from 0 through 1023.-9-2.10IcpmkrInstruction setarchitectureXXCompiler technologyXXXProcessorimplementationXXCache and memoryhierarchyXXSource:HWAN93
25、2.11 MIPS rate=/(CPI xlO6)2.12 a.We can express the MIPs rate as:(MIPS rate)/106=I J T.So that:Ic=T x(MIPS rate)/106.The ratio of the instruction count of the RS/6000 tothe VAX is x x 18/12x x 1=1.5.b.For the Vax,CPI=(5 MHz)/(l MIPS)=5.For the RS/6000,CPI=25/18=1.39.2.13 CPI=1.55;MIPS rate=25.8;Exec
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- 计算机 组织 结构 英文 课后 答案
限制150内