Skip to product information
Computer Systems Deep Dive
Computer Systems Deep Dive
Description
Book Introduction
A grand exploration of the beautiful and amazing computer architecture hidden beneath the code.

A computer system is like an ocean.
Just as the origins of modern life are believed to have begun in the depths of the primordial ocean, modern programming also had its beginnings in early computer architectures.
The first programmers studied the hardware diagrams of the first computers and created the first programs.
Just like the ocean, which may appear dark and dangerous from above, reveals a beautiful and wondrous world beneath the surface, let's explore the beautiful and wondrous computer architecture hidden beneath the code.

This book covers a wide range of topics related to computer systems, from C programming to architecture fundamentals, assembly language, and multithreading.
It helps you understand how computers execute programs by introducing topics that computer systems have in common, and how programs are designed to run efficiently on the system.
Let's take our first steps on a journey to explore computer systems.
  • You can preview some of the book's contents.
    Preview

index
Chapter 0 Getting Started

_0.1 What is a computer system?
_0.2 What does a modern computer system look like?
_0.3 What you will learn in this book
_0.4 Before starting this book
__0.4.1 Linux, C, and GNU Compilers
__0.4.2 Other notations and description lines

PART IC Programming Language

Chapter 1 C Programming Fundamentals

_1.1 Getting Started with C Programming
__1.1.1 Compiling and running C programs
__1.1.2 Variables and C's numeric types
__1.1.3 C data types
_1.2 Input and Output
__1.2.1 printf
__1.2.2 scanf
_1.3 Conditional statements and loops
__1.3.1 Boolean values ​​in C
__1.3.2 C's loop
_1.4 function
__1.4.1 Stack
_1.5 Arrays and Strings
__1.5.1 Introduction to Arrays
__1.5.2 Array access method
__1.5.3 Arrays and Functions
__1.5.4 Introduction to Strings and the C String Library
_1.6 structure
__1.6.1 Definition of structure types
__1.6.2 Declaring variables of structure type
__1.6.3 Accessing field values
__1.6.4 Passing a structure to a function
_1.7 Summary

Chapter 2 Advanced C Programming

_2.1 Program Memory and Scope
_2.2 Pointer variables in C
__2.2.1 Pointer variables
_2.3 Pointers and Functions
_2.4 Dynamic memory allocation
__2.4.1 Heap Memory
__2.4.2 malloc and free
__2.4.3 Dynamically allocated arrays and strings
__2.4.4 Heap memory and pointers for functions
_2.5 C array
__2.5.1 One-dimensional array
__2.5.2 Two-dimensional array
_2.6 Strings and String Libraries
__2.6.1 Statically allocated strings (character arrays)
__2.6.2 Dynamically allocating strings
__2.6.3 A library for manipulating C strings and characters
_2.7 C Structures
__2.7.1 C struct type review
__2.7.2 Pointers and Structures
__2.7.3 Pointer fields of structures
__2.7.4 Array of structures
__2.7.5 Self-referential structures
_2.8 C Input/Output (Standard and File)
__2.8.1 Standard Input/Output
__2.8.2 File I/O
__2.8.3 Using Text Files in C
__2.8.4 Standard and file I/O functions in stdio.h
_2.9 Some advanced C features
__2.9.1 switch statement
__2.9.2 Command line arguments
__2.9.3 void * type and type recasting
__2.9.4 Pointer Arithmetic
__2.9.5 C Library: Using, Compiling, and Linking
__2.9.6 Writing and Using Your Own C Library
__2.9.7 Compiling C to Assembly
_2.10 Summary

Chapter 3 C Debugging Tools

