Bài giảng Kiến trúc máy tính: Cấu trúc cơ bản máy tính - Nguyễn Ngọc Hóa

28 6 0
Bài giảng Kiến trúc máy tính: Cấu trúc cơ bản máy tính - 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: Cấu trúc cơ bản máy tính do Nguyễn Ngọc Hóa biên soạn bao gồm 4 nội dung: Nguyên tắc chung, các thành phần cơ bản, chức năng chính, cơ chế ngắt và chu trình lệnh đầy đủ. Mời các bạn cùng tham khảo.

Kiến trúc máy tính Cấu trúc máy tính 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 September 2015 Hoa.Nguyen@vnu.edu.vn Nội dung Nguyên tắc chung Các thành phần Chức Cơ chế ngắt chu trình lệnh đầy đủ Tham khảo chương [1] Computer Architecture – –Department Department of ofInformation Information Systems Systems @ @Hoá NGUYỄN NGUYEN Ngọc Hố Khái niệm chương trình  Chương trình cứng hố khơng cho phép thay đổi  Phần cứng đa dụng: làm nhiều tác vụ khác nhau, kiểm sốt tín hiệu điều khiển  Chương trình mềm: Thay thiết kế lại mạch - re-wiring, cung cấp tập tín hiệu điều khiển Computer Architecture – –Department Department of ofInformation Information Systems Systems @ @Hoá NGUYỄN NGUYEN Ngọc Hoá Khái niệm chương trình…    Chuỗi bước Với bước, phép tính logic/số học thực Mỗi phép tính khác xác định tập tín hiệu điều khiển khác Computer Architecture – –Department Department of ofInformation Information Systems Systems @ @Hố NGUYỄN NGUYEN Ngọc Hố Mơ hình máy tính vạn Computer Architecture – –Department Department of ofInformation Information Systems Systems @ @Hoá NGUYỄN NGUYEN Ngọc Hoá Nguyên tắc chung Dữ liệu chương trình (lệnh) lưu giữ nhớ Nội dung nhớ xác định thơng qua địa vị trí, khơng phụ thuộc vào kiểu liệu lưu Chương trình thi hành từ lệnh đến lệnh (ngoại trừ thay đổi cụ thể) Computer Architecture – –Department Department of ofInformation Information Systems Systems @ @Hoá NGUYỄN NGUYEN Ngọc Hoá Minh hoạ chương trình với MARS Computer Architecture – –Department Department of ofInformation Information Systems Systems @ @Hoá NGUYỄN NGUYEN Ngọc Hoá Thành phần máy tính  Central Processing Unit: Control Unit & Arithmetic and Logic Unit  Input/Output: liệu lệnh cần phải nạp vào hệ thống kết xuất kết  Main memory: lưu trữ lệnh liệu tạm thời trình tính tốn  Hệ thống liên kết: kết nối, truyền thơng thành phần nêu Computer Architecture – –Department Department of ofInformation Information Systems Systems @ @Hoá NGUYỄN NGUYEN Ngọc Hoá Thành phần: mức tổng quan Computer Architecture – –Department Department of ofInformation Information Systems Systems @ @Hoá NGUYỄN NGUYEN Ngọc Hoá Chức máy tính   Thực thi chương trình, xây dựng thông qua tập lệnh CPU, lưu nhớ Các bước thực thi chương trình CPU     Đọc lệnh từ nhớ (fetch) Thực thi lệnh (execute) Lưu kết nhớ (store) Chu trình lệnh đơn giản Computer Architecture – –Department Department of ofInformation Information Systems Systems @ @Hoá NGUYỄN NGUYEN Ngọc Hố 10 Ví dụ Computer Architecture – –Department Department of ofInformation Information Systems Systems @ @Hoá NGUYỄN NGUYEN Ngọc Hoá 14 Sơ đồ trạng thái chu trình lệnh Computer Architecture – –Department Department of ofInformation Information Systems Systems @ @Hoá NGUYỄN NGUYEN Ngọc Hoá 15 Interrupts   Cơ chế cho phép modules khác (I/O) tạm dừng chuỗi xử lý hành (normal sequence of processing) để thực thi lệnh modules Các kiểu ngắt thơng dụng  Program   Timer    Generated by internal processor timer Used in pre-emptive multi-tasking I/O   e.g overflow, division by zero from I/O controller Hardware failure  e.g memory parity error Computer Architecture – –Department Department of ofInformation Information Systems Systems @ @Hố NGUYỄN NGUYEN Ngọc Hố 16 Ví dụ Computer Architecture – –Department Department of ofInformation Information Systems Systems @ @Hố NGUYỄN NGUYEN Ngọc Hố 17 Ví dụ Computer Architecture – –Department Department of ofInformation Information Systems Systems @ @Hố NGUYỄN NGUYEN Ngọc Hố 18 Ví dụ Computer Architecture – –Department Department of ofInformation Information Systems Systems @ @Hố NGUYỄN NGUYEN Ngọc Hố 19 Chu trình ngắt  Được thêm vào sơ đồ chu trình lệnh để xử lý yêu cầu ngắt  Quy trình  Processor checks for interrupt    Indicated by an interrupt signal If no interrupt, fetch next instruction If interrupt pending:      Suspend execution of current program Save context Set PC to start address of interrupt handler routine Process interrupt Restore context and continue interrupted program Computer Architecture – –Department Department of ofInformation Information Systems Systems @ @Hố NGUYỄN NGUYEN Ngọc Hố 20 Ví dụ Computer Architecture – –Department Department of ofInformation Information Systems Systems @ @Hố NGUYỄN NGUYEN Ngọc Hố 21 Chu trình lệnh có ngắt Computer Architecture – –Department Department of ofInformation Information Systems Systems @ @Hoá NGUYỄN NGUYEN Ngọc Hoá 22 Sơ đồ trạng thái chu trình lệnh Computer Architecture – –Department Department of ofInformation Information Systems Systems @ @Hoá NGUYỄN NGUYEN Ngọc Hoá 23 Đa ngắt - Multiple Interrupts  Disable interrupts     Trong xử lý ngắt, processor tạm thời bỏ tất qua ngắt lại Các ngắt lại trạng thái treo xử lý ngắt thời xử lý xong Các ngắt xử lý theo thứ tự yêu cầu Define priorities   Các ngắt có độ ưu tiên thấp bị ngắt ngắt có độ ưu tiên cao Khi ngắt có độ ưu tiên cao xử lý xong, processor quay lại xử lý tiếp ngắt trước Computer Architecture – –Department Department of ofInformation Information Systems Systems @ @Hoá NGUYỄN NGUYEN Ngọc Hoá 24 Đa ngắt Computer Architecture – –Department Department of ofInformation Information Systems Systems @ @Hoá NGUYỄN NGUYEN Ngọc Hoá 25 Đa ngắt lồng Computer Architecture – –Department Department of ofInformation Information Systems Systems @ @Hố NGUYỄN NGUYEN Ngọc Hố 26 Mơ hình thời gian thi hành đa ngắt Computer Architecture – –Department Department of ofInformation Information Systems Systems @ @Hoá NGUYỄN NGUYEN Ngọc Hoá 27 Tổng kết  Nắm rõ khái niệm chương trình cứng, chương trình  Ba nguyên tắc xây dựng mơ hình kiến trúc Von Neuman  Các chức thành phần máy tính  Chu trình lệnh đầy đủ (có kèm chế cho phép xử lý ngắt) Computer Architecture – –Department Department of ofInformation Information Systems Systems @ @Hoá NGUYỄN NGUYEN Ngọc Hoá 28 ... NGUYỄN NGUYEN Ngọc Hoá Minh hoạ chương trình với MARS Computer Architecture – –Department Department of ofInformation Information Systems Systems @ @Hoá NGUYỄN NGUYEN Ngọc Hố Thành phần máy tính. .. Systems @ @Hoá NGUYỄN NGUYEN Ngọc Hoá Mơ hình máy tính vạn Computer Architecture – –Department Department of ofInformation Information Systems Systems @ @Hoá NGUYỄN NGUYEN Ngọc Hoá Nguyên tắc chung... thiết kế lại mạch - re-wiring, cung cấp tập tín hiệu điều khiển Computer Architecture – –Department Department of ofInformation Information Systems Systems @ @Hoá NGUYỄN NGUYEN Ngọc Hố Khái niệm

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