0% found this document useful (0 votes)
11 views28 pages

1111 - Computer Organization - Chapter 1 - Part 1

Uploaded by

moewtoro
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views28 pages

1111 - Computer Organization - Chapter 1 - Part 1

Uploaded by

moewtoro
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 28

Chapter 1

Computer Abstractions
and Technology
- Part 1
計算機抽象化與技術
Outline 大綱

1.1 Introduction
簡介

1.2 Eight Great Ideas in Computer Architecture


計算機架構中的八個重要理念

1.3 Below Your Program


程式之下

1.4 Under the Covers


(計算機)外殼之下

2
The Computer Revolution 計算機革命

◼ Computers have led to a third revolution for civilization.


計算機造成了第三次的文明革命

 Agricultural ---> Industrial ---> Information


revolution revolution revolution
農業革命 工業革命 資訊革命

◼ Makes novel applications feasible


使新的應用成為可行

 Cell phones 手機

 Computers in automobiles 計算機在汽車中

 Human genome project 人類基因計畫

 World Wide Web 全球網際網路

 Search Engines 搜尋引擎

3
Classes of Computers 計算機的類別

◼ Broadly speaking, computers are used in three classes of applications.


廣義而言,計算機被運用於三種應用的類型。

 Personal computers
個人計算機

 General purpose, variety of software


多用途,可執行各種軟體

 Subject to cost/performance tradeoff


受限於成本/性能的折衷

 Servers 
伺服器

 Embedded computers 
嵌入式計算機

4
Classes of Computers 計算機的類別

 Servers
伺服器

 High capacity, performance, reliability


高容量、高性能、高可靠性

 Usually access only via a network


通常透過網路來使用

 Span the widest range in cost and capacity


伺服器在成本和容量的範圍最廣

⚫ At the low end, a server may be little more than a desktop


computer without a screen or keyboard
低階伺服器可能類似於桌上型計算機,但是沒有螢幕與鍵盤

 E.g., file storage, web serving.


⚫ Supercomputer: highest performance and cost
超級計算機: 最高的性能和成本

 High-end scientific and engineering calculations

5
Classes of Computers 計算機的類別

 Embedded computers
嵌入式計算機

 Largest class of computers and span the widest range of


applications and performance
最大的一類計算機,在效能與應用的範圍最廣

 Designed to run one application or one set of related


applications
設計來執行單一的應用或一組相關的應用

 Integrated with the hardware


整合在硬體中

⚫ Set-top box, digital camera, microwave ovens


電視機上盒、數位相機、微波爐

 Stringent power/performance/cost constraints


嚴格的功耗/性能/成本的限制

6
The PostPC Era 後PC時代

◼ Cellphones vs. PC growth


 Figure 1.2 the number manufactured per year of tablets and
smart phones versus personal computers and traditional cell
phones. 每年平板電腦和智慧手機對比個人電腦和傳統手機的製造數量

7
What You Will Learn 你將學到什麼

◼ How does a computer work?


計算機如何工作

 How are programs written in a high-level language, such as C or


Java, translated into the language of hardware?
高階語言,例如C或Java,所寫的程式如何被翻譯成硬體語言?

 How does the hardware execute them?


硬體如何執行硬體語言的程式?

 What is the interface between the software and hardware, and


how does software instruct the hardware to perform needed
functions?
軟體與硬體之間的介面是什麼? 以及軟體如何指揮硬體來執行所需的功能?

 What determines the performance of a program, and


how can a programmer improve the performance?
什麼因素決定了程式的效能? 以及如何改善效能?

8
What You Will Learn 你將學到什麼

◼ How does a computer work? (contd.)


計算機如何工作 (繼續上一頁)

 What technology can be used by hardware designers


to improve performance?
硬體設計師可以用來改善效能的技術有哪些?

 What technology can be used by hardware designers


to improve energy efficiency?
硬體設計師可以用來改善能源效率的技術有哪些?

 What are the reasons for and the consequences of the recent
switch from sequential processing to parallel processing?
最近由循序處理轉為平行處理的原因與結果是什麼?

9
Eight Great Ideas in Computer Architecture
計算機架構中的八個重要理念

1. Design for Moore’s Law


配合摩爾定律作設計

2. Use abstraction to simplify design


用抽象化來簡化設計

3. Make the common case fast


使常用的功能加快

4. Performance via parallelism


經由平行性提升效能

5. Performance via pipelining


經由管道處理提升效能

6. Performance via prediction


經由預測提升效能

7. Hierarchy of memories
記憶體的階層

8. Dependability via redundancy


經由冗餘提升可靠性 
10
Eight Great Ideas in Computer Architecture
計算機架構中的八個重要理念

1. Design for Moore’s Law


配合摩爾定律作設計

 It states that integrated circuit resources


double every 18–24 months.
該定律指出IC 容量於每18 至24 個月即加倍

--- Wikipedia
11
Eight Great Ideas in Computer Architecture
計算機架構中的八個重要理念

2. Use abstraction to simplify design


用抽象化來簡化設計

 A major productivity technique for hardware and software


is to use abstractions to represent the design at different
levels of representation
一個硬體與軟體中的主要產能技巧就是如何使用抽象化來代表在不同層次中的設計

 Lower-level details are hidden to offer a simpler model at


higher levels
隱藏了較低層級的細節,以便在較高層級上提供更簡單的模型

 E.g., abstraction Layers


in Computer
計算機的抽象化階層

12
Eight Great Ideas in Computer Architecture
計算機架構中的八個重要理念

3. Make the common case fast


使常用的功能加快

 If a design trade-off is necessary, favor the common case


(frequent case) over the rare case (infrequent case).
若在設計中需要做取捨,則應優先考慮常用(常發生)的功能 而不是少用(罕見)的功能。

 Improving the common case, rather than the rare case, will
obviously improve performance.
改進常用的功能,而不是少用的功能,將明顯改善性能。

 The common case is often simpler than the rare case and
hence is often easier to enhance.
常用的功能 通常也比少用的功能簡單,也因此易於改良

 Determining what the common case is through careful


experimentation and measurement
透過詳細的實驗與測量來確定常用的功能

13
Eight Great Ideas in Computer Architecture
計算機架構中的八個重要理念

4. Performance via parallelism


經由平行性提升效能

 Executing different parts of a task in parallel accomplishes


the task in less time than executing them sequentially.
與循序執行一項任務相比,平行執行任務的不同部分可以在更短的時間內完成同一項任務。

 E.g.,

14
Eight Great Ideas in Computer Architecture
計算機架構中的八個重要理念

5. Performance via pipelining


經由管道處理提升效能

 Pipelining is an implementation technique in which multiple


instructions are overlapped in execution.
管線化是一種執行的技術, 可以讓多個指令的執行時間重疊

 E.g.,

15
Eight Great Ideas in Computer Architecture
計算機架構中的八個重要理念

6. Performance via prediction


經由預測提升效能

 In some cases it can be faster on average to guess and start


working rather than wait until you know for sure, assuming that
the mechanism to recover from a misprediction is not too
expensive and your prediction is relatively accurate.
如果錯誤預測的代價不高,並且預測的準確率相對較高,則在某些情況下,
透過預測的方式 提早啟動下一個運算,要比等到確認之後才啟動下一個運算,
平均而言有更快的速度。

 E.g., if-else-statement

16
Eight Great Ideas in Computer Architecture
計算機架構中的八個重要理念

7. Hierarchy of memories
記憶體的階層

 Programmers want memory to be fast, large, and cheap


程式設計師希望記憶體要容量大、速度快 且價廉

 Architects have found that they can address these conflicting


demands with a hierarchy of memories
設計師們發現可以利用記憶體的階層來解決這些相互矛盾的需求

 The fastest, smallest, and


most expensive memory per bit
at the top of the hierarchy
速度最快,容量最小 且每位元價格
最昂貴的記憶體位於頂層

 The slowest, largest, and


cheapest memory per bit
at the bottom of the hierarchy
速度最慢,容量最大 且每位元價格
最便宜的記憶體位於最底層
17
Eight Great Ideas in Computer Architecture
計算機架構中的八個重要理念

8. Dependability via redundancy


經由冗餘提升可靠性

 Computers not only need to be fast; they need to be dependable.


計算機不僅需要速度快,還要工作可靠。

 Since any physical device can fail, we make systems dependable


by including redundant components that can take over when a
failure occurs and to help detect failures.
由於任何一個物理設備都有可能故障,因此可以加入冗餘元件來提高系統的可靠性,
這些冗餘元件可以在故障時替換失效的元件 並可以幫助檢測故障。

 E.g.,

18
Below Your Program 程式之下

◼ Application software 應用軟體

 To help the user to perform specific tasks


幫助使用者執行特定的工作

 Word processors, database systems,…

◼ System software 系統軟體

 To operate and control the computer hardware


and to provide a platform for running application software
操作和控制計算機硬體,並提供應用軟體一個運行平台

 Operating systems, compilers, loaders and assemblers

◼ Hardware 硬體

 The collection of physical elements that comprise a computer


system. 構成計算機系統的物理元件

 Processor, memory, input, output,…..


19
Levels of Program Code 程式碼的階層

◼ High-level language 高階語言

 A portable language that is composed


高階語言
of words and algebraic notation 程式
一種可攜式的語言,由文字與代數符號組成
編譯器
 C, C++, Java, ……

◼ Assembly language 組合語言

 A symbolic representation of 組合語言


程式
machine instructions
以符號來表式的機器語言
組譯器
◼ Machine language 機器語言

 A binary representation of
machine instructions 機器語言
以二進位碼來表式的機器語言 程式

20
Why do we use high-level programming languages?
我們為什麼要使用高階程式語言?

◼ High-level programming languages offer several benefits:


高階程式語言提供了幾個好處

 Allowing the programmer to think in a more natural language


讓程式設計者以一個 更自然的語言來思考
(更自然的語言是指高階程式語言,較接近人類語言)

 Using English words and algebraic notation


使用英文字與代數符號

 Improving programmer productivity


提升程式設計師的生產力

 Requiring fewer lines to express an idea than assembly


language, taking less time to develop programs
需要較少行的程式來表達一個想法,需要較短的時間來開發程式。

 next page

21
Why do we use high-level programming languages?
我們為什麼要使用高階程式語言?

 Allowing programs to be independent of the computer on which


they were developed
讓程式獨立於開發程式所用的計算機

 Compilers and assemblers can translate high-level language


programs to the binary instructions of any computer
高階程式語言可以在任何的計算機上,利用編譯器和組譯器翻譯成
二進位的機器語言指令。

22
Abstraction Layers in Modern Computer Systems
當代計算機系統的抽象化階層

WORD I.E. Media Player Application Program Software

Compiler
OS

Assembly Language
System Program

Assembler

Machine Language Instruction Set Architecture


Computer
Datapath Control Memory Input Output Microarchitecture Organization

Gates: AND, OR, NOT,…. Gates

Transistor Circuits

Semiconductor Devices Devices Hardware

23
Components of a Computer 計算機的元件

◼ The five classic components of a computer are


計算機的五個基本元件是

 Input
輸入

 Output
輸出

 Memory
記憶體

 Datapath
資料通道

 Control
控制

 Datapath and control are


components of a processor

24
Components of a Computer 計算機的元件

◼ The underlying hardware in any computer performs the


same basic function:
所有計算機的硬體執行相同的基本功能:

 Inputting data
輸入資料

 Processing data
處理資料

 Outputting data
輸出資料

 Storing data
存儲資料

◼ How these functions are performed is the primary topic of this


course.
本課程的目標就是要了解這些功能如何達成

25
Components of the Apple iPad 2

◼ iPad 2 Wi-Fi EMC 2415 Teardown

◼ Figure 1.7
LCD
Components of
the Apple iPad 2
A1395 Battery

Logic board

Speaker

Wi-Fi
26
Components of the Apple iPad 2

◼ Figure 1.8 The logic board

Texas Instruments
touchscreen line
driver Power Apple Toshiba
Management IC A5 chip NAND flash

Broadcom touch
screen controller
27
Components of the Apple iPad 2

◼ Figure 1.9
Apple A5 chip

28

You might also like