电机资讯工程实习个人电脑系统(英文版).ppt

上传人:牧羊曲112 文档编号:6318101 上传时间:2023-10-16 格式:PPT 页数:39 大小:547.50KB
返回 下载 相关 举报
电机资讯工程实习个人电脑系统(英文版).ppt_第1页
第1页 / 共39页
电机资讯工程实习个人电脑系统(英文版).ppt_第2页
第2页 / 共39页
电机资讯工程实习个人电脑系统(英文版).ppt_第3页
第3页 / 共39页
电机资讯工程实习个人电脑系统(英文版).ppt_第4页
第4页 / 共39页
电机资讯工程实习个人电脑系统(英文版).ppt_第5页
第5页 / 共39页
点击查看更多>>
资源描述

《电机资讯工程实习个人电脑系统(英文版).ppt》由会员分享,可在线阅读,更多相关《电机资讯工程实习个人电脑系统(英文版).ppt(39页珍藏版)》请在三一办公上搜索。

1、1,EE110300 電機資訊工程實習Lecture 3 個人電腦系統 II-Operating Systems,2,What is an operating system?Definition,An operating system is the“permanent”software that controls/abstracts hardwareUser applications can thus be simpler and device-independent,physical machine interface,User Applications,Operating System,A

2、rchitecture,virtual machine interface,3,What is an operating system?Definition(cont),Manages resources and processes to support different user applicationsProvides Applications Programming Interface(API)for user applications,User Application,Operating System,Architecture,User Application,4,Modern op

3、erating systems,x86 platformLinuxWindowsMac platform Mac OSSun Solaris&Unix(Sun workstations)IBM AIX(mainframes)Embedded systems(special-purpose OS)Palm,PocketPC,etcXbox,etc,5,Linus Torvalds,1991,Finland,Linux Project1992,Linux Kernel 0.02Bash v1.08GCC v1.401997,Moves to Transmeta1998,Linux Kernel v

4、2.22001,Linux Kernel v2.4Pronunciation:“Linn-ucks”,6,Windows 2000&XP,1989:10 developers left DEC VMS team and joined Microsoft Windows NT 1.01996:Windows NT 4.01999:Windows 20002001:Windows XP2002:Microsoft.Net Server,7,Linux vs.Windows NT,Linux is kernel only,free and open sourceWindows is full-loa

5、ded OS and pricyLinux requires minimum HW,Windows notWeb server(Win2K+SWC)beats(Linux+TUX)File server&printer serverWindows supports a wider range of HWLinux has more stable drivers,8,Operating System Interfaces,9,Software&hardware layer,User Program,Executable Binary,Compiler,Linker,System library,

6、Architecture,user,compiler,OS interface,OS,Hardware,device drivers,Operating System,kernel,user mode,10,Device Driver,Device driver的唯一目的就是要將所有的硬體隱藏.他應該是整套軟體中唯一能和硬體溝通的窗口.他能直接讀取或寫入特定裝置控制及狀態暫存器,如果裝置發生中斷,那ISR也要整合到裝置驅動程式.,11,System service call(monitor),C Programs:main()/call printf,provided/by the C lib

7、rary,to/print on the screenprintf(“Hello World!”);,Borland C library:Int printf()/call SysOutputString,/provided by NT/system library,to/print on the screenSysOutputString();,NT library:Void SysOutputString()/call NtOutputString,that in turn will call/video card driver to output strings to/the scree

8、nNtOutputString();,12,System service call(disk),C Programs:main()/call CreateFile/by the C library,to/create a file on diskCreateFile(“a.txt”),Borland C library:Int CreateFile()/call NtCreateFile,/provided by NT to/create a fileNtCreateFile();,NT library:Void NtCreateFile()/call NtInternalCreateFile

9、,that in turn will/call the file system driver and the disk/driver to create a file on a disk NtInternalCreateFile();,13,System service calls(network),C Programs:main()so=createsocket();send(so,“text”);close(so);,Borland C library:int createsocket()NtCreateSocket();int send()NtSocketSend();,NT libra

10、ry:Void NtCreateSocket()NtAfdCreateSocket();,14,15,Virtual computer concept,C+compiler,FORTRAN compiler,C compiler,Java compiler,Assembler,OperatingSystemCommandinterpreter,LISP interpreter,Operating system,Macroinstruction interpreter,Bare machine,Virtual CComputer,Virtual C+Computer,16,Importance