_3.1 Debugging with GDB
__3.1.1 Getting Started with GDB
__3.1.2 GDB Example
_3.2 Details of GDB commands
__3.2.1 GDB Keyboard Shortcuts
__3.2.2 Frequently used GDB commands
_3.3 Memory Debugging with Balgrind
__3.3.1 Example program with heap memory access error
__3.3.2 How to use Memcheck
_3.4 Advanced GDB Features
__3.4.1 GDB and make
__3.4.2 Attaching GDB to a running process
__3.4.3 Following a process in a fork
__3.4.4 Signal Control
__3.4.5 DDD settings and bug fixes
_3.5 Debugging Assembly Code
__3.5.1 Inspecting binary code using GDB
__3.5.2 Debugging Assembly Using DDD
__3.5.3 GDB Assembly Debugging Commands and Examples
__3.5.4 Summary of frequently used commands in assembly debugging
_3.6 Debugging multithreaded programs with GDB
__3.6.1 GDB and Pthreads
__3.6.2 GDB thread-related commands
__3.6.3 Example
_3.7 Summary

PART II COMPUTER SYSTEM FUNDAMENTALS

Chapter 4 Binary and Data Representation

_4.1 Integers without bases and signs
__4.1.1 Decimal
__4.1.2 Unsigned binary
__4.1.3 Hexadecimal
__4.1.4 Storage space limitations
_4.2 Base conversion
__4.2.1 Binary and Hexadecimal Conversion
__4.2.2 Convert to decimal
__4.2.3 Converting decimal numbers
_4.3 Signed binary integers
__4.3.1 Signed numbers
__4.3.2 2's complement
_4.4 Binary Integer Arithmetic Operations
__4.4.1 Addition
__4.4.2 Subtraction
__4.4.3 Multiplication and Division
_4.5 Integer Overflow
__4.5.1 Total Odometer Analogy
__4.5.2 Binary Integer Overflow
__4.5.3 Overflow Summary
__4.5.4 Results due to overflow
_4.6 Bitwise Operators
__4.6.1 Bitwise AND
__4.6.2 Bitwise OR
__4.6.3 Bitwise XOR
__4.6.4 Bitwise NOT
__4.6.5 Bit Shift
_4.7 Integer byte order
_4.8 Real numbers in binary
__4.8.1 Fixed-point representation
__4.8.2 Floating Point Representation
__4.8.3 Impact of Olympus
_4.9 Summary

Chapter 5 Computer Architecture

_5.1 Origins of Modern Computing Architecture
__5.1.1 Turing Machine
__5.1.2 Early Electrical Computers
__5.1.3 So what did von Neumann know?
_5.2 Von Neumann Architecture
__5.2.1 CPU
__5.2.2 Processing Unit
__5.2.3 Control Unit
__5.2.4 Memory Device
__5.2.5 Input and Output (I/O) Devices
__5.2.6 Von Neumann Machine
_5.3 Logic Gates
__5.3.1 Basic logic gates
__5.3.2 Other logic gates
_5.4 Circuit
__5.4.1 Arithmetic and Logic Circuits
__5.4.2 Control circuit
__5.4.3 Storage Circuit
_5.5 Building a Processor: Putting It All Together
__5.5.1 ALU
__5.5.2 Register File
__5.5.3 CPU
_5.6 Processor program instruction execution
__5.6.1 Clock-driven execution
__5.6.2 Summary: CPU in a complete computer
_5.7 Pipelining: Making the CPU Faster
_5.8 Advanced Pipeline Command Considerations
__5.8.1 Data Hazards
__5.8.2 Control Hazards
_5.9 Looking to the Future: Today's CPUs
__5.9.1 Command-level parallelism
__5.9.2 Multicore and Hardware Multithreading
__5.9.3 Example Processor
_5.10 Summary

PART III ASSEMBLY PROGRAMMING

Chapter 6 C Down: Dive into Assembly

_6.1 Benefits of Learning Assembly
__6.1.1 High-level abstractions that hide valuable program details
__6.1.2 Computing systems with limited resources that do not allow the use of a compiler.
__6.1.3 Vulnerability Analysis
__6.1.4 Critical Code Order in System-Level Software
_6.2 What you will learn in subsequent chapters

