cs:app2e chapter 1 A Tour of Computer Systems.

本书旨在帮助程序员通过理解计算机系统的硬件、软件组件及其工作原理,提高编程技能。读者将学习避免数值错误、优化代码、防范缓冲溢出漏洞、解决链接错误、编写Unix shell、动态存储分配包和Web服务器等实用技能。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

    A computer system consists of hardware and systems software that work together to  run application programs. Specific implementations of systems change over time, but the underlying concepts do not. All computers have similar hardware and software components that perform similar functions. This book is written for programmers who want to get better at their craft by understanding how these components work and how they affect the correctness and performance of their programs.


    You are poised for an exciting journey.If you dedicate yourself to learning the concepts in this book. Then you will be on your way to becoming a are "power programmer", enlightened by an understanding of the underlying computer system and its impacts on your application programs.(为了这一目标,还不能坚持把本书啃完吗!?)


   You are going to learn practical skills such an how to avoid strange numerical errors caused by the way that computers represent numbers. You will learn how to optimize your c code by using clever tricks that exploit the designs of modern processors and memory systems. You will learn how the compiler implements procedure calls and how to use this knowledge to avoid to the security holes from buffer overflow vulnerabilities that plague network and internet software. You will learn how to recognize and avoid the nasty errors during linking that confound the average programmer. You will learn how to write you own Unix shell, your own dynamic storage allocation package, and even you own Web Server. You will learn the promises and pitfalls of concurrency, a topic of increasing importance as multiple processor cores are integrated onto single chips.  


    In their classic text on the C programming language, Kernighan and Ritchie introduce readers to C using the hello program shown in figure 1.1. Although hello is a very simple program, every major part of the system must work in concert in order for it to run to completion. In a sense, the goal of this book is to help you understand what happens and why, when you run hello on your system.  


    We begin our study of systems by tracing the lifetime of the hello program, from the time it is created by a programmer, until it runs on a system, prints its simple message, and terminates. As we follow the lifetime of the program, we will briefly introduce the key concepts, terminology, components that come into play. Later chapters will expand on these ideas. 

    

    __________________________________________code/intro/hello.c

      1.    #include <stdio.h>

      2.

      3.    int main()

      4.    {

      5.        printf("hello, world\n");

      6.    }

    __________________________________________code/intro/hello.c

    figure 1.1 The hello program.


    





    

    

    

    

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值