Bài giảng Kiến trúc máy tính: Bộ nhớ và các thiết bị lưu trữ - Nguyễn Ngọc Hóa

92 8 0
Bài giảng Kiến trúc máy tính: Bộ nhớ và các thiết bị lưu trữ - Nguyễn Ngọc Hóa

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

Thông tin tài liệu

Bài giảng Kiến trúc máy tính: Bộ nhớ và các thiết bị lưu trữ cung cấp cho người học các kiến thức: Khái niệm chung, bộ nhớ chính, bộ nhớ cache, bộ nhớ ngoài (các thiết bị lưu trữ), tổng kết và bài tập. Mời các bạn cùng tham khảo nội dung chi tiết.

Kiến trúc máy tính Bộ nhớ thiết bị lưu trữ NGUYỄN Ngọc Hố Bộ mơn Hệ thống thơng tin, Khoa CNTT Trường Đại học Công nghệ, Đại học Quốc gia Hà Nội 16 September 2015 Hoa.Nguyen@vnu.edu.vn Nội dung Khái niệm chung Bộ nhớ Bộ nhớ cache Bộ nhớ (các thiết bị lưu trữ) Tổng kết tập Tham khảo chương 4,5,6 [1] Computer Architecture – –Department Department of ofInformation Information Systems Systems @ @Hoá NGUYỄN NGUYEN Ngọc Hoá Khái niệm  Bộ nhớ: thiết bị bảo quản khôi phục thông tin  Từ nhớ: tập bits đọc hay ghi đồng thời  Các kiểu vật liệu nhớ:     Bán dẫn – semiconductor (register, cache, nhớ chính, …) Từ - mangnetic (đĩa mềm, đĩa cứng, …) Optic (CD-ROM, DVD-ROM) … Computer Architecture – –Department Department of ofInformation Information Systems Systems @ @Hoá NGUYỄN NGUYEN Ngọc Hoá Đặc điểm Vị trí Dung lượng Đơn vị truyền Kiểu truy cập Hiệu Kiểu vật liệu Đặc trưng vật liệu Tổ chức Computer Architecture – –Department Department of ofInformation Information Systems Systems @ @Hoá NGUYỄN NGUYEN Ngọc Hoá Đặc điểm…  Vị trí     Dung lượng    CPU Internal External Phụ thuộc vào kích thước từ nhớ, Số lượng từ nhớ Đơn vị truyền    Bên trong: phụ thuộc vào độ rộng bus liệu Bên ngồi: block(>từ nhớ) Đơn vị đánh địa Computer Architecture – –Department Department of ofInformation Information Systems Systems @ @Hoá NGUYỄN NGUYEN Ngọc Hoá Đặc điểm…  Kiểu truy cập   Tuần tự: VD băng từ Trực tiếp:      Ngẫu nhiên:     Mỗi block có địa Truy cập = cách nhảy đến vùng lân cập tìm Thời gian truy cập vào vị trị tại trước VD: HardDisk, Floppy Disk,… Mỗi địa xác định xác vị trí Thời gian truy cập khơng phụ thuộc vào vị trí lần truy cập trước VD: RAM, … Kết hợp:    Một từ định vị thông qua việc sử dụng phần nội dung từ Thời gian truy cập khơng phụ thuộc vào vị trí lần truy cập trước VD: cache, … Computer Architecture – –Department Department of ofInformation Information Systems Systems @ @Hoá NGUYỄN NGUYEN Ngọc Hoá Đặc điểm…  Chiến thuật phân cấp nhớ: How much? How fast? How expensive?  Registers  L1 Cache  L2 Cache  Main memory  Disk cache  Disk  Optical  Tape Computer Architecture – –Department Department of ofInformation Information Systems Systems @ @Hoá NGUYỄN NGUYEN Ngọc Hoá Đặc điểm…  Hiệu năng:     Thời gian truy cập: khoảng thời gian từ gửi địa thu liệu trọn vẹn Thời gian chu trình nhớ - Memory Cycle Time:  Thời gian nhớ đòi hỏi để “hồi phục” trước lần truy cập  = access + recovery Tốc độ chuyển liệu Kiểu vật liệu:  Semiconductor :RAM  Magnetic: Disk & Tape  Optical: CD & DVD  Others: Bubble, Hologram Computer Architecture – –Department Department of ofInformation Information Systems Systems @ @Hoá NGUYỄN NGUYEN Ngọc Hoá Đặc điểm…  Đặc trưng vật liệu:      Phân rã - Decay Dễ thay đổi - Volatility Có thể xố - Erasable Năng lượng tiêu thụ Tổ chức:    Cách thức xếp bits từ Thường không rõ ràng VD: interleaved Computer Architecture – –Department Department of ofInformation Information Systems Systems @ @Hoá NGUYỄN NGUYEN Ngọc Hoá Bộ nhớ  Bộ nhớ bên máy tính    Semi-conductor Truy cập ngẫu nhiên Kiểu:   RAM- Random Access Memory: lưu giữ liệu tạm thời ROM – Read Only Memory: lưu giữ thông tin cố định Computer Architecture – –Department Department of ofInformation Information Systems Systems @ @Hoá NGUYỄN NGUYEN Ngọc Hoá 10 Magnetic Disks Computer Architecture – –Department Department of ofInformation Information Systems Systems @ @Hoá NGUYỄN NGUYEN Ngọc Hoá 78 Magnetic Disks  Ưu điểm: rẻ($/MB), độ tin cậy chấp nhận   Nhược: đọc/ghi tồn sector   Primary storage, memory swapping  truy cập trực tiếp nhớ Thời gian truy cập đĩa  Queuing delay   Seek time   Head moves to correct track Rotational latency   Wait until disk gets to this operation Correct sector must get under the head Data transfer time and controller time Computer Architecture – –Department Department of ofInformation Information Systems Systems @ @Hoá NGUYỄN NGUYEN Ngọc Hoá 79 Khuynh hướng đĩa từ  Dung lượng: ~gấp đôi sau năm  Thời gian truy cập trung bình   Latency quay trung bình (1/2 full rotation)    5-12ms (việc cải thiện tốc độ tương đối chậm) 5,000 RPM to 10,000 RPM to 15,000 RPM Cải thiện chậm, phức tạp (reliability, noise) Tốc độ truyền liệu  Phục thuộc vào bề mặt đĩa, liệu track Computer Architecture – –Department Department of ofInformation Information Systems Systems @ @Hoá NGUYỄN NGUYEN Ngọc Hoá 80 Đĩa quang  Giới hạn chuẩn    CD and DVD capacity fixed over years Technology actually improves, but it takes time for it to make it into new standards Kích thước bé, dễ thay  Good for backups and carrying around Computer Architecture – –Department Department of ofInformation Information Systems Systems @ @Hoá NGUYỄN NGUYEN Ngọc Hoá 81 Băng từ  Thời gian truy cập chậm   Chi phí thấp ($/MB)    Must rewind tape to correct place for read/write It’s just miles of tape! But disks have caught up anyway… Được sử dụng để lưu liệu (secondary storage)  Large capacity & Replaceable Computer Architecture – –Department Department of ofInformation Information Systems Systems @ @Hoá NGUYỄN NGUYEN Ngọc Hoá 82 RAM for Storage  Disks are about 100 times cheaper ($/MB)  DRAM is about 100,000 faster (latency)  Solid-State Disks  Actually, a DRAM and a battery    Much faster than disk, more reliable Expensive (not very good for archives and such) Flash memory    Much faster than disks, but slower than DRAM Very low power consumption Can be sold in small sizes (few GB, but tiny) Computer Architecture – –Department Department of ofInformation Information Systems Systems @ @Hoá NGUYỄN NGUYEN Ngọc Hoá 83 Một số vấn đề lỗi  Phân loại theo nguyên nhân  Hardware Faults   Design Faults    Faults in software and some faults in HW E.g the Pentium FDIV bug was a design fault Operation Faults   Hardware devices fail to perform as designed Operator and user mistakes Environmental Faults  Fire, power failure, sabotage, etc Computer Architecture – –Department Department of ofInformation Information Systems Systems @ @Hoá NGUYỄN NGUYEN Ngọc Hoá 84 Khắc phục: cải thiện độ tin cậy  Fault Avoidance   Fault Tolerance    Prevent faults from becoming failures Typically done through redundancy Error Removal   Prevent occurrence of faults by construction Removing latent errors by verification Error Forecasting  Estimate presence, creation, and consequences of errors Computer Architecture – –Department Department of ofInformation Information Systems Systems @ @Hoá NGUYỄN NGUYEN Ngọc Hoá 85 Disk Fault Tolerance with RAID  Redundant Array of Independent/Inexpensive Disks   Can improve performance    Several smaller disks play a role of one big disk Data spread among multiple disks Accesses to different disks go in parallel Can improve reliability  Data can be kept with some redundancy Computer Architecture – –Department Department of ofInformation Information Systems Systems @ @Hoá NGUYỄN NGUYEN Ngọc Hoá 86 RAID Tập đĩa vật lý thành đĩa logic nhìn hệ điều hành  RAID 0: không dư thừa liệu    RAID 1:      Truy cập song song đĩa Dữ liệu phân tán nhiều đĩa Mirrored disks copies lưu đĩa khác Đọc từ 2, ghi đồng thời lên Đắt RAID 2:   Các đĩa đồng hoá Dư thừa nhiều, giá thành cao Computer Architecture – –Department Department of ofInformation Information Systems Systems @ @Hoá NGUYỄN NGUYEN Ngọc Hoá 87 RAID  RAID    RAID    Mỗi đĩa hoạt động cách độc lập Parity lưu đĩa parity riêng RAID    Như RAID Chỉ sử dụng đĩa dư thừa Như RAID Parity phân tất đĩa RAID   Hai lần tính parity Lưu block khác đĩa khác Computer Architecture – –Department Department of ofInformation Information Systems Systems @ @Hoá NGUYỄN NGUYEN Ngọc Hoá 88 RAID 0, 1, Computer Architecture – –Department Department of ofInformation Information Systems Systems @ @Hoá NGUYỄN NGUYEN Ngọc Hoá 89 RAID & Computer Architecture – –Department Department of ofInformation Information Systems Systems @ @Hoá NGUYỄN NGUYEN Ngọc Hoá 90 RAID & Computer Architecture – –Department Department of ofInformation Information Systems Systems @ @Hoá NGUYỄN NGUYEN Ngọc Hoá 91 Tổng kết  Khái niệm nhớ máy tính, đặc điểm chính, …  Bộ nhớ     Bộ nhớ cache     Nguyên tắc Phân loại Tổ chức nhớ lớn Nguyên tắc chung Các phương pháp ánh xạ Các giải thuật thay thế, sách ghi, … Bộ nhớ ngồi: ổ cứng, quang, RAID, … Computer Architecture – –Department Department of ofInformation Information Systems Systems @ @Hoá NGUYỄN NGUYEN Ngọc Hoá 92 ... chung Bộ nhớ Bộ nhớ cache Bộ nhớ (các thiết bị lưu trữ) Tổng kết tập Tham khảo chương 4,5,6 [1] Computer Architecture – –Department Department of ofInformation Information Systems Systems @ @Hoá NGUYỄN... @ @Hoá NGUYỄN NGUYEN Ngọc Hoá Bộ nhớ  Bộ nhớ bên máy tính    Semi-conductor Truy cập ngẫu nhiên Kiểu:   RAM- Random Access Memory: lưu giữ liệu tạm thời ROM – Read Only Memory: lưu giữ... NGUYEN Ngọc Hoá Khái niệm  Bộ nhớ: thiết bị bảo quản khơi phục thơng tin  Từ nhớ: tập bits đọc hay ghi đồng thời  Các kiểu vật liệu nhớ:     Bán dẫn – semiconductor (register, cache, nhớ

Ngày đăng: 07/05/2021, 13:23

Mục lục

  • https://tailieuvnu.com/

Tài liệu cùng người dùng

  • Đang cập nhật ...

Tài liệu liên quan