Chapter 7 64-bit X86 Assembly (X86-64)

_7.1 Assembly Overview: Basics
__7.1.1 Register
__7.1.2 Advanced Register Notation
__7.1.3 Command Structure
__7.1.4 Examples with operands
__7.1.5 Command Suffixes
_7.2 Commonly used commands
__7.2.1 A more specific example
_7.3 Arithmetic Commands
__7.3.1 Bit shift instructions
__7.3.2 Bitwise Commands
__7.3.3 Load Effect Address Command
_7.4 Conditional Control and Loops
__7.4.1 Preliminary Preparation
__7.4.2 if statement in assembly
__7.4.3 For loop in assembly
_7.5 Functions in Assembly
__7.5.1 Function parameters
__7.5.2 Example Tracing
__7.5.3 main tracing
_7.6 Recursion
__7.6.1 Animation: Call Stack Changes
_7.7 array
_7.8 matrix
__7.8.1 Contiguous two-dimensional arrays
__7.8.2 Discontinuous matrices
_7.9 Structures in Assembly
__7.9.1 Data alignment and structures
_7.10 Real-World Case: Buffer Overflow
__7.10.1 Famous Buffer Overflow Exploits
__7.10.2 Review: The Guessing Game
__7.10.3 Take a closer look
__7.10.4 Buffer Overflow: First Attempt
__7.10.5 Smart Buffer Overflow: Second Attempt
__7.10.6 Protecting from Buffer Overflows

Chapter 8 32-bit X86 Assembly (Ia32)

Chapter 9 ARM Assembly

Chapter 10: Key Assembly Lessons

_10.1 Common Features
_10.2 Read more

PART IV PERFORMANCE OPTIMIZATION AND MANAGEMENT

Chapter 11 Storage and Memory Hierarchy

_11.1 Memory Hierarchy
_11.2 Repository
__11.2.1 Primary storage
__11.2.2 Secondary storage
_11.3 Regionality
__11.3.1 Locality Example in Code
__11.3.2 From locality to cache
__11.3.3 Temporal locality
__11.3.4 Spatial locality
_11.4 CPU cache
__11.4.1 Direct Mapped Cache
__11.4.2 Cache Misses and Associative Design
__11.4.3 Set Associative Cache
_11.5 Cache Analysis and Balgrind
__11.5.1 Theoretical Analysis and Benchmarking
__11.5.2 Real-World Cache Analysis: CacheGrind
_11.6 Predicting: Caching on Multicore Processors
__11.6.1 Cache Coherence
__11.6.2 MSI Protocol
__11.6.3 Implementing the Cache Coherence Protocol
__11.6.4 More information about multicore caching
_11.7 Summary

Chapter 12 Code Optimization

_12.1 The First Step in Code Optimization: Code Profiling
__12.1.1 Profiling using Colgrind
__12.1.2 Moving Loop-Invariant Code
_12.2 Other compiler optimizations
__12.2.1 Function Inlining
__12.2.2 Loop Unrolling
_12.3 Memory Considerations
__12.3.1 Loop Interchange
__12.3.2 Compiler Optimizations That Improve Locality: Split and Fuse
__12.3.3 Memory Profiling with massif
_12.4 Key Lessons
__12.4.1 Choosing Good Data Structures and Algorithms
__12.4.2 Using standard library functions where possible
__12.4.3 Optimization based on data, not feeling
__12.4.4 Split complex code into multiple functions
__12.4.5 Prioritizing code readability
__12.4.6 Be careful about memory usage
__12.4.7 The compiler continues to improve

Chapter 13 Operating System

