ระบบคอมพิวเตอร์: มุมมองจากนักพัฒนาโปรแกรม (ฉบับโลก)
การสำรวจอย่างละเอียดเกี่ยวกับวิธีที่ระบบคอมพิวเตอร์ดำเนินการโปรแกรมและจัดเก็บข้อมูล หลักสูตรนี้เชื่อมโยงช่องว่างระหว่างการเขียนโปรแกรมระดับสูงกับฮาร์ดแวร์ที่อยู่เบื้องหลัง โดยครอบคลุมการแทนค่าระดับเครื่องจักร สถาปัตยกรรมของโปรเซสเซอร์ โครงสร้างหน่วยความจำ และการเขียนโปรแกรมแบบขนาน
ภาพรวมคอร์สเรียน
📚 สรุปเนื้อหา
การศึกษาอย่างลึกซึ้งเกี่ยวกับวิธีที่ระบบคอมพิวเตอร์ดำเนินการโปรแกรมและจัดเก็บข้อมูล การเรียนนี้เชื่อมโยงช่องว่างระหว่างการเขียนโปรแกรมระดับสูงกับฮาร์ดแวร์พื้นฐาน โดยครอบคลุมหัวข้อต่าง ๆ เช่น การแทนค่าระดับเครื่องจักร สถาปัตยกรรมของโปรเซสเซอร์ ลำดับชั้นหน่วยความจำ และการเขียนโปรแกรมแบบขนาน
เชี่ยวชาญศิลปะของการเขียนโปรแกรมระบบโดยเข้าใจพื้นที่เชื่อมต่อระหว่างฮาร์ดแวร์และซอฟต์แวร์
ผู้แต่ง: รันดาล เอ. ไบรแอนต์, เดวิด อาร์. โอฮอลลารอน
คำขอบคุณ: ได้รับการสนับสนุนจากนักเรียนและอาจารย์ผู้สอนรายวิชา 15-213 ที่มหาวิทยาลัยคาร์เนกีเมล론 คำขอบคุณรวมถึงข้อเสนอแนะจาก มานาสา เอส. และ โมฮิต ทาฮิเลียนี
🎯 เป้าหมายการเรียนรู้
- ระบุว่าข้อมูลถูกแทนค่าด้วยบิตและบริบทภายในระบบอย่างไร
- ติดตามขั้นตอนสี่ขั้นตอนของระบบการคอมไพล์ จากโค้ดต้นฉบับไปยังโปรแกรมที่สามารถทำงานได้
- อธิบายโครงสร้างองค์ประกอบของฮาร์ดแวร์และลักษณะเชิงลำดับชั้นของอุปกรณ์จัดเก็บข้อมูล
- แปลงระหว่างสัญลักษณ์ฐานสิบ ฐานสอง และฐานสิบหก และอธิบายการกำหนดที่อยู่ระดับเครื่อง (การจัดเรียงบิต - Endianness)
- ดำเนินการปฏิบัติการระดับบิตและตรรกะในภาษา C และทำนายผลจากการเลื่อนทางคณิตศาสตร์
- วิเคราะห์การเข้ารหัสจำนวนเต็มเพื่อระบุช่องโหว่ที่อาจเกิดการล้น (overflow) และข้อผิดพลาดจากการแปลงชนิดข้อมูล
- วิเคราะห์ ความสัมพันธ์ระหว่างโครงสร้างภาษา C (ลูป สาขา ฟังก์ชัน) กับคำสั่งในภาษาแอสเซมบลี x86-64
- แยกองค์ประกอบ โครงสร้างสแตกเวลาทำงาน เพื่ออธิบายว่าพารามิเตอร์ถูกส่งผ่านอย่างไร ตัวแปรท้องถิ่นถูกจัดเก็บไว้ที่ใด และการเรียกซ้ำ (recursive calls) ถูกจัดการอย่างไร
- ประเมิน โครงสร้างหน่วยความจำสำหรับโครงสร้างข้อมูลที่หลากหลาย และใช้กฎการจัดเรียง (alignment rules) เพื่อคำนวณความจุรวมของการจัดเก็บ
- กำหนดสถานะที่ผู้เขียนโปรแกรมสามารถมองเห็นได้ใน Y86-64 และเข้ารหัส/ถอดรหัสคำสั่งเป็นลำดับไบต์
บทเรียน 共 12 课时 · 预计 36.0h
บทเรียน
Lesson
This lesson introduces the fundamental concepts of computer systems, focusing on how programs are represented as sequences of bytes and interpreted through context. Students will learn how source code is stored using the ASCII standard and gain an overview of the compilation process, hardware components, and the role of the operating system.
This lesson explores how computers represent and manipulate data, focusing on hexadecimal notation, bitwise operations, and the structure of virtual address spaces. Students will learn to perform conversions between number systems, analyze integer and floating-point bit patterns, and understand the implications of memory byte ordering and precision limitations.
This lesson explores the x86-64 Instruction Set Architecture (ISA) as a contract between hardware and software, focusing on the architectural state, registers, and memory abstraction. Students will learn to distinguish between high-level code and machine-level representations while mastering data movement, arithmetic operations, and procedure call conventions.
This lesson explores the Y86-64 instruction set architecture as an educational model for understanding the contract between software and hardware, including its programmer-visible state and load/store design. Students will learn to analyze CPU performance through the fetch-decode-execute cycle, differentiate between RISC and CISC characteristics, and evaluate the impact of pipelining on system throughput.
This lesson explores advanced techniques for optimizing program performance by addressing constant factors, memory aliasing, and instruction-level parallelism. Students will learn to analyze hardware constraints, such as pipeline latency and throughput, to improve code efficiency beyond what compilers can achieve automatically.
This lesson explores the memory hierarchy by contrasting the speed and density of SRAM and DRAM, while explaining how DRAM organization and row-buffer management impact system performance. Students will learn to analyze memory access patterns, such as stride-based array traversal, and understand how hardware design choices like RAS/CAS multiplexing influence effective data access times.
This lesson explores the compiler driver's role in the software build process, focusing on how the linker manages memory layout and separate compilation. Students will learn to optimize program performance by understanding how data alignment and memory access patterns, such as Stride-1, influence cache hit rates and overall system throughput.
This lesson explores Exceptional Control Flow (ECF), which allows computer systems to handle abrupt transitions between instructions triggered by hardware and software events. Students will learn to distinguish between different types of exceptions, manage process lifecycles through system calls like fork and waitpid, and implement robust signal handling.
This lesson explores the fundamentals of virtual memory, focusing on how the Memory Management Unit (MMU) translates virtual addresses to physical addresses to provide process isolation and efficient memory abstraction. Students will learn about hardware-assisted mechanisms like page tables and TLBs, as well as the principles of demand paging, page replacement, and heap management strategies.
This lesson explores the Unix "everything is a file" abstraction, covering core system-level I/O primitives like open, close, read, and write. Students will learn to manage file descriptors, handle short counts using the Robust I/O (RIO) package, and implement I/O redirection and file sharing within the kernel.
This lesson explores the client-server programming model, focusing on the Berkeley Sockets API and the fundamental four-step request-response transaction. Students will learn to implement robust network architectures by differentiating between TCP and UDP communication while understanding the role of hardware components and protocol abstraction in distributed systems.
This lesson explores the taxonomy of concurrency, comparing processes, I/O multiplexing, and threads to understand how they manage logical control flows and system performance. Students will learn to identify the differences between concurrency and parallelism while mastering synchronization techniques like mutexes and semaphores to prevent race conditions in shared-resource systems.