Ch-02 โครงสร้างระบบคอมพิวเตอร์

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 68

Chapter 2

โครงสร้ างระบบคอมพิวเตอร์
Organization of Computer System
Contents

การทางานของเครื่องคอมพิวเตอร์
ระบบสั ญญาณและการจัดเก็บข้ อมูลภายในเครื่องคอมพิวเตอร์
มาตรฐานการอ้ างอิงรหัสบนระบบคอมพิวเตอร์
หน่ วยโครงสร้ างพืน้ ฐานของคอมพิวเตอร์
อุปกรณ์ สนับสนุนการใช้ งานคอมพิวเตอร์

2
2.1 การทางานของเครื่ องคอมพิวเตอร์

ก่อนที่เราจะนาเครื่ องคอมพิวเตอร์
มาใช้ประโยชน์ในงานด้านใด ๆ ก็
ตาม ผูใ้ ช้จาเป็ นอย่างยิง่ ที่จะต้อง
เลือกใช้เครื่ องคอมพิวเตอร์ที่มี
ความสามารถเหมาะสมกับงานแต่
ละประเภท เราจึงควรจะทราบถึง
ส่ วนประกอบเบื้องต้นของเครื่ อง
คอมพิวเตอร์เพื่อเป็ นพื้นฐานใน
การทางาน
3
2.1 การทางานของเครื่ องคอมพิวเตอร์

หน่วยรับข้อมูล (Input Unit)


หน่วยประมวลผลกลาง (CPU : Central Processing Unit)
หน่วยความจา (Memory Unit)
หน่ วยความจาหลัก (Main/Primary/Internal Memory)
หน่ วยความจาสารอง (Secondary/Auxiliary/External Memory)
หน่วยแสดงผล (Output Unit)

4
2.1 การทางานของเครื่ องคอมพิวเตอร์

2 1 หน่ วยรับข้ อมูล(Input Unit)

2 หน่ วยประมวลผลกลาง(CPU)

3 หน่ วยความจา(Memory Unit)


1 4

3.1
3.1 หน่ วยความจาหลัก(Main
3 Memory)
3.2 หน่ วยความจาสารอง
(Secondary Memory)
3.2 4 หน่ วยแสดงผล(Output Unit)

5
2.2 ระบบสัญญาณและการจัดเก็บข้ อมูล
ภายในเครื่องคอมพิวเตอร์
เครื่ องคอมพิวเตอร์ทางานด้วยกระแสไฟฟ้ า จึงอาศัยคุณสมบัติของสัญญาณไฟฟ้ า
ซึ่งมี 2 สถานะ คือ เปิ ดและปิ ด ( On/Off ) สาหรับนามาสร้างสัญลักษณ์ต่าง ๆ
เพื่อใช้งานบนคอมพิวเตอร์ จึงเรี ยกว่าระบบเลขฐานสอง (Binary System)
ในที่น้ ีคาว่า “สัญลักษณ์” หมายถึง
ตัวอักษร (character)
ตัวเลข (numeric)
เครื่ องหมายวรรคตอน (punctuation mark)
สัญลักษณ์พิเศษต่าง ๆ
on 1 1 1 1 1

off 0 0 0 0 0
6
2.2 ระบบสัญญาณและการจัดเก็บข้ อมูล
ภายในเครื่องคอมพิวเตอร์
 บิต (Bit) 1

 นิบเบิล (Nibble) = 4 bit 1101

 ไบต์ (Byte) = 8 bit 10110101

 เวิร์ด (Word) = 16 bit 11010001 10111001

 ดับเบิลเวิร์ด (Double Word) = 32 bit


11010001 10111001 11010001 10111001

การประมวลผลแต่ละครั้งจะขึ้นอยูก่ บั ขนาดของเวิร์ด(Word) ซึ่งจะสอดคล้อง


กับสถาปั ตยกรรมของซีพียวู า่ มีขนาดกี่บิต เช่น 16 , 32 หรื อ 64 บิต เป็ นต้น
นอกจากนี้จานวนบิตที่ใช้ในการสร้างรหัสยังขึ้นอยูก่ บั มาตรฐานที่นามา
อ้างอิงด้วย 7
2.2 ระบบสัญญาณและการจัดเก็บข้ อมูล
ภายในเครื่องคอมพิวเตอร์
การเปรี ยบเทียบรหัสเลขฐานสองกับตัวอักษรแต่ละตัวของคาว่า
Hello ซึ่งประกอบด้วยเลขฐานสองจานวน 5 bytes

