プリンキピア

第5章アルゴリズムのハードウェアによる実現:コンピューターシステム設計

Conceptual Questions概念を考える問題

1. Why is the memory connected directly to the CPU?
1. メモリは、なぜCPUに直接接続されているのか。
2. Both the disk and memory store programs and data. Why do we need them both in a computer system?
2. ディスクもメモリも、プログラムとデータを保存する。なぜコンピューターシステムには両方が必要なのか。
3. Why do we need an assembler? Why don’t we make compilers generate machine language directly?
3. アセンブラは、なぜ必要なのか。コンパイラが機械語を直接生成するようにしないのはなぜか。
4. If there are two processors that understand the same ISA, does this mean they have exactly the same microarchitecture?
4. 同じISAを理解するプロセッサが二つある場合、両者のマイクロアーキテクチャーも完全に同じということになるか。
5. Can the step from algorithms to HLL programs be automated instead of being done by a human being? Justify your answer.
英語のヒント
5. アルゴリズムからHLLのプログラムへ変換する段階を、人間が行う代わりに自動化できるか。答えの根拠を示しなさい。
6. The idea of compilers and assemblers made HLL more portable. Why is that?
英語のヒント
6. コンパイラとアセンブラという考え方によって、HLLの移植性が高まった。それはなぜか。
7. Suppose we have a list of 1,000 numbers ordered in ascending order. We need to find whether a specific number is in the list or not. What is the best algorithm to accomplish this? a. Scan the list from first number to last number until you find the number you want or reach the last number. b. Scan the list from last number to first number until you find the number you want or reach the first number. c. Go to the middle of the list and see whether the number you are looking for is bigger or smaller than the middle number. If it is bigger, discard the lower half. If it is smaller, discard the higher half. Then redo the same in the smaller list. d. Take a quick look at the list and decide whether the number is present.
英語のヒント
7. 昇順に並んだ1,000個の数のリストがあるとする。特定の数がリストに含まれるか調べたい。最適なアルゴリズムはどれか。a. 最初の数から最後の数へ、目的の数が見つかるか末尾に達するまで、リストを順に調べる。b. 最後の数から最初の数へ、目的の数が見つかるか先頭に達するまで、リストを順に調べる。c. リストの中央を見て、目的の数が中央の数より大きいか小さいかを調べる。大きければ下半分を捨て、小さければ上半分を捨てる。その後、小さくなったリストで同じことを繰り返す。d. リストをざっと見て、目的の数があるか判断する。
8. Why is the two’s complement a good choice for presenting signed numbers?
8. 符号付きの数を表す方法として、2の補数が適しているのはなぜか。
9. As a programmer, do you think it is useful to know about data presentation? Why?
9. プログラマーとして、データの表現について知っておくことは有益だと思うか。それはなぜか。
10. Why are computers slower in dealing with floating points than integers?
10. コンピューターが浮動小数点を扱う速度は、整数を扱う速度より遅い。なぜか。
11. For portable devices, such as your smartphone, do you think processors supporting CISC ISA or RISC ISCA should be used? Why?
11. スマートフォンのような携帯機器には、CISC ISAとRISC ISCAのどちらに対応するプロセッサを使うべきだと思うか。それはなぜか。
12. Is it possible to build a de-compiler? That is, if given an assembly code, can we bring the original HLL code? Explain.
英語のヒント
12. 逆コンパイラは作れるか。つまり、アセンブリコードが与えられたら、元のHLLのコードを取り戻せるか。説明しなさい。
13. Why are the different technologies organized as a hierarchy?
13. 異なる技術を階層として組織するのはなぜか。
14. What is the relationship between SSD and flash memory?
14. SSDとフラッシュメモリは、どのような関係にあるか。
15. Do you think it is better to have more cores in the chip or to use multiple chips with fewer cores each? Why?
15. 一つのチップに多くのコアを載せるのと、各チップのコア数を少なくして複数のチップを使うのとでは、どちらがよいと思うか。それはなぜか。
16. Why is heterogeneous computing here to stay?
英語のヒント
16. 異種混在コンピューティングが、今後も定着していくのはなぜか。