11、of operating system,System API are the only interface between user applications and hardwareAPI are designed for general-purpose,not performance driven(work applications)OS code cannot allow any bugAny break(e.g.invalid access)causes rebootThe owner of OS technology controls the software industry,17

12、,What is Embedded System?,是電腦軟體與硬體的綜合體,亦可涵蓋機械或其他附屬裝置;整個綜合體設計的目的,在於滿足某種特殊功能.例如:PDA,遊樂器,衛星導航系統,流程管理器 等.,18,Embedded system architecture,3-layered devicePalm,PocketPC,User Applications,Embedded OS,Hardware,2-layered deviceXBox,Hardware,Application,19,General-purpose&embedded OS,20,Operating system conc

13、epts,21,Process&Thread,How do different applications run on the same machine at the same time without interfering each other?Protection between processesProtection between a process and the OSProcess:an execution of a program,consisting of a virtual address space,one or more threads,and some OS stat

14、es.,22,Virtual memory(address space),virtual address space(4GB),page 0,page 1,page 2,page 220,physical memory(16MB),pp 0,pp 1,pp 2,pp N,paging file,pp 212,x,23,Virtual memory(address space),virtual address space(4GB),page 0,page 1,page 2,page 220,physical memory(16MB),pp 0,pp 1,pp 2,pp N,paging file

15、,pp 212,24,Memory manager,physical memory,pp 0,pp 1,pp 2,pp N,paging file,pp 212,process VA,process VA,PT,PT,25,Memory manager,physical memory,pp 0,pp 1,pp 2,pp N,paging file,pp 212,process VA,process VA,PT,PT,26,Memory manager(w/constraint),physical memory,pp 0,pp 1,pp 2,pp N,paging file,pp 212,pro

16、cess VA,process VA,PT,PT,x,memory manager,27,Protectiondual mode operation,Can application modify its own page table?If it could,could get access to all physical memory.Dual ModeKernel/protected model:no restriction,can touch any physical memory pageUser mode:where you program runs,can only touch pa

17、rt of the virtual address spaceApplications can enter the kernel mode through systems calls(traps),28,Mode change:system call trap,1.System call traps to the kernel(kernel mode)2.Kernel determines service routine required3.Kernel services the call.4.Control is returned to user program(user mode),29,

18、Thread,A process starts with one thread(main thread),and can initialize more threads by CreateThread()callsA thread represents an execution stream of instructions and its CPU register contextA thread is the unit used in the schedulerKill a process kill its all threads,30,Scheduler,A component in OS

19、that decides which thread in the thread pool gets the CPUPriority-based schedulerContext switch,new thread,terminatingthreads,signalevents,31,Synchronization,All threads in the same process share all global dataSynchronization among these threads is necessary to maintain data integrityResource lock

20、is commonly used to guarantee thread mutual exclusiveabuse of such locks decreases scalabilityignorance of such locks decreases stabilityDeadlock issues,32,File Systems,A hard disk is just a raw media storageA hard disk device driver allows OS to communicate with the hardwareBut,it is the responsibi

21、lity of the OS to organize disk sectors/tracks for storing filessuch component is called the file systemE.g.A hard disk that stores NTFS information cannot be read with the FAT32 driverexample:paper with Moses code,33,Operating Systems and System Software,Example:web server software,34,User-mode web

22、 server architecture,User Mode,Kernel Mode,I/O module,35,User-mode web server commons,User-mode application architecturee.g.Microsoft Internet Information Server(IIS),Netscape Enterprise Server,Apache HTTP Server,etc.Dependent on generally system APIStand-alone web content cache limited by virtual a

23、ddress spaceTime-to-live cache replacement algorithmMemory-less dynamic code execution,36,SWC web server architecture,User Mode,Kernel Mode,network card+,System Cache,miss,37,SPECWEB99 Performance,*estimated scaling data,38,Kernel vs.user-based web server,Increase peak capacity by five timesWeb cache size be limited by physical memory sizeWeb cache be shared by both static&dynamic web requestsRemove I/O overhead and Socket creationFast TCPIP data transmission,39,Summary,A.D.1492 Columbus discovers America-The new and free land is on your grip!,

展开阅读全文
相关资源
猜你喜欢
相关搜索
资源标签

当前位置:首页 > 生活休闲 > 在线阅读


备案号:宁ICP备20000045号-2

经营许可证:宁B2-20210002

宁公网安备 64010402000987号