_13.1 OS operation and execution
__13.1.1 OS boot
__13.1.2 Interrupts and Traps
_13.2 Process
__13.2.1 Multiprogramming and Context Switching
__13.2.2 Process Status
__13.2.3 Process Creation and Destruction
__13.2.4 fork
__13.2.5 exec
__13.2.6 exit and wait
_13.3 Virtual Memory
__13.3.1 Memory address
__13.3.2 Converting virtual addresses to physical addresses
__13.3.3 Paging
__13.3.4 Memory Efficiency
_13.4 Interprocess Communication
__13.4.1 Signal
__13.4.2 Message passing
__13.4.3 Shared Memory
_13.5 Cleanup and other OS features

PART V PARALLEL PROGRAMMING

Chapter 14: Utilizing Shared Memory in the Multicore Era

_14.1 Multicore System Programming
__14.1.1 Impact of Multicore Systems on Process Execution
__14.1.2 Accelerating process execution using threads
_14.2 Writing Your First Multithreaded Program
__14.2.1 Creating and Joining Threads
__14.2.2 Thread Function
__14.2.3 Code Execution
__14.2.4 Revisiting Scalar Multiplication
__14.2.5 Scalar Multiplication Calculations: Multiple Arguments
_14.3 Thread Synchronization
__14.3.1 Mutual Exclusion
__14.3.2 Semaphore
__14.3.3 Other synchronization structures
_14.4 Measuring the performance of parallel programs
__14.4.1 Performance of Parallel Programs
__14.4.2 Topics to Explore Further
_14.5 Cache Coherence and False Sharing
__14.5.1 Caching on Multicore Systems
__14.5.2 False sharing
__14.5.3 False sharing fix
_14.6 Thread Safety
__14.6.1 Addressing Thread Safety Issues
_14.7 Implicit Threading with OpenMP
__14.7.1 Pragma
__12.7.2 Hello Threading: OpenMP Version
__14.7.3 A More Complex Example: CountSort in OpenMP
__14.7.4 Learn more about OpenMP
_14.8 Summary
__14.8.1 Key Points
__14.8.2 Read more

Chapter 15 Other Parallel Systems and Parallel Programming Models

_15.1 Heterogeneous Computing: Hardware Accelerators, General-Purpose GPU Computing, CUDA
__15.1.1 Hardware Accelerator
__15.1.2 GPU Architecture Overview
__15.1.3 GPGPU Computing
__15.1.4 CUDA
__15.1.5 Other GPGPU Programming Languages
_15.2 Distributed Memory Systems, Message Passing, and MPI
__15.2.1 Parallel and Distributed Processing Models
__15.2.2 Communication Protocol
__15.2.3 Message Passing Interface
__15.2.4 MPI Hello World
__15.2.5 MPI Scalar Multiplication
__15.2.6 Challenges of Distributed Systems
_15.3 Exascale and Beyond: Cloud Computing, Big Data, and the Future of Computing
__15.3.1 Cloud Computing
__15.3.2 MapReduce
__15.3.3 Looking to the Future: Opportunities and Challenges

Detailed image
Detailed Image 1

Publisher's Review
A Computer Science Guide for Developers Pursuing Efficient Programming

This book primarily covers intermediate computer science topics, such as introduction to computer systems or computer architecture, to help you understand how computers execute programs.
From the surface of programming in C to the deep-seated underpinnings of how circuits work, we present only the computer science knowledge essential for designing efficient programs.
By breaking down the computer into its various layers and examining how the computer executes programs in circuits, how to evaluate the performance of programs, and how to write parallel programs, we will be able to create more efficient programs.


Target audience

- A programming beginner who is curious about how the program he or she wrote is executed.
- College students who want to gain background knowledge related to their major, such as system programming and OS.
- Junior developers who want to design more efficient programs

What you learn

- How computers execute programs, from high-level languages ​​to binary representations and circuit levels.
- How to program in C and assembly language
- The impact of computer systems on program performance
- How to implement shared memory parallel programs using pthreads
GOODS SPECIFICS
- Date of issue: December 30, 2023
- Page count, weight, size: 788 pages | 183*235*40mm
- ISBN13: 9791169211765
- ISBN10: 1169211763

You may also like

카테고리