返回课程
AI031 专业级

计算机系统:程序员视角(全球版)

深入探讨计算机系统如何执行程序和存储信息。本课程连接高级编程与底层硬件,涵盖机器级表示、处理器架构、内存层次结构以及并发编程。

5.0
36.0h
955 名学生
12 lessons
0 点赞
人工智能
开始学习

课程概述

📚 内容概要

深入探讨计算机系统如何执行程序和存储信息。本课程弥合了高级编程与底层硬件之间的差距,涵盖机器级表示、处理器架构、内存层次结构以及并发编程。

通过理解软硬件接口,掌握系统编程的艺术。

作者: Randal E. Bryant, David R. O'Hallaron

致谢: 由卡内基梅隆大学15-213课程的学生和教师支持。致谢包括Manasa S.和Mohit Tahiliani的贡献。

🎯 学习目标

  1. 识别系统中如何使用位和上下文来表示信息。
  2. 追踪从源代码到可执行文件的编译系统的四个阶段。
  3. 描述硬件的组织结构以及存储设备的层次特性。
  4. 在十进制、二进制和十六进制之间进行转换,并解释机器级寻址(字节序)。
  5. 在C语言中执行位级和逻辑运算,并预测算术右移的结果。
  6. 分析整数编码以识别潜在的溢出漏洞和类型转换错误。
  7. 分析 C语言构造(循环、分支、函数)与x86-64汇编指令之间的映射关系。
  8. 剖析 运行时栈,解释参数传递方式、局部变量存储机制以及递归调用的管理方式。
  9. 评估 异构数据结构的内存布局,并应用对齐规则计算总存储需求。
  10. 定义Y86-64程序员可见状态,并将指令编码/解码为字节序列。

课程

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.