Newest Viewed Downloaded

Main MemoryBecause computers operate by storing numbers as bit patterns, the address itself is also represented as a bit pattern Memory addresses are defined using unsigned binary integers

Foundations of Computer Science (計算機概論) Chapter 5 Computer Organization (計算機組織)

Outline

5.1 Central Processing Unit (CPU) 中央處理單元 5.2 Main Memory (主記憶體) 5.3 Input/Output (輸入/輸出)

Outline

5.4 Subsystem Interconnection (子系統之互連) 5.5 Program Execution (程式之執行) 5.6 Two Different Architectures (兩種不同的架構)

Computer Hardware (Subsystems)

A computer has three subsystems: the CPU, main memory, and the input/output subsystem.

5.1 Central Processing Unit (CPU) (中央處理器)

CPU

The CPU performs operations on data and has an ALU (算術邏輯單元), a control unit (控制單元), and a set of registers (暫存器). The ALU performs arithmetic (算術) and logical (邏輯) operations The registers are stand-alone (獨立的) storage devices that hold data temporarily Registers can hold data (資料), instructions (指令), and also function as a program counter (程式計數器) The control unit oversees (管理) operations in a computer

5.2 Main Memory (主記憶體)

Main Memory

Memory units Unit ------------ kilobyte megabyte gigabyte terabyte petabyte exabyte Exact Number of bytes ------------------------ 210 bytes 220 bytes 230 bytes 240 bytes 250 bytes 260 bytes Approximation ------------ 103 bytes 106 bytes 109 bytes 1012 bytes 1015 bytes 1018 bytes Main memory is a collection (大量) of storage locations The total number of uniquely (唯一) identifiable (可識別) locations in memory is called the address space (位址空間)

Main Memory

Because computers operate by storing numbers as bit patterns, the address itself is also represented as a bit pattern Memory addresses are defined using unsigned binary integers

Example

A computer has 32 MB (megabytes) of memory. How many bits are needed to address any single byte in memory? Solution The memory address space is 32 MB, or 225 (25 x 220). This means you need log2 225 or 25 bits, to address each byte.

Example

A computer has 128 MB of memory. Each word in this computer is 8 bytes. How many bits are needed to address any single word in memory? Solution The memory address space is 128 MB, which means 227 (27 x 220). However, each word is 8 (23) bytes, which means that you have 224 words. This means you need log2 224 or 24 bits, to address each word.

Memory Types

Two types of memory are available: RAM and ROM RAM provides the bulk (大量) of the memory in a computer, can be read from and written to by the user SRAM uses the traditional flip-flop gates (正反閘) to hold data, and DRAM uses capacitors (電容器) The contents of ROM come from the manufacturer (製造者); users are only allowed to read from it, but not write to it

Memory Types

Computers need high-speed memory for registers (暫存器) medium-speed memory for cache memory (快取記憶體 low-speed memory for main memory (主記憶體)

Cache

Cache memory is placed between the CPU and main memory. At any time contains a copy of a portion of main memory 80-20rule: It has been observed that most computers typically spend 80% of the time accessing only 20% of the data. In other words, the same data are accessed over and over again

5.3 Input/Output (輸入/輸出)

Input/Output

The input/output subsystem is a collection (大量) of devices that allows a computer to communicate with the outside world. These devices are either nonstorage (非儲存性) devices or storage (儲存性) devices The keyboard, monitor, and printer are examples of nonstorage devices A magnetic disk (磁碟) is a storage device

Magnetic (磁性) Storage Device

Magnetic disk (磁碟) Magnetic tap (磁帶)

Magnetic Disk

A magnetic disk (磁碟) is a storage device with each disk in the stack divided into tracks (磁軌) and sectors (磁區)

Physical Layout of a Magnetic Disk

Surface Organization of a Disk

Performance: access time (存取時間) = seek time (搜尋時間) + rotational time (轉動時間) + transfer time (轉移時間)

Showing 1 - 20 of 54 items Details

Name: 
ch05
Author: 
Shou-Li Hsu
Company: 
N/A
Description: 
Main MemoryBecause computers operate by storing numbers as bit patterns, the address itself is also represented as a bit pattern Memory addresses are defined using unsigned binary integers
Tags: 
the | memory | and | bytes | are | cpu | computer | data
Created: 
9/15/2005 6:07:57 PM
Slides: 
54
Views: 
0
Downloads: 
0
Rating: 
0


> Comment



Share this presentation
|

Comments

Share this presentation:

|
Sitemap