8
2.2 ระบบสัญญาณและการจัดเก็บข้ อมูล
ภายในเครื่องคอมพิวเตอร์
คานาหน้าเพื่อกาหนดปริ มาณของข้อมูลทางคอมพิวเตอร์
Prefix คาอ่ าน จานวน
K Kilo ( กิโล ) 210 = 1,024
M Mega ( เมกะ ) 220 = 210  210
G Giga ( กิกะ ) 230 = 220  210
T Tera ( เทอรา ) 240 = 230  210
P Peta ( เพทตะ ) 250 = 240  210
9
2.3 มาตรฐานการอ้ างอิงรหัสบนระบบคอมพิวเตอร์

รหัสแอสกี ( ASCII- CODE )


กาหนดขึ้นเป็ นครั้งแรกโดยสถาบันมาตรฐานแห่ งสหรัฐอเมริ กา (ANSI : American
National Standard Institute) เรี ยกว่า
รหัสแอสกี (ASCII : American Standard Code for Information Interchange)

ซึ่งแต่เดิมเป็ นรหัสขนาด 7 บิต ใช้แทนตัวอักษร , ตัวเลขและสัญลักษณ์ต่าง ๆ จานวน


128 แบบ ( 2 7 = 128 ) จากนั้นมีการเพิ่มบิตภายหลังเป็ นรหัสขนาด 8 บิต โดยบิตที่เพิ่ม
เข้ามามีไว้สาหรับตรวจสอบความถูกต้องในการส่ งข้อมูลเรี ยกว่า พาริ ตีบิต (parity bit)
ดังนั้นรหัสแอสกีขนาด 8 บิต ทาให้มีสญ ั ลักษณ์ที่จะใช้บนเครื่ องคอมพิวเตอร์จานวน
256 แบบ ( 2 8 = 256 )

10
2.3 มาตรฐานการอ้ างอิงรหัสบนระบบคอมพิวเตอร์

เอบซีดคิ ( EBCDIC : Extended Binary Coded Decimal Interchange


Code)
รหัสเอบซีดิคเป็ นมาตรฐานการสร้างรหัสแทนสัญลักษณ์บนระบบคอมพิวเตอร์
ระดับเมนเฟรมของบริ ษทั ไอบีเอ็ม ( IBM : International Business Machines
Corporation ) และเป็ นรหัสขนาด 8 บิต แต่เนื่องจากปัญหาของการแปลงข้อมูล
ระหว่างเครื่ องคอมพิวเตอร์ที่ใช้รหัสมาตรฐานต่างกัน ทาให้ผผู ้ ลิตอุปกรณ์
คอมพิวเตอร์และซอฟต์แวร์อื่น ๆ เลือกใช้มาตรฐานรหัสแอสกีเป็ นส่ วนใหญ่

11
2.3 มาตรฐานการอ้ างอิงรหัสบนระบบคอมพิวเตอร์

ยูนิโค้ ด ( Unicode )
เนื่องจากความต้องการที่จะใช้ประโยชน์จากคอมพิวเตอร์มีแนวโน้มสูงขึ้น สร้าง
ขึ้นมาเพื่อรองรับสัญลักษณ์แบบต่าง ๆ อย่างเพียงพอกับภาษาและวัฒนธรรมทาง
สังคมของชนชาติน้ นั ๆ ดังนั้นรหัสยูนิโค้ดจึงถูกพัฒนาขึ้นโดยองค์กรกาหนด
มาตรฐานสากล ( ISO : International Organization for Standardization )
ซึ่งเป็ นรหัสขนาด 16 บิต ทาให้มีรหัสรองรับสัญลักษณ์แบบต่าง ๆ ได้ถึง 65,536
แบบ ( 216 = 65,536 ) โดยรวมรหัสแอสกีไว้ดว้ ยเรี ยกว่า ยูทีเอฟ-8 ( UTF-8 :
Unicode Transformation Formats )
รู ปแบบการเข้ารหัส (Character Encoding Scheme) แบบยูนิโค้ด มีดว้ ยกัน 7 แบบ
คือ UTF-8 , UTF-16 , UTF-16BE , UTF-16LE , UTF-32 , UTF-32BE , UTF-
32LE
12
2.3 มาตรฐานการอ้ างอิงรหัสบนระบบคอมพิวเตอร์

