慶應義塾大学
2015年度 秋学期
コンピューター・アーキテクチャ
Computer Architecture
第1回 9月28日 Lecture 1, September 28:
What's in a Computer?
Outline of This Lecture
- Plotting Performance
- Review of Students' Programming Backgrounds
- Course Outline
- Grading Criteria and Requirements
- Contact Information, Office Hours and Class Notes
- What's a Computer?
コンピュータって、何?
- What's in a Computer's Guts?
コンピュータの内蔵は?
- Fundamentals of Computer Design
コンピュータデザインの基礎
- Introduction
- Technology Trends
- Quantitative Principles of Design
定量的なデザイン概念
- Homework/課題
Plotting Performance
Let's look at some graphs of computer system performance.
Review of Students' Programming Backgrounds
Take a sheet of paper. On it, put your name and student ID number.
Then answer the following questions:
- Do you currently have a working C compiler on your system?
現在、C言語のコンパイラーを持っていますか。
- List the operating systems and versions you have used:
今までの使ったことがあるオペレーティングシステムをリストアップしてください。
Microsoft Windows, MacOS, Linux, FreeBSD, Solaris?
- How many years ago did you start programming?
何年前にプログラ
ミングを始まったでしょう。
- Have you administered a multi-user computer system before, such as
a web server or file server?
マルチユーザーのコンピューター(ウェブサーバー、ファイルサーバーなど)を管理したことありますか。
- List the languages you have programmed in:
今までの使ったことがある言語をリストアップしてください:
assembler, BASIC, C, C++, Fortran, Java, Lisp, Perl, Python, Ruby, sh, ...?
- Which tools have you used:
このリストの中にはどのツールを使ったことがある:
make, CVS, RCS, Microsoft VisualC etc.,
automake, grep, sed, awk, lex/flex, yacc/bison, Spirit, ...?
- What is the longest program you have written, measured in lines?
ひとつのプログラムは何行まで書きましたか。
- When you write code, do you write comments?
プログラムを書いているとき、コメントを書きますか。
- 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 English, but
Japanese-speaking students are encouraged to join. Adequate materials
and support to learn the topic and complete the assignments will be
available in both languages.
ムーアの法則の後期に入ったということは、先端のマルチコア・マイクロプロセッサは新しい時代を迎えたということだ。これからのコンピューターデザインはその事実をふまえなければなりません。並列データ処理、データの転送、熱等は非常に重要なファクターです。現在のコンピュータ環境を支えるマイクロプロセッサの技術を中心に扱い、動作原理や高速化の原理について考えます。次のような課題を扱います。
- 計算機の構成と動作原理
- 高級言語と機械語
- コンパイラと最適化技術
- オペレーティングシステムとプロセッサの関係
- プロセッサの構成と設計
- インプット・アウトプットシステム、データストレージシステム
- マルチプロセッサネットワーク
以下の事項を注意してください。
内容を理解し、課題を行う上で基本的なC言語の知識が必要となる場合があります。しかし、大きなプログラムや複雑なプログラムを作成する能力は必要ありません。C言語の文法 (繰り返し、条件判断、関数呼出し、記憶クラスなど) の知識だけで十分です。したがって、Java 言語や Pascal 言語などの他の手続き型言語しか知らなくても、数時間の自習で理解できます。
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:
- Structure and development of processors
- High-level language and machine language
- Compiler optimization
- Relationship of architecture and operating systems
- Input/output systems, data storage systems
- Multiprocessor networks
Note:
Students will be expected to understand at least one high-level language as part of the course.
教材
Course Outline
教科書 Textbook
The textbooks are available in the Seikyo:
コンピュータの構成と設計~ハードウエアとソフトウエアのインタフェース 第3版 (上)
デイビッド・A. パターソン (著), ジョン・L. ヘネシー (著), David A. Patterson (原著), John L. Hennessy (原著), 成田 光彰 (翻訳)
日経BP社
ISBN-10: 482228266X
ISBN-13: 978-4822282660
and the second volume:
コンピュータの構成と設計~ハードウエアとソフトウエアのインタフェース 第
3版 (下)
デイビッド・A. パターソン (著), ジョン・L. ヘネシー (著), David A. Patterson (原著), John L. Hennessy (原著), 成田 光彰 (翻訳)
日経BP社
ISBN-10: 4822282678
ISBN-13: 978-4822282677
Computer Organization and Design: The Hardware-Software
Interface, third edition
David A. Patterson and John L. Hennessy
Morgan Kauffman, 2007
ISBN-10: 0123706068
ISBN-13: 978-0123706065
A recommended, but not required, more advanced text:
コンピュータアーキテクチャ 定量的アプローチ 第4版
John L. Hennessy (著), ジョン・L・ヘネシー (著), デイビッド・A・パター
ソン (著), David A. Patterson (著), 中條 拓伯 (監修, 翻訳), 吉瀬 謙二
(翻訳), 佐藤 寿倫 (翻訳), 天野 英晴 (翻訳)
翔泳社
ISBN-10: 4798114405
ISBN-13: 978-4798114408
Computer Architecture: A Quantitative Approach, fourth edition
John L. Hennessy and David A. Patterson
Morgan Kauffman, 2007
ISBN: 978-0-12-370490-0
Requirements
The course consists of fourteen ninety-minute classes. Students are
expected to read a large amount of material from the textbook and
accompanying CD, contribute to classroom discussions, complete the
homeworks, and pass a final exam.
There are several types of exercises that you must do during the
course of this semester. You grade will be composed of the following,
with a maximum total of 250 points:
- In-class exercises: some hands-on things in class, some of which
involve programming (combined with attendance and participation,
50 points)
- Programming/hands-on (100 points):
- install R (trivial)
- Measure parallel performance of a system (easy)
- Berkeley parallel boot camp (hard, double credit, due Dec. 1)
- Install MIPS simulator (trivial)
- Matrix multiplication in C (easy)
- Matrix multiplication in assembler (hard, double credit, due
Dec. 20)
- Integer performance, floating point precision and
performance (easy)
- TBD
- Analysis problem sets (50 points):
- TBD
- Matrix multiplication/counting computational operations
- TBD
- Optimizing in the context of design constraints (hard,
double credit) (last exercise, due end of the semester)
- Final exam (50 points)
Homework is due at the start of class each week. Homework will be
submitted via the SFS system.
What I Want You to Learn
- How a computer executes a program
- Parallelism in computation
- Pipelining
- Caching
- Evolution of technology (Moore's Law)
If you learn these things, you're in good shape!
Lecture by Lecture
Lecture 1: Fast
Concepts: What's in a computer?
What's our goal in designing a computer?
Reading a performance graph
In-class exercise: show around Intel CPUs, computer parts
Homework (programming/hands-on computing): get an account on class
server machine, install R on your laptop
Homework (analysis problem set): (none)
Lecture 2: Five principles of computer architecture
Concepts: Take Advantage of Parallelism
Principle of Locality
Focus on the Common Case
Amdahl's Law
The Processor Performance Equation
In-class exercise: recreate performance graph
visit Armstrong
Homework (programming): extending performance graphs
Homework (analysis problem set): (none)
Lecture 3: Faster: Parallelism
Concepts: Impact of Amdahl's Law
Reduction
Synchronization
In-class exercise: Parallel humans
Homework (programming): Berkeley Parallel Boot Camp exercise
(n.b.: Due Dec. 1;
single hardest exercise this semester!)
Homework (analysis problem set): (none)
Lecture 4: Processors: Basics of Instruction Sets
Concepts: Main Blocks of a CPU
Memory: Registers, Stacks and Heaps
Types of Instructions
In-class exercise: (none)
Homework (programming): install the MIPS simulator (must be done on time!)
Homework (analysis problem set): matrix multiplication
Lecture 5: Processors: Instruction Sets and the Data Path
Concepts: Details of instructions
In-class exercise: using the MIPS simulator
Homework (programming): matrix multiplication in C
Homework (analysis problem set): (none)
Lecture 6: Processors: Basics of Pipelining
Concepts: Pipelines in the real world
A five-stage pipeline
In-class exercise: Human Pipeline!
Homework (programming): matrix multiplication in MIPS assembly (due
Dec. 20)
Homework (analysis problem set): a real-world pipeline
Lecture 7: Memory: Caching and Memory Hierarchy
Concepts: Four key questions in cache design
In-class exercise: (none)
Homework (programming): (none)
Homework (analysis problem set): cache behavior
Lecture 8: Memory: Virtual Memory
Concepts: Address translation
In-class exercise: (none)
Homework (programming): (TBD)
Homework (analysis problem set): (TBD)
Lecture 9: Systems: Shared-Memory Multiprocessors
Concepts: Classes of parallel architectures
In-class exercise: review of Boot Camp exercise
Homework (programming): (none)
Homework (analysis problem set): (none)
Lecture 10: Systems: Distributed-Memory Multiprocessors
and Interconnection Networks
Concepts:
In-class exercise: (none)
Homework (programming): (TBD)
Homework (analysis problem set): (TBD)
Lecture 11: Arithmetic
Concepts: integer arithmetic
floating point arithmetic
In-class exercise: (none)
Homework (programming): precision and performance of floating point
arithmetic
Homework (analysis problem set): (TBD)
Lecture 12: Basics of I/O and Storage Systems
Concepts: disk drive internals
impact of bus transfers on performance
In-class exercise: (none)
Homework (programming): (TBD)
Homework (analysis problem set): (TBD)
Lecture 13: RAID: Parallelism and Protection in Storage Systems
Concepts: RAID levels
In-class exercise: (none)
Homework (programming): (TBD)
Homework (analysis problem set): (TBD)
Lecture 14: Fastest: Ultimate Limits to Computation
Concepts: TBD
In-class exercise: (TBD)
Homework (programming): (TBD)
Homework (analysis problem set): (TBD)
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 2015秋のオフィスアウアー:Wednesday (水曜日), 10-12,
Delta N211. 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.
What's a Computer?
What's in a Computer?
(Here's the fun part...)
Our computer
宿題
Homework
This week's homework.
Submit through the
SFS system.
- Install R on your laptop.
- Read the text for next week.
Next Lecture
Next lecture:
第2回 10月5日
Lecture 2, October 5: Five principles of computer architecture
以下で、P-Hはコンピュータの構成と設計~ハードウエアとソフトウエアの
インタフェース 第3版、
H-Pはコンピュータアーキテクチャ 定量的アプローチ 第4版.
Below, P-H is Computer Organization and Design: The
Hardware-Software Interface, and H-P is Computer Architecture:
A Quantitative Approach.
Readings for next time:
- Follow-up from this lecture:
- P-H: Chapter 1
- H-P: Chapter 1.1 - 1.12
- For next time:
Additional Information
その他