Practice Exercises練習問題

Exercises 1–5練習問題 1–5
1. Perform a search on the Internet about the specifications of your own computer as well as other similar computers from companies like Lenovo or Dell in terms of memory size and disk size. What is the ratio disk size to memory size in each computer and why?
英語のヒント
1. 自分のコンピューターと、LenovoやDellなどの企業の類似機種について、メモリ容量とディスク容量の仕様をインターネットで調べなさい。各機種で、メモリ容量に対するディスク容量の比はいくらか。また、なぜそうなるのか。
2. Document how you can obtain the amount of cache memory on your computer.
英語のヒント
2. 自分のコンピューターのキャッシュメモリ容量を調べる方法を、文書にまとめなさい。
3. Search the web for five different ISAs. For each one, find which companies are building processors that use that ISA. Finally, for each processor from these companies, check whether this processor is used on your portable device (smartwatch, smartphone, tablet), your laptop or computer, or in big supercomputers and data centers.
3. 異なるISAを五つ、ウェブで調べなさい。それぞれについて、そのISAを使うプロセッサを製造している企業を調べなさい。最後に、各企業の各プロセッサが、携帯機器(スマートウォッチ、スマートフォン、タブレット)、ノートパソコンやコンピューター、大型スーパーコンピューターやデータセンターのどこで使われているか確認しなさい。
4. You are using the Internet to access a website of your choice. Create a diagram showing the various levels of abstraction of a computer system to explain this particular scenario.
英語のヒント
4. インターネットを使い、自分で選んだウェブサイトにアクセスしているとする。この場面を説明するために、コンピューターシステムのさまざまな抽象化レベルを示す図を作りなさい。
5. Research and explain a few key responsibilities of operating systems.
5. オペレーティングシステムの重要な役割をいくつか調べ、説明しなさい。
Suppose you wish to express –64 as a two’s complement number.
−64を2の補数で表したいとする。
Exercises 6–10練習問題 6–10
6. What is the minimum number of bits we will need?
6. 最低何ビット必要か。
7. With this minimum number of bits, what is the largest positive number you can represent, assuming signed numbers of course? (Answer in both decimal and binary.)
英語のヒント
7. その最小ビット数で、もちろん符号付きの数を使うとして、表せる最大の正の数はいくらか。10進数と2進数の両方で答えなさい。
8. With that same number of bits you used in the previous questions, what is the largest unsigned number you can represent? (Answer in both decimal and binary.)
8. 前の問題と同じビット数で表せる、最大の符号なしの数はいくらか。10進数と2進数の両方で答えなさい。
9. Represent the decimal digit 90 in binary.
9. 10進数90を2進数で表しなさい。
10. Add the following binary numbers: 0111000101 + 0000100101?
10. 次の2進数を足しなさい:0111000101 + 0000100101。
Exercises 11–14練習問題 11–14
11. Find the one’s complement of 1010001000011111.
11. 1010001000011111の1の補数を求めなさい。
12. Find the two’s complement of 000010001111110.
12. 000010001111110の2の補数を求めなさい。
13. Make a list of at least three ISAs in existence today. For each one, find out whether it is CISC or RISC and in which processors it is used. Finally, take the list of these processors and see whether they are used in high-performance computing machines or portable devices.
英語のヒント
13. 現在存在するISAを、少なくとも三つ挙げなさい。それぞれについて、CISCかRISCか、どのプロセッサに使われているかを調べなさい。最後に、それらのプロセッサが、高性能計算機と携帯機器のどちらで使われているか確認しなさい。
14. Make a list of three or four accelerators and, for each one, describe the type of applications they excel at and why.
英語のヒント
14. アクセラレーターを三つまたは四つ挙げ、それぞれが得意とするアプリケーションの種類と、その理由を説明しなさい。