ตัวอย่ าง ตาราง ASCII Code

13
2.4 หน่ วยโครงสร้ างพืน
้ ฐานของคอมพิวเตอร์

 จากสถาปัตยกรรมของวอนนิวแมน ( von Neumann architecture ) ผูซ้ ่ ึงเคยให้


แนวคิดเกี่ยวกับคอมพิวเตอร์และสร้างเครื่ อง EDSAC ขึ้นมา ณ
มหาวิทยาลัยเคมบริ ดนั้น ทาให้สามารถกาหนดหน่วยโครงสร้ างพืน้ ฐานของ
คอมพิวเตอร์ ประกอบด้ วย 4 หน่ วยหลัก ดังนี้
1. Input Unit/Device 2

2. Processing Unit
3. Memory Unit
1 4
4. Output Unit/Device 3.1
3

3.2

14
บัส : BUS

บัสในระบบคอมพิวเตอร์คือเส้นทางการติดต่อสื่ อสารเพื่อรับส่ งข้อมูล


ระหว่างอุปกรณ์ เป็ นเส้นทางที่ใช้ในการสื่ อสารร่ วมกัน(Share Transmission
Medium)
CUP
Input/Output
(ALU,Register, Memory
(I/O)
Control)

Data Bus
System Bus

Address Bus

Control Bus
15
Data bus

 Data Bus หรือ Bus ข้ อมูลจะทาหน้ าทีใ่ นการกาหนดเส้ นทางการเคลือ่ นทีข่ องข้ อมูล
ระหว่ างโมดูลในระบบ ตามปรกติแล้ วบัสมีขนาด 8 ,16,32 เส้ น ซึ้งใช้ ในการอ้ างอิงความ
กว้ างของช่ องสั ญญาณ(Bandwidth) ในแต่ ละเส้ นจะเก็บข้ อมูลได้ 1 บิตในหนึ่งช่ วงเวลา
จานวนของเส้ นจะเป้นตัวกาหนดว่ ามีจานวนบิตเท่ าไรที่สามารถส่ งได้ ในหนึ่งช่ วงเวลา
Ex. เช่ นดาต้ าบัสมีขนาด 8 บิต แต่ คาสั่ งมีความยาว 16 บิต ดังนั้นระบบจะต้ องทาการเอก
เซสหน่ วยความจา 2 รอบต่ อหนึ่งคาสั่ ง
CUP Input/Output
(ALU,Register, Memory
Control) (I/O)
System Bus

Data Bus
Address Bus
Control Bus
16
Address bus

 บัสตาแหน่ ง ออกแบบมาเพือ่ เป็ นแหล่งเก็บ (Source and Destination) ข้ อมูลในดาต้ าบัสทีจ่ ะใช้ ส่ง
ตาแหน่ งของข้ อมูลทีต่ ้ องการไปยังหน่ วยความจา
 ขนาดของ Address Bus จะเป็ นตัวกาหนดขนาดความจุของหน่ วยความจาในระบบ เช่ น Processors มี
เส้ น Address จานวนมากก็จะทาให้ สามารถอ้ างอิงหน่ วยความจาได้ มากด้ วย เช่ น CUP 8088 มีเส้ น
Address Bus จานวน 20 เส้ นดังนั้นจึงสามารถอ้ างถึงหน่ วยความจาได้ 1 Mb (220) = 1024 x 1024
Ex. Pentium มีเส้ น Address Bus = 32 เส้ น จึงอ้ างถึงหน่ วยความจาได้ 4 Gb
นอกจากนั้นแล้ว Address bus ยังใช้ ในการกาหนดตาแหน่ งของ I/O Port อีกด้ วย
CUP Input/Output
(ALU,Register, Memory
Control) (I/O)
System Bus

Data Bus
Address Bus
Control Bus
17
Control bus

 Control Bus หรือบัสควบคุม จะใช้ ในการควบคุมการ Access การใช้ งาน Data Bus และ
Address Bus คอนโทรลบัสจะควบคุมทั้งการควบคุมสั ญญาณทั้งคาสั่ ง (command) และ
เวลา(Timing) ระหว่ างโมดูลในระบบโดยทีส่ ั ญญาณ Timing จะเป็ นตัวบ่ งชี้ข้อมูลและ
ตาแหน่ ง ในขณะที่ Command จะเป็ นตัวระบุการปฎิบัตงิ าน

