书签 分享 收藏 举报 版权申诉 / 36
上传文档赚钱

类型Slide-1--计算机网络与分布式系统实验室课件.ppt

  • 上传人(卖家):三亚风情
  • 文档编号:2891167
  • 上传时间:2022-06-08
  • 格式:PPT
  • 页数:36
  • 大小:885KB
  • 【下载声明】
    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

    13、erent compilers for different high-level languages. E.g, C compilers and Fortran compilers both generate output files in the same assembly language.19Assembly phase the assembler (as) translates hello.s into machine-language instructions, packages them in a form known as a relocatable object program

    14、, and stores the result in the object file hello.o. The hello.o file is a binary file whose bytes encode machine language instructions rather than characters. If we were to view hello.o with a text editor, it would appear to be gibberish.20Linking phase Notice that our hello program calls the printf

    15、 function, which is part of the standard C library provided by every C compiler. The printf function resides in a separate precompiled object file called printf.o, which must somehow be merged with our hello.o program. The linker (ld) handles this merging. The result is the hello file, which is an e

    16、xecutable object file (or simply executable) that is ready to be loaded into memory and executed by the system.2122Outline 信息就是位 + 上下文 程序被其他程序翻译成不同格式 处理器读并解释存储在存储器中的指令 操作系统管理硬件23主存储器IO桥USB控制器磁盘控制器图形适配器PCALU寄存器组总线接口磁盘鼠标键盘显示器系统总线存储器总线IO总线扩展槽,留待网络适配器等设备使用CPU存储在磁盘上的hello可执行程序文件一个典型的硬件系统一个典型的硬件系统24Mainme

    17、moryI/O bridgeBus interfaceALURegister fileCPUSystem busMemory busDisk controllerGraphicsadapterUSBcontrollerMouseKeyboardDisplayDiskI/O busExpansion slots forother devices suchas network adaptershello executable stored on diskPC25主存储器IO桥USB控制器磁盘控制器图形适配器PCALU寄存器组总线接口磁盘鼠标键盘显示器系统总线存储器总线IO总线CPU从键盘读取从键盘

    18、读取hello命令命令用户输入hello触发程序的执行存储在磁盘上的hello可执行文件“hello”26主存储器IO桥USB控制器磁盘控制器图形适配器PCALU寄存器组总线接口磁盘鼠标键盘显示器系统总线存储器总线IO总线CPU从磁盘加载可执行文件到主存从磁盘加载可执行文件到主存存储在磁盘上的hello可执行文件hello代码“hello,worldn”27主存储器IO桥USB控制器磁盘控制器图形适配器PCALU寄存器组总线接口磁盘鼠标键盘显示器系统总线存储器总线IO总线CPU从存储器写输出串到显示器从存储器写输出串到显示器显示”hello, worldn”完成程序执行存储在磁盘上的hello

    19、可执行文件hello代码“hello,worldn”28Outline 信息就是位 + 上下文 程序被其他程序翻译成不同格式 处理器读并解释存储在存储器中的指令 操作系统管理硬件 利用网络系统和其他系统通信29计算机系统的分层视图 操作系统(Operating system)主要用途 防止硬件被失控的应用程序滥用 在控制复杂而又广泛不同的低级硬件设备方面,为应用程序提供简单一致的方法应用程序操作系统处理器主存I/O设备软件硬件30操作系统提供的抽象表示 进程是操作系统对运行程序的一种抽象 虚拟存储器为每个进程提供一个假象,好像每个进程都在度占地使用主存。 每个进程看到的存储器都是一致的,成为虚

    20、拟存储器。 文件是字节序列3132Operating Systems 1960s IBM OS/360, Honeywell Multics, Fernado Jose Corbat IEEE Computer Pioneer Award, 1982 ACM Turing Award, 199033Operating Systems Unix Bell Lab, DEC PDP-7, 1969 Ken Thompson, Dennis Ritchie, Doug Mcllroy, Joe Ossana 1970 Brian Kernighan dubbed the system “Unix”

    21、Rewritten in C in 1973, announced in 1974 BSD (UC, Berkeley), System V(Bell lab) Solaris (Sun Microsystem) Posix standard Ken Thompson, Dennis Ritchie ACM Turing Award, 198334Linux 1991, Linus Torvalds Unix-like operating systems 386(486)AT, bash(1.08), gcc(1.40) Posix complaint version of Unix oper

    22、ating system Available on a wide array of computers From handheld devices to mainframe computers wristwatchWe have seen a bunch of Operating Systems 36Summary A computer system consists of hardware and systems software that cooperate to run application programs. Information inside the computer is re

    23、presented as groups of bits that are interpreted in different ways, depending on the context. Programs are translated by other programs into different forms, beginning as ASCII text and then translated by compilers and linkers into binary executable files. Processors read and interpret binary instru

    24、ctions that are stored in main memory. The operating system kernel serves an intermediary between the application and the hardware. It provides three fundamental abstractions: Files are abstractions for I/O devices. Virtual memory is an abstraction for both main memory and disks. Processes are abstractions for the processor, main memory, and I/O devices.

    展开阅读全文
    提示  163文库所有资源均是用户自行上传分享,仅供网友学习交流,未经上传用户书面授权,请勿作他用。
    关于本文
    本文标题:Slide-1--计算机网络与分布式系统实验室课件.ppt
    链接地址:https://www.163wenku.com/p-2891167.html

    Copyright@ 2017-2037 Www.163WenKu.Com  网站版权所有  |  资源地图   
    IPC备案号:蜀ICP备2021032737号  | 川公网安备 51099002000191号


    侵权投诉QQ:3464097650  资料上传QQ:3464097650
       


    【声明】本站为“文档C2C交易模式”,即用户上传的文档直接卖给(下载)用户,本站只是网络空间服务平台,本站所有原创文档下载所得归上传人所有,如您发现上传作品侵犯了您的版权,请立刻联系我们并提供证据,我们将在3个工作日内予以改正。

    163文库