Slide-1--计算机网络与分布式系统实验室课件.ppt
- 【下载声明】
1. 本站全部试题类文档,若标题没写含答案,则无答案;标题注明含答案的文档,主观题也可能无答案。请谨慎下单,一旦售出,不予退换。
2. 本站全部PPT文档均不含视频和音频,PPT中出现的音频或视频标识(或文字)仅表示流程,实际无音频或视频文件。请谨慎下单,一旦售出,不予退换。
3. 本页资料《Slide-1--计算机网络与分布式系统实验室课件.ppt》由用户(三亚风情)主动上传,其收益全归该用户。163文库仅提供信息存储空间,仅对该用户上传内容的表现方式做保护处理,对上传内容本身不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知163文库(点击联系客服),我们立即给予删除!
4. 请根据预览情况,自愿下载本文。本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
5. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007及以上版本和PDF阅读器,压缩文件请下载最新的WinRAR软件解压。
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- Slide 计算机网络 分布式 系统 实验室 课件
- 资源描述:
-
1、A Tour of Computer Systemshttp:/ Hongfei YanSchool of EECS, Peking University9/20/20102Enduring concepts Computer systems consist hardware and systems software that work together to run programs Specific implementations of systems change over time But the underlying concepts do not All computer syst
2、ems have similar hardware and software components that perform similar functions3Layers of Computer Systems4Computer Hardware - Von Neumann Architecture5EDVAC6IA-32MainmemoryI/O bridgeBus interfaceALURegister fileCPUSystem busMemory busDisk controllerGraphicsadapterUSBcontrollerMouseKeyboardDisplayD
3、iskI/O busExpansion slots forother devices suchas network adaptershello executable stored on diskPC7Outline 信息就是位 + 上下文 程序被其他程序翻译成不同格式 处理器读并解释存储在存储器中的指令 操作系统管理硬件8What happens and why, when you run hello on your system ?1# include 2int main()34printf(“hello, worldn”);59Information is bits The source
4、program is a sequence of bits each with a value of 0 or 1, Bits organized in 8-bit chunks called bytes. Each byte represents some text character in the program. Most modern systems represent text characters using the ASCII standard that represents each character with a unique byte-sized integer valu
5、e.10Hello.c的ASCII表示11一个基本思想 系统中所有的信息 包括磁盘文件、存储器中的程序、用户数据以及网络上传送的数据, 都是由一串比特表示的。 区分不同数据对象的惟一方法是我们读到这些数据对象时的上下文 不同的上下文,同样字节序列可能表示一个整数、浮点数、字符串或者机器指令 与常见的整数和实数是不同的,需要了解数字的机器表示12一个具有很多命令的功能非常强大的编辑器 Install http:/ 运行vim tutor 学习一个25-30分钟的教程13Outline 信息就是位 + 上下文 程序被其他程序翻译成不同格式 处理器读并解释存储在存储器中的指令 操作系统管理硬件14P
6、rograms Are Translated by Other Programs into Different Forms The hello program begins life as a high-level C program which human-readable form. In order to run hello.c on the system, the individual C statements must be translated by other programs into a sequence of low-level machine-language instr
7、uctions. These instructions are then packaged in a form called an executable object program and stored as a binary disk file. Object programs are also referred to as executable object files.Compiler Driver On a Unix system, the translation from source file to object file is performed by a compiler d
8、river:unix gcc -o hello hello.c Here, the GCC compiler driver reads the source file hello.c and translates it into an executable object file hello.1516G+ for Windows (MinGW_MSYS) including MinGW 5.1, G+ 3.4, GDB 5.3, Make, Vim 5.8, MSYS 1.0. extracting the package to a root directory (such as c:/ or
9、 d:/), and run msys/1.0/msys.bat. 编写hello.c程序,编译,运行hello程序http:/ 17The compilation system The programs that perform the four phases (preprocessor, compiler, assembler, and linker) are known collectively as the compilation system. gcc o hello hello.cPre-processor(cpp)hello.i Compiler(cc1)hello.sAssem
10、bler(as)hello.oLinker(ld)hellohello.cSourceprogram(text)Modifiedsourceprogram(text)Assemblyprogram(text)Relocatableobjectprograms(binary)Executableobjectprogram(binary)printf.oPreprocessing phase The preprocessor (cpp) modifies the original C program according to directives that begin with the # cha
11、racter. E.g, the #include command in line 1 of hello.c tells the preprocessor to read the contents of the system header file stdio.h and insert it directly into the program text. The result is another C program, typically with the .i suffix.18Compilation phase The compiler (cc1) translates the text
12、file hello.i into the text file hello.s, which contains an assembly-language program. Each statement in an assembly-language program exactly describes one low-level machine-language instruction in a standard text form. Assembly language is useful because it provides a common output language for diff
展开阅读全文