藉助google 翻譯讀一下這本書吧,作個記錄程序員
Computer Systems A Programmer’s Perspective 簡稱 --CSAPP shell
譯文: 從程序員的角度透視計算機系統編程
Randal E. Bryantpromise
Carnegie Mellon University 卡內基·梅隆大學安全
David R. O’Hallaron服務器
Carnegie Mellon University and Intel Labs卡內基梅隆大學和英特爾實驗室網絡
Chapter 1 A Tour of Computer Systems併發
第1章計算機系統之旅app
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 computer systems 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.ide
計算機系統由硬件和系統軟件組成,它們一塊兒工做來運行應用程序。 系統的具體實施隨着時間而改變, 但底層的概念沒有。全部的計算機系統都有類似的硬件和軟件組件,執行相似的功能。本書是爲但願經過理解這些組件的工做方式以及它們如何影響其程序的正確性和性能而更好地掌握其技巧的程序員編寫的。
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 rare 「power programmer,」 enlightened by an understanding of the underlying computer system and its impact on your application programs.
你準備好了一個使人興奮的旅程。 若是你致力於學習本書中的概念,那麼你將成爲一名可貴的「大牛」經過了解計算機系統的底層及其對應用程序的影響,將對你有更多的啓發。
You are going to learn practical skills such as 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 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 your own Unix shell, your own dynamic storage allocation package, and even your 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
你將學習實用技能,例如如何避免由計算機表示數字的方式引發的奇怪數值錯誤。您將學習如何使用利用現代處理器和內存系統設計的巧妙技巧來優化您的C代碼。您將瞭解編譯器如何實現過程調用以及如何使用這些知識來避免困擾網絡和Internet軟件的內存溢出安全漏洞。您將學習如何識別和避免連接過程當中使人討厭的錯誤,這會讓普通程序員感到困惑, 你將學習如何編寫你本身的Unix shell,你會有本身的動態存儲分配包,甚至你本身的Web服務器。 您將瞭解併發的特性和缺陷, 隨着多個處理器內核集成到單個芯片上,這個話題變得愈來愈重要
In their classic text on the C programming language [58], 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.
在C語言編程的經典文本[58]中, Kernighan和Ritchie使用圖1.1中顯示的hello程序向讀者介紹C語言。
雖然你好是一個很是簡單的程序, 該系統的每一個主要部分都必須協同工做才能完成。
從某種意義上說, 本書的目標是幫助你理解當你在你的系統上運行hello時,發生了什麼,爲何。
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, and components that come into play. Later chapters will expand on these ideas.
咱們經過追蹤hello程序的生命週期來開始咱們的系統研究, 從程序員建立時開始,直到它在系統上運行,
打印它的簡單信息,並終止。 當咱們追隨程序的生命週期時, 咱們將簡要介紹一些關鍵概念,術語和組件。 後面的章節將會擴展這些想法。
#include int main() { printf("hello, world\n"); }