intTypePromotion=1
zunia.vn Tuyển sinh 2024 dành cho Gen-Z zunia.vn zunia.vn
ADSENSE

Bài giảng Hệ thống máy tính (Computer Systems): Chương 4 - Nguyễn Kim Khánh

Chia sẻ: _ _ | Ngày: | Loại File: PDF | Số trang:32

5
lượt xem
3
download
 
  Download Vui lòng tải xuống để xem tài liệu đầy đủ

Bài giảng "Hệ thống máy tính (Computer Systems): Chương 4 - Các kiến trúc song song" cung cấp cho học viên những nội dung về: phân loại kiến trúc máy tính, đa xử lý bộ nhớ dùng chung, đa xử lý bộ nhớ phân tán, bộ xử lý đồ họa đa dụng;... Mời các bạn cùng tham khảo chi tiết nội dung bài giảng!

Chủ đề:
Lưu

Nội dung Text: Bài giảng Hệ thống máy tính (Computer Systems): Chương 4 - Nguyễn Kim Khánh

  1. NKK-HUST Hệ thống máy tính Chương 4 CÁC KIẾN TRÚC SONG SONG Nguyễn Kim Khánh Trường Đại học Bách khoa Hà Nội CS-HEDSPI2019 Computer Systems 198
  2. NKK-HUST Nội dung học phần Chương 1. Tổng quan hệ thống máy tính Chương 2. Bộ nhớ máy tính Chương 3. Hệ thống vào-ra Chương 4. Các kiến trúc song song CS-HEDSPI2019 Computer Systems 199
  3. NKK-HUST Nội dung của chương 4 4.1. Phân loại kiến trúc máy tính 4.2. Đa xử lý bộ nhớ dùng chung 4.3. Đa xử lý bộ nhớ phân tán 4.4. Bộ xử lý đồ họa đa dụng CS-HEDSPI2019 Computer Systems 200
  4. NKK-HUST 4.1. Phân loại kiến trúc máy tính Phân loại kiến trúc máy tính (Michael Flynn -1966) n SISD - Single Instruction Stream, Single Data Stream n SIMD - Single Instruction Stream, Multiple Data Stream n MISD - Multiple Instruction Stream, Single Data Stream n MIMD - Multiple Instruction Stream, Multiple Data Stream CS-HEDSPI2019 Computer Systems 201
  5. NKK-HUST SISD IS DS CU PU MU n CU: Control Unit n PU: Processing Unit n MU: Memory Unit n Một bộ xử lý n Đơn dòng lệnh n Dữ liệu được lưu trữ trong một bộ nhớ n Chính là Kiến trúc von Neumann (tuần tự) CS-HEDSPI2019 Computer Systems 202
  6. NKK-HUST SIMD DS PU1 LM1 DS PU2 LM2 IS CU . . . DS PUn LMn CS-HEDSPI2019 Computer Systems 203
  7. NKK-HUST SIMD (tiếp) n Đơn dòng lệnh điều khiển đồng thời các đơn vị xử lý PUs n Mỗi phần tử xử lý có một bộ nhớ dữ liệu riêng LM (local memory) n Mỗi lệnh được thực hiện trên một tập các dữ liệu khác nhau n Các mô hình SIMD n Vector Computer n Array processor CS-HEDSPI2019 Computer Systems 204
  8. NKK-HUST MISD n Một luồng dữ liệu cùng được truyền đến một tập các bộ xử lý n Mỗi bộ xử lý thực hiện một dãy lệnh khác nhau. n Chưa tồn tại máy tính thực tế n Có thể có trong tương lai CS-HEDSPI2019 Computer Systems 205
  9. NKK-HUST MIMD n Tập các bộ xử lý n Các bộ xử lý đồng thời thực hiện các dãy lệnh khác nhau trên các dữ liệu khác nhau n Các mô hình MIMD n Multiprocessors (Shared Memory) n Multicomputers (Distributed Memory) CS-HEDSPI2019 Computer Systems 206
  10. NKK-HUST MIMD - Shared Memory Đa xử lý bộ nhớ dùng chung (shared memory mutiprocessors) IS DS CU1 PU1 IS DS CU2 PU2 Bộ nhớ dùng . . chung . . . . IS DS CUn PUn CS-HEDSPI2019 Computer Systems 207
  11. NKK-HUST MIMD - Distributed Memory Đa xử lý bộ nhớ phân tán (distributed memory mutiprocessors or multicomputers) IS DS CU1 PU1 LM1 Mạng IS DS liên CU2 PU2 LM2 kết hiệu . . . . . . năng . . . cao IS DS CUn PUn LMn CS-HEDSPI2019 Computer Systems 208
  12. NKK-HUST Phân loại các kỹ thuật song song n Song song mức lệnh n pipeline n superscalar n Song song mức dữ liệu n SIMD n Song song mức luồng n MIMD n Song song mức yêu cầu n Cloud computing CS-HEDSPI2019 Computer Systems 209
  13. NKK-HUST 4.2. Đa xử lý bộ nhớ dùng chung n Hệ thống đa xử lý đối xứng (SMP- Symmetric Multiprocessors) n Hệ thống đa xử lý không đối xứng (NUMA – Non-Uniform Memory Access) n Bộ xử lý đa lõi (Multicore Processors) CS-HEDSPI2019 Computer Systems 210
  14. The simplest multiprocessors are based on a single bus, as illustrated in NKK-HUST Fig. 8-26(a). Two or more CPUs and one or more memory modules all use the SMP hay UMA (Uniform Memory Access) same bus for communication. When a CPU wants to read a memory word, it first checks to see whether the bus is busy. If the bus is idle, the CPU puts the address of the word it wants on the bus, asserts a few control signals, and waits until the memory puts the desired word on the bus. Private memory Shared Shared memory memory CPU CPU M CPU CPU M CPU CPU M Cache Bus (a) (b) (c) Figure 8-26. Three bus-based multiprocessors. (a) Without caching. (b) With caching. (c) With caching and private memories. If the bus is busy when a CPU wants to read or write memory, the CPU just waits until the bus becomes idle. Herein lies the problem with this design. With two or three CPUs, contention for the bus will be manageable; with 32 or 64 it will be unbearable. The system will be totally limited by the bandwidth of the bus, and most of the CPUs will be idle most of the time. CS-HEDSPI2019 Computer Systems 211 The solution is to add a cache to each CPU, as depicted in Fig. 8-26(b). The
  15. NKK-HUST SMP (tiếp) n Một máy tính có n >= 2 bộ xử lý giống nhau n Các bộ xử lý dùng chung bộ nhớ và hệ thống vào-ra n Thời gian truy cập bộ nhớ là bằng nhau với các bộ xử lý n Các bộ xử lý có thể thực hiện chức năng giống nhau n Hệ thống được điều khiển bởi một hệ điều hành phân tán n Hiệu năng: Các công việc có thể thực hiện song song n Khả năng chịu lỗi CS-HEDSPI2019 Computer Systems 212
  16. the request was routed over the system bus to the system containing the word, NKK-HUST which then responded. Of course, the latter took much longer than the former. While a program could run happily out of remote memory, it took 10 times longer NUMA (Non-Uniform Memory Access) to execute than the same program running out of local memory. CPU Memory CPU Memory CPU Memory CPU Memory MMU Local bus Local bus Local bus Local bus System bus n CóFigure một không 8-32. A NUMA gian địa machine based first multiprocessor to use this design. chỉ on chung two levels cho of buses. tất The Cm* cả was the CPU n Mỗi CPU có thể truy cập từ xa sang bộ nhớ của Memory coherence is guaranteed in an NC-NUMA machine because no cach- ing isCPU present.khácEach word of memory lives in exactly one location, so there is no danger of one copy having stale data: there are no copies. Of course, it now mat- ters aTruy n nhập great deal whichbộpage nhớ từ xamemory is in which chậm hơnthetruy because nhậppenalty performance bộ nhớ for being in cục bộ the wrong place is so high. Consequently, NC-NUMA machines use elaborate software to move pages around to maximize performance. Typically, a daemon process called a page scanner runs every few seconds. Its job is to examine the usage statistics CS-HEDSPI2019 and move pages around in an attempt to 213 Computer Systems improve performance. If a page appears to be in the wrong place, the page scanner
  17. NKK-HUST Bộ xử lý đa lõi (multicores) 666 CHAPTER 18 / MULTICORE COMPUTERS Thay đổi của bộ xử Issue logic n Program counter Instruction fetch unit Single-thread register file Execution units and queues lý: L1 instruction cache L1 data cache L2 cache (a) Superscalar n Tuần tự Issue logic Registers n Register 1 Pipeline PC n PC 1 n Instruction fetch unit Execution units and queues n Siêu vô hướng L1 instruction cache L2 cache L1 data cache n Đa luồng (b) Simultaneous multithreading Đa lõi: nhiều CPU (superscalar or SMT) (superscalar or SMT) (superscalar or SMT) (superscalar or SMT) n Processor n Processor 1 Processor 2 Processor 3 trên một chip L1-D L1-D L1-D L1-D L1-I L1-I L1-I L1-I L2 cache (c) Multicore Figure 18.1 Alternative Chip Organizations CS-HEDSPI2019 Computer Systems 214 to For each of these innovations, designers have over the years attempted increase the performance of the system by adding complexity. In the case of pipelin-
  18. NKK-HUST Các dạng tổ chức bộ xử lý đa lõi 18.3 / MULTICORE ORGANIZATION 675 CPU Core 1 CPU Core n CPU Core 1 CPU Core n L1-D L1-I L1-D L1-I L1-D L1-I L1-D L1-I L2 cache L2 cache L2 cache I/O Main memory I/O Main memory (b) Dedicated L2 cache (a) Dedicated L1 cache CPU Core 1 CPU Core n CPU Core 1 CPU Core n L1-D L1-I L1-D L1-I L1-D L1-I L1-D L1-I L2 cache L2 cache L2 cache L3 cache Main memory I/O Main memory I/O (c) Shared L2 cache (d ) Shared L3 cache Figure 18.8 Multicore Organization Alternatives CS-HEDSPI2019 Computer Systems 215 4. Interprocessor communication is easy to implement, via shared memory locations.
  19. density of today’s chips, thermal management is a fundamental capability, e cially for laptop and mobile systems. The Core Duo thermal control unit is desig NKK-HUST to manage chip heat dissipation to maximize processor performance within ther constraints. Thermal management also improves ergonomics with a cooler sys Intel - Core Duo and lower fan acoustic noise. In essence, the thermal management unit moni digital sensors for high-accuracy die temperature measurements. Each core be defined as an independent thermal zone. The maximum temperature for e 2006 32-kB L1 Caches 32-kB L1 Caches n Arch. state Arch. state Execution Execution resources resources n Two x86 superscalar, shared L2 cache Thermal control Thermal control n Dedicated L1 cache APIC APIC per core Power management logic n 32KiB instruction and 32KiB data 2 MB L2 shared cache n 2MiB shared L2 cache Bus interface Front-side bus Figure 18.9 Intel Core Duo Block Diagram CS-HEDSPI2019 Computer Systems 216
  20. NKK-HUST Intel Core i7-990X 678 CHAPTER 18 / MULTICORE COMPUTERS Core 0 Core 1 Core 2 Core 3 Core 4 Core 5 32 kB 32 kB 32 kB 32 kB 32 kB 32 kB 32 kB 32 kB 32 kB 32 kB 32 kB 32 kB L1-I L1-D L1-I L1-D L1-I L1-D L1-I L1-D L1-I L1-D L1-I L1-D 256 kB 256 kB 256 kB 256 kB 256 kB 256 kB L2 Cache L2 Cache L2 Cache L2 Cache L2 Cache L2 Cache 12 MB L3 Cache DDR3 Memory QuickPath Controllers Interconnect 3 ! 8B @ 1.33 GT/s 4 ! 20B @ 6.4 GT/s Figure 18.10 Intel Core i7-990X Block Diagram The general structure of the Intel Core i7-990X is shown in Figure 18.10. Each core has its own dedicated L2 cache and the four cores share a 12-MB L3 cache. CS-HEDSPI2019 One mechanism Intel uses to makeComputer Systems its caches more effective is prefetching, in which 217
ADSENSE

CÓ THỂ BẠN MUỐN DOWNLOAD

 

Đồng bộ tài khoản
2=>2