慶應義塾大学
2007年度 秋学期

コンピューター・アーキテクチャ
Computer Architecture

2007年度秋学期 月曜日3時限
科目コード: XXX / 2単位
カテゴリ:
開講場所:SFC
授業形態:講義
担当: Rodney Van Meter
E-mail: rdv@sfc.keio.ac.jp

第1回 10月1日 Lecture 1, October 1:
Fundamentals of Computer Design

Outline of This Lecture

Review of Students' Programming Backgrounds

Take a sheet of paper. On it, put your name and student ID number. Then answer the following questions:

  1. Do you currently have a working C compiler on your system?
    現在、C言語のコンパイラーを持っていますか。
  2. List the operating systems and versions you have used:
    今までの使ったことがあるオペレーティングシステムをリストアップしてください。
    Microsoft Windows, MacOS, Linux, FreeBSD, Solaris?
  3. How many years ago did you start programming?
    何年前にプログラ ミングを始まったでしょう。
  4. Have you administered a multi-user computer system before, such as a web server or file server?
    マルチユーザーのコンピューター(ウェブサーバー、ファイルサーバーなど)を管理したことありますか。
  5. List the languages you have programmed in:
    今までの使ったことがある言語をリストアップしてください:
    assembler, BASIC, C, C++, Fortran, Java, Lisp, Perl, Python, Ruby, sh, ...?
  6. Which tools have you used:
    このリストの中にはどのツールを使ったことがある:
    make, CVS, RCS, Microsoft VisualC etc., automake, grep, sed, awk, lex/flex, yacc/bison, Spirit, ...?
  7. What is the longest program you have written, measured in lines?
    ひとつのプログラムは何行まで書きましたか。
  8. When you write code, do you write comments?
    プログラムを書いているとき、コメントを書きますか。
  9. Have you worked in a team to write one program? What source code control system did you use? How did you divide up the work, and how did you define and test interfaces between members of the team?
    一 人以上のグループでプログラムを書いたことありますか。ソースコードコント ロールはどうやってしましたか。仕事がどうやって分割しましたか。インター フェースの定義のしかたには何をしましたか。

The lectures for this class will be in Japanese, but non-Japanese-speaking students are encouraged to join. Adequate materials to learn the topic and complete the assignments will be available in English.

ムーアの法則の後期に入ったということは、先端のマルチコア・マイクロプロセッサは新しい時代を迎えたということだ。これからのコンピューターデザインはその事実をふまえなければなりません。並列データ処理、データの転送、熱等は非常に重要なファクターです。現在のコンピュータ環境を支えるマイクロプロセッサの技術を中心に扱い、動作原理や高速化の原理について考えます。次のような課題を扱います。

以下の事項を注意してください。
内容を理解し、課題を行う上で基本的なC言語の知識が必要となる場合があります。しかし、大きなプログラムや複雑なプログラムを作成する能力は必要ありません。C言語の文法 (繰り返し、条件判断、関数呼出し、記憶クラスなど) の知識だけで十分です。したがって、Java 言語や Pascal 言語などの他の手続き型言語しか知らなくても、数時間の自習で理解できます。
 本格的な参考書として Hennessy & Patterson, "Computer Architecture, Fourth Edition: A Quantitative Approach" (ヘネシー・パターソン(ヘネパタと呼ばれている))最新刊はまだ翻訳されていません。


--------
We have entered the late Moore's Law period of computer architecture, as shown by the latest multicore microprocessors. From this point forward, computer design must concentrate on parallel processing, data transfer, and heat management as especially important factors. Studying modern microprocessor design, we will see where performance is created in computer systems, including:



Note:

Students will be expected to understand at least one high-level language as part of the course. The textbook will be Hennessy & Patterson, "Computer Architecture, Fourth Edition: A Quantitative Approach", which has not yet been translated into Japanese. Lectures will be in Japanese, but non-Japanese speaking students are encouraged to join the class. Sufficient materials will be available in English to learn the material and complete the assignments.

教材
Course Outline

教科書 Textbook

Computer Architecture: A Quantitative Approach, fourth edition
John L. Hennessy and David A. Patterson
Morgan Kauffman, 2007
ISBN: 978-0-12-370490-0

Note: The text is only available in English. My apologies, but it is the most important book on computer architecture available anywhere in the world. It is also a very advanced text. My intention is to teach from the text repeatedly, with more advanced classes going into each chapter more deeply. So, the book is expensive but should help you for years.

Lecture by Lecture

Requirements

The course consists of thirteen ninety-minute classes. Students are expected to read a large amount of material from the textbook and accompanying CD, contribute to classroom discussions, complete weekly homework, and pass a final exam.

成績の仕方
Grading

Your grade will be determined as follows:

宿題
Homework

Twelve homework assignments will be handed out; you are expected to complete ten. Each homework will typically consist of:

Homework is due at the start of class each week.

Contacting Me/Office Hours
連絡先/オフィスアワー

If you need to contact me, email is the preferred method. Please put "COMP-ARCH:" in the Subject field of the email. If I do not respond to a query within 24 hours, please resend. For more urgent matters, junsec should know how to get ahold of me.

Office Hours, Fall 2007秋のオフィスアウアー:Wednesday (水曜日), 9-12, Delta N205. You may come to my office during this time without an appointment. If you wish to see me otherwise, you can attempt to find me directly, or send me email to arrange an appointment.

Fundamentals of Computer Design

What's a Computer?

Introduction

Processors have gotten 6,505 times faster in 27 years! Of that, about seven times is due to architecture, the rest is due to improvements in technology: smaller, faster transistors and shorter, faster wires.

1978:

Image from NetBSD VAX Gallery.

Image from Carlo's Hardware and Embedded Systems.

2004(?):

A 300mm wafer containing 117 AMD Opteron chips implemented in a 90nm process.

Technology Trends

The current (2007) transistor gate length in a microprocessor is about 25 nanometers. That's about fifty times the lattice constant of crystalline silicon. We already effectively build transistors from a countable number of atoms.

ITRS 2003 gate length
					  figure

One important impact of the continuing increase in the number of transistors in a chip is power consumption. The number of transistors is increasing faster than the power per transistor is dropping. A key innovation is using hafnium as the gate dielectric, as Intel is doing; they claim 100x improvement in current leakage when the transistor is off, which is a huge improvement in total power consumption.

An engineer from Intel said at a recent conference that, by 2014, a chip will contain 100 billion transistors, 20 billion of which don't work, and another 10 billion of which will quit during the lifetime of the chip.

Moore's Law transistors per chip graph from Intel

Quantitative Principles of Design

Hennessy & Patterson's Five Principles:

  1. Take Advantage of Parallelism
  2. Principle of Locality
  3. Focus on the Common Case
  4. Amdahl's Law
  5. The Processor Performance Equation
I would add to this one imperative: Achieve Balance.

Take Advantage of Parallelism

Parallelism can be found by using multiple processors on different parts of the problem, or multiple functional units (floating point units, disk drives, etc.), or by pipelining, dividing an individual computer instruction into several parts and executing the parts of different instructions at the same time in different parts of the CPU.

Principle of Locality

Programs and data tend to reuse data and instructions that have been recently used. There are two forms of locality: spatial and temporal. Locality is what allows a cache memory to work.

Focus on the Common Case

The things that are done a lot should be fast; the things that are rare may be slow.

Amdahl's Law

Amdahl's Law tells us how much improvement is possible by making the common case fast, or by parallelizing part of the algorithm. In the example below, 3/5 of the algorithm can be parallelized, meaning that three times as much hardware applied to the problem gains us only a reduction from five time units to three.

Example of Amdahl's Law, parallel and
				serial portions.

Some problems, most famously graphics, are known as "embarrassingly parallel" problems, in which extracting parallelism is trivial, and performance is primarily determined by input/output bandwidth and the number of processing elements available. More generally, the parallelism achievable is determined by the dependency graph. Creating that graph and scheduling operations to maximize the parallelism and enforce correctness is generally the shared responsibility of the hardware architecture and the compiler.

Dependency graph for the
					     above figure.

The Processor Performance Equation

CPU time = (seconds )/ program = (Instructions )/ program × (Clock cycles )/ Instruction × (Seconds )/ Clock cycle

Design Goals: Measuring and Designing for Performance

To be discussed if time permits.

Design Goals: Dependability

To be discussed if time permits.

宿題
Homework

This week's homework (submit via email):

  1. Demonstrate that you have a working compiler setup where you will be able to write programs for class. Capture the output of the compilation and execution of a simple program (such as "Hello, world") and email it to me. Include the amount of time it took you to complete this exercise.
  2. Determine all of the information that you can about the hardware of your own PC:
    1. CPU manufacturer, type, and clock speed.
    2. Type, amount, and speed of memory.
    3. Size of cache memories.
    4. Type, size, and speed of disk (and its I/O interface).
    5. Can you find out the chip set type?
  3. Determine the exact version of the operating system and compiler you are using.
  4. If you have additional thoughts about the above discussion of programming experience, please email me.
  5. Read the text for next week.

Next Lecture

Next lecture:

第2回 10月15日
Lecture 2, October 15: Processors: Basics of Instruction Sets

Readings for next time (two weeks):

Additional Information

その他