CUP Input/Output
(ALU,Register, Memory
Control) (I/O)
System Bus

Data Bus
Address Bus
Control Bus
18
2.4 หน่ วยโครงสร้ างพืน
้ ฐานของคอมพิวเตอร์

2 1 หน่ วยรับข้ อมูล(Input Unit)

2 หน่ วยประมวลผลกลาง(CPU)

3 หน่ วยความจา(Memory Unit)


1 4

3.1
3.1 หน่ วยความจาหลัก(Main
3 Memory)
3.2 หน่ วยความจาสารอง
(Secondary Memory)
3.2 4 หน่ วยแสดงผล(Output Unit)

19
หน่ วยรับข้ อมูล : Input Unit / Device

อุปกรณ์ที่ทาหน้าที่ในการรับข้อมูลชนิดต่าง ๆ ที่ผใู ้ ช้สามารถกาหนดการทางาน


ให้กบั เครื่ องคอมพิวเตอร์ได้ เช่น แป้ นพิมพ์ , เมาส์ , และสแกนเนอร์ เป็ นต้น

microphone PC camera
keyboard

mouse
scanner

digital
camera

20
หน่ วยประมวลผลกลาง : CPU (Central Processing Unit)

หน่วยประมวลผลหมายถึงอุปกรณ์ที่ทาหน้าที่ประมวลผลคาสัง่ เปรี ยบเสมือนสมอง


ของคอมพิวเตอร์ที่ผใู ้ ช้ป้อนคาสัง่ ให้โดยผ่านทางอุปกรณ์รับข้อมูล หน่วยประมวลผล
กลางของเครื่ องคอมพิวเตอร์น้ ี เราเรี ยกว่า ซีพียู (CPU : Central Processing Unit)
สาหรับซีพียทู ี่ใช้บนเครื่ องระดับพีซีจะเรี ยกว่าไมโครโปรเซสเซอร์(Microprocessor)
ภายในประกอบด้วยหน่วยการทางานย่อย 2 หน่วย ได้แก่
หน่ วยคานวณและเปรียบเทียบเรียกว่ า เอแอลยู (ALU : Arithmetic and Logic Unit)
หน่ วยควบคุมเรียกว่ า ซียู (CU : Control Unit)

21
หน่ วยประมวลผลกลาง : CPU (Central Processing Unit)

22
หน่ วยประมวลผลกลาง : CUP (Central Processing Unit)

 CPU ประกอบด้ วย
 ALU (Arithmetic Logic Unit)
 CU (Control Unit)

CPU

Control Unit Arithmetic/


Logic Unit
(ALU)

23
CUP (Central Processing Unit)

24
ALU : Arithmetic Logic Unit

เป็ นหน่ วยคานวณและเปรียบเทียบทางตรรกะ เช่ น


 การบวก ลบ คูณ และหาร
 แสดงค่าความจริ งทางตรรกศาสตร์ Comparison
(greater than, equal
เช่น การเท่ากัน มากกว่าและน้อยกว่า to, or less than)

Arithmetic
(addition, subtraction, Logical
multiplication, and (AND, OR,
division) NOT)

25
CU : Control Unit

Control Unit คือหน่วยควบคุม ทาหน้าที่ควบคุมการดาเนินงานของซีพียู เช่น ควบคุม


การทางานระหว่างหน่วยความจากับหน่วยคานวณและเปรี ยบเทียบ , ควบคุมการทางาน
ระหว่างซีพียกู บั หน่วยรับข้อมูลและหน่วยแสดงผล
CU มีการทางานทั้งหมด 4 ขั้นตอน :
Fetch ดึงชุดคาสัง่ หรื อข้อมูลจาก Memory เข้าสู่ ภายใน CPU
Decode ทาการแปลงชุดคาสัง่ (instruction) เป็ นคาสัง่
Control Unit ภายใน (commands)
Execute ทาการประมวลผลตามคาสัง่ ให้ได้ผลลัพธ์
Store บันทึกผลที่ได้จากการประมวลผลไปเก็บใน Memory

26
CUP (Central Processing Unit)

การทางานทั้ง 4 ขั้นตอนอยูภ่ ายใน CPU เราเรี ยกว่า machine cycle หรื อ


instruction cycle โดยแบ่งเป็ น 2 ขั้นตอนย่อยดังนี้
Instruction time (i-time) - time taken to fetch and decode
Execution time (e-time) - time taken to execute and store

e-time i-time

27
CUP (Central Processing Unit)

100 x
An example of a machine cycle
52
Student enters math
problem (100 x 52)
into computer’s
memory

Result in memory
displays on
monitor’s screen

28
CUP (Central Processing Unit)

How is the CPU’s speed measured?


 According to how many Millions of Instructions Per Second
(MIPS) it can process

29
CUP (Central Processing Unit)

เทคโนโลยีที่ใช้สร้างซี พียแู บ่งออกเป็ น 2 สถาปั ตยกรรม คือ


CISC (Complex Instruction Set Computer)ได้แก่ซีพียอู ินเทลโปรเซสเซอร์
(Intel) , เอเอ็มดี(AMD) และไซริ กซ์ เป็ นต้น
RISC (Reduced Instruction Set Computer) ได้แก่ซีพียสู ปาร์ค (SPARC)
ของบริ ษทั ซันไมโครซิสเต็ม, พาวเวอร์พีซี (PowerPC) ของบริ ษทั ไอบีเอ็ม
และอัลฟ่ า(Alpha) ของบริ ษทั ดิจิตอลอิควิปเมนต์ เป็ นต้น
ปั จจุบนั สถาปั ตยกรรมของซี พียมู ีเทคโนโลยีใหม่ เรี ยกว่า VLIW (Very
Long Instruction Word)ใช้กบั ซี พียตู ระกูลครู โซ่ (Crusoe family) ของ
บริ ษทั ทรานซ์เมตา(Transmeta Corp.) ถูกออกแบบมาเพื่อใช้บน
คอมพิวเตอร์แบบโน้ตบุ๊คหรื อพีดีเอ
30
สถาปั ตยกรรม CPU

ชนิดของ CPU ข้ อดี ข้ อเสี ย


CISC 1. เครื่ องคอมพิวเตอร์ส่วนมากใช้ 1. กระบวนการผลิตซับซ้อนทา
รู ปแบบนี้ ให้เกิดข้อผิดพลาดได้ง่ายกว่า
2. มีโปรแกรมสนับสนุนมากมาย 2. โปรแกรมประเภทกราฟฟิ ก
เนื่องจากผูผ้ ลิตรายใหญ่ในตลาด เมื่อรันบน CPU แบบ CISC
CPU คือ Intel และ Software คือ จะช้ากว่า RISC
Microsoft
RISC 1. การออกแบบ CPU ทาได้ง่ายกว่าและ 1. ผูพ้ ฒั นาโปรแกรมส่ วนใหญ่
ใช้กาลังไฟน้อยกว่า ทาให้กบั CISC มากกว่า
2. โปรแกรมทางกราฟฟิ กทางานได้ เนื่องจากการตลาด
รวดเร็ วกว่า 2. ตลาด CPU ส่ วนใหญ่เป็ นของ
Intel
31
CPU รุ่ นต่ างๆ ที่มีในตลาดบ้ านเรา

1. รุ่นก่ อนแพนเทียม (Pre-Pentium Processors) เช่น 8086,80286,80386


2. เพนเทียม(Pentium Processors) ปี ค.ศ. 1993 มีการใช้สถาปัตยกรรม Super Scalar ทา
ให้ประมวลผลได้มากกว่า 1 คาสัง่ ต่อ Clock Cycle และต่อมามีการผนวกความสามารถ
ด้าน Multimedia : MMX โดยมีชื่อเรี ยกรุ่ นนี้อีกชื่อว่า Pentium Classic
3. เพนเทียมโปร (The Pentium Pro) เป็ น CPU ที่มีการนาเอาโครงสร้างของแบบ CISC
และ RISC มารวมกันเหมาะกับงานที่ตอ้ งการประสิ ทธิภาพสู งเช่นเครื่ อง SERVER
4. เพนเทียมทู(Pentium II) เปลี่ยนจากรู ปแบบของ Socket มาเป็ น Slot1
5. เซเลรอน(Celeron) มีโครงสร้างภายในคล้าย Pentium II แต่วา่ หน่วยความจาแคชจะน้อย
กว่า ใช้งานตามกลุ่มผูใ้ ช้ระดับกลาง

32
CPU รุ่ นต่ างๆ ที่มีในตลาดบ้ านเรา

6. เพนเทียมทูซีออน(Pentium II Eeon) เป็ น CPU ที่ออกแบบมาเพื่อการใช้งานเป็ น Server


มีหน่วยความจาแคชมากถึง 2 MB โดยมีรูปแบบการเชื่อมต่อแบบ Slot 2
7. เพนเทียมทรี(Pentium III) ใช้เทคโนโลยี 0.18 ไมครอนสนับสนุนบัสที่ 133 MHz
8. เพนเทียมทรีซีออน(Pentium III Xeon) คล้ายกับ Pentium II Xeon แต่มีชุดคาสัง่ เพื่มขึ้น
ถึง 70 คาสัง่
9. เพนเทียมโฟร์ (Pemtium IV) ใช้เทคโนโลยีใหม่ที่เรี ยกว่า Hyper Threding) โดยการ
จาลองรู ปแบบการทางานของโปรเซสเซอร์หนึ่งตัวให้มีการทางานแบบ Multi
Processors
10. เพนเทียมคอร์ ทู/คอร์ ทูดูโอ (Core II / Core DUO)โครงสร้างภายในจะมี CPU ทางานอยู่
สองตัวด้วยกัน ทาให้การทางานมีความเร็ วมากขึ้น

33
Memory

หน่ วยความจา (Memory) หมายถึงอุปกรณ์ที่ใช้บนั ทึกคาสัง่ และข้อมูล


เปรี ยบเสมือนที่เก็บความจาของคอมพิวเตอร์ ซึ่ งจะมีความสาคัญมากใน
การทางานร่ วมกับซี พียู
หน่วยความจาแบ่งออกเป็ น 2 กลุ่ม คือ
หน่วยความจาที่ใช้พ้นื ที่สาหรับการประมวลผลของซีพียู เรี ยกว่า
หน่ วยความจาหลัก ( Main / Primary / Internal Memory )
หน่วยความจาที่ใช้บนั ทึกแฟ้ มข้อมูลประเภทต่าง ๆ ( ภายนอกซีพียู ) เรี ยกว่า
หน่ วยความจาสารอง ( Secondary / Auxiliary / External Memory )

34
Main Memory

หน่ วยความหลักแบ่ งออกเป็ น 2 ชนิด:


1. Volatile Memory เป็ นหน่วยความจาที่ถา้ ไม่มีไฟเลี้ยงข้อมูลในนั้นจะหาย
หมด ซึ่ งได้แก่ RAM (Random Access Memory)
2. Non-Volatile Memory เป็ นหน่วยความจาชนิดที่เมื่อไม่มีไฟเลี้ยงข้อมูลที่อยู่
ภายในก็ยงั คงอยู่ (ROM = Read Only Memory)

volatile memory nonvolatile memory


Loses its contents when Does NOT lose its contents when
computer's power computer’s power is turned off
is turned off ROM (Read-Only Memory)
RAM PROM (Programmable ROM)
EPROM (Erasable PROM) EEPROM
(Random Access Memory) (Electrical Erasable PROM)
Read-Write Memory

35
ชนิดของหน่ วยความจา RAM

1. หน่ วยความจาแบบ Static RAM (SRAM)


 เป็ นหน่วยความจาที่พฒั นามาจากทรานซิสเตอร์
 ข้อมูลจะคงอยูใ่ นหน่วยความจา
 เป็ นหน่วยความจาที่มีความเร็ วสูง
 มีราคาแพง
 มักนาไปใช้เป็ นหน่วยความจาแคช (Cache memory)
2. หน่ วยความจาแบบไดนามิก Dynamic RAM (DRAM)
 เป็ นหน่วยความจาที่ทามากจาก คาปาซิเตอร์
 จาเป็ นต้องมีกระแสไฟ Refresh ตัวเองอยูต่ ลอดเวลาเพื่อไม่ให้ขอ้ มูลหาย
 ทาช้าเพราะต้องรี เฟสตัวเองตลอดเวลา
 มักใช้งานเป็ นหน่วยความจาหลัก

36
Cache Memory

เป็ นหน่วยความจาชนิดหนึ่งซึ่งมีความรวดเร็ วในการเข้าถึงและการถ่ายโอน


ข้อมูล โดยตาแหน่งของหน่วยความจาแคชนั้นจะอยูร่ ะหว่าง CPU กับ
หน่วยความจาหลัก ซึ่งมีท้ งั แคชภายในและแคชภายนอก หน่วยความจาแคช
จะมีหน้าที่ในการดึงข้อมูลและเก็บข้อมูลที่มกั ใช้งานบ่อยๆจากหน่วยความจา
หลักมาเก็บไว้เพื่อส่ งผ่านไปยัง CPU ต่อไป
L1 = Internal Cache มีความเร็วในการ
ทางานเท่ ากับ CPU
L2 = External Cache จะออกแบบไว้ อยู่
ภายนอก CPU เช่ นอยู่บน Mainboard ของ
เครื่อง

37
Secondary Memory

 หน่ วยความจาสารอง หมายถึง อุปกรณ์ที่ใช้เป็ นสื่ อในการบันทึกแฟ้ มข้อมูลหรื อติดตั้ง


โปรแกรมสาหรับใช้งานบนเครื่ องคอมพิวเตอร์ โดยจะแบ่งการทางานออกเป็ นสองส่ วน
คือ ส่ วนที่ใช้เป็ นสื่ อในการเก็บข้อมูล ( Storage Media ) และส่ วนที่เป็ นเครื่ องอ่านหรื อ
บันทึกข้อมูล ( Storage Media Drive )

 สาหรับประเภทของสื่ อที่ใช้ในการเก็บข้อมูล (Storage) สามารถแบ่งได้เป็ นสองลักษณะ


ตามคุณสมบัติทางกายภาพคือ สื่ อที่เป็ นแม่เหล็ก ได้แก่ แผ่นฟล็อปปี้ ดิสก์ ( Magnetic
disk ) , เทป ( Magnetic tape ) , ฮาร์ดดิสก์ ( Hard disk ) เป็ นต้น และสื่ อที่บนั ทึกด้วย
แสง ( optical ) ได้แก่ แผ่นซีดีรอม ( CD-ROM : Compact Disk Read Only Memory
) , DVD-ROM และ CD-RW เป็ นต้น

38
Storage

What is storage?
 Media and devices used to store and retrieve data,
instructions, and information

39
Memory Versus Storage

How does storage


differ from
memory?
When you
 Stores items for want to work When you are
future use, rather with a file, finished with
than temporarily you read it the file, you
write it from
 Storage is from storage
memory into
nonvolatile, rather and place it in
memory storage
than volatile

40
Memory Versus Storage

Contents of
storage
retained when
power is off

Screen display and contents


of most RAM (memory)
erased when power is off

41
Memory Versus Storage

ความสัมพันธ์ระหว่าง
ราคาและความเร็ วของ
หน่วยความจา Memory
(RAM)

Hard
cost Disk speed

Compact
Disc

Floppy Disk

Tape

42
อุปกรณ์ เก็บข้ อมูลโดยคุณสมบัตขิ องสื่ อแม่ เหล็ก
(Magnetic Storage System)
ดิสเก็ตต์ และ ดิสไดรว์ (Diskette and Disk drive)
ฮาร์ดดิสก์ และ ฮาร์ดไดรว์ (Hard disk and Hard drive)
ซิ ปดิสก์ และ ซิ ปไดรว์ (Zip disk and Zip drive)
เทป และ เทปไดรว์ (Tape and Tape drive)

43
Floppy Disks

 What is a floppy disk?


 Portable, inexpensive storage medium
 Today’s standard disk is 3.5” wide

44
Floppy Disks

 What are the parts of a floppy disk?

liner

shutter

metal
hub

magnetic flexible
shell coating thin film

45
Floppy Disks

 How are floppy disk drives designated?

One floppy drive


drive A

Two floppy
drives
drive A

drive B

46
Floppy Disks

 How does a floppy disk drive work?


1: Shutter moves to 2: Signal sent to control 3: If write instruction, circuit
expose recording movement of read/write board verifies whether disk
surface on disk heads and disk can be written to
Step 2
4: Motor causes floppy
Step 1
disk to spin
Step 6
5: Motor positions
read/write heads over
correct location on disk
Step 5

6: Read/write heads Step 4


read data from or
Step 3
write data on the
floppy disk

47
Floppy Disks

 What are tracks sector


and sectors? 18 per track
track
 Track is narrow 80 per
recording band that side
forms full circle on
disk surface
 Sector can store up
to 512 bytes of data

80 tracks per side X 18 sectors per track X 2 sides per disk X


512 bytes per sector = 1,474,560 bytes

48
Floppy Disks

 What is formatting?
 Process of preparing disk for reading and writing
 Formatting marks bad sectors as unusable

49
Floppy Disks

 What is a write-protect notch?

notch open
means you
cannot write
on the disk write-protected

not write-
notch closed
protected
means you
can write on
the disk

50
Hard Disks

What is a hard disk?

 High-capacity storage
 Consists of several
inflexible, circular platters
that store items
electronically
 Components enclosed in
airtight, sealed case for
protection
hard disk
installed in
system unit

51
Hard Disks

How does a hard disk work? 3: When software


requests disk
1: Circuit board controls 2: Small motor access, read/write
movement of head spins platters heads determine
activator and small motor location of data

Step 1 Step 2
4: Head actuator
positions
read/write head
arms over correct
location on
platters to read or
write data

Step 3
Step 4

52
Hard Disks

 What is a cylinder? cylinder track


 Location of a single track
through all platters
 Single movement of read/write
head arms can read same track
on all platters

53
Compact Discs (CD)

 What is a compact disc (CD)?


 Storage medium
 Most PCs include some type of
compact disc drive
 Available in
variety of
formats

54
Compact Discs (CD)

 How does a laser read data on a compact disc?


Compact disc
1: Laser diode shines light Step 3
1
2 label
beam toward compact disc

2: If light strikes pit, it


scatters. If light strikes land,
it is reflected back toward
laser diode. pit land
lens lens

3: Reflected light deflected 0 1


to light-sensing diode,
which sends digital signal prism prism
of 1. Absence of reflected
light read as digital signal Light- Light-
sensing sensing
of 0. diode diode
laser laser
diode diode
55
Compact Discs (CD)

 How is data stored on a compact disc?


 Typically stores items in single track
 Track divided into evenly sized sectors that store items

Single track spirals


to edge of disc

Compact disc sectors

56
What is Output?

 What Is output?
 Data that has been
processed into a
useful form, called
information
text
graphics

video

audio

57
What Are Output Devices?

 Any hardware component that can convey information to


a user

monitor speakers

printer

58
Display Devices

 What is a CRT monitor?


 Large sealed, glass screen cathode ray tube
 Screen coated with tiny dots of
phosphor material
 Pixel, or picture element, is
single point in electronic image
 Three dots (red, blue, and
green) combine to make up
each pixel

CRT monitor screen

59
Display Devices

 What is a video card?


 Converts digital output from computer into analog video signal
 Controls how display device produces picture
 Also called graphics card or video adapter

60
Display Devices

 How does video travel from the


processor to a CRT monitor? Step 1
Step 2
1: Processor sends digital data to video card
2: Video card converts digital data to analog
signal
3: Analog signal sent via cable to CRT monitor Step 3
4: CRT separates signal into red, green, and
blue signals
5: Electron guns fire color signals to front of CRT
6: Image displays Step 4

Step 5
Step 6

61
Printers

 What is a printer?
 Output device that produces text and graphics on paper
 Result is hard copy, or printout

62
Dot-matrix Printer

 What is a dot-matrix printer?


 Impact printer that produces printed images when tiny wire pins on print
head mechanism strike inked ribbon
 Most use continuous-form paper

63
Line Printer

 What is a line printer?


 High-speed impact printer that prints entire line at a time
 Speed measured by number of lines per minute (lpm) it can print
 Band printer prints fully-formed characters using a hammer
mechanism
 Shuttle-matrix printer is high-speed printer that works more like a
dot-matrix printer

64
Ink-jet Printer

 What is an ink-jet printer?


 Nonimpact printer forms characters and graphics by spraying
tiny drops of liquid ink onto piece of paper
 Most popular type of color printer for home use

65
Laser Printer

 What is a laser printer?


 High-speed, high-quality nonimpact printer
 Prints text and graphics in very high-quality resolution, ranging from
600 to 1,200 dpi
 Typically costs more than ink-jet printer, but is much faster

66
Laser Printer

 How does a laser


printer work?
1: Drum rotates as paper is fed
through rotating mirror
2: Mirror deflects laser beam
across surface of drum drum

3: Laser beam creates charge


that causes toner to stick to
drum
4: As drum rotates, toner rollers
transfers from drum to paper
5: Rollers use heat and
pressure to fuse toner to
paper

67
The End and Questions?

68

You might also like