电机资讯工程实习个人电脑系统英文版ppt课件

上传人:沈*** 文档编号:179599482 上传时间:2023-01-02 格式:PPT 页数:39 大小:578.50KB
返回 下载 相关 举报
电机资讯工程实习个人电脑系统英文版ppt课件_第1页
第1页 / 共39页
电机资讯工程实习个人电脑系统英文版ppt课件_第2页
第2页 / 共39页
电机资讯工程实习个人电脑系统英文版ppt课件_第3页
第3页 / 共39页
点击查看更多>>
资源描述
1EE110300 電機資訊工程實習Lecture 3 個人電腦系統 II -Operating Systemsdocin/sundae_meng2What is an operating system?DefinitionAn operating system is the“permanent software that controls/abstracts hardwareUser applications can thus be simpler and device-independentphysical machine interfaceUser ApplicationsOperating SystemArchitecturevirtual machine interface3What is an operating system?Definition(cont)Manages resources and processes to support different user applicationsProvides Applications Programming Interface(API)for user applicationsUser ApplicationOperating SystemArchitectureUser Application4Modern operating systemsx86 platformLinuxWindowsMac platform Mac OSSun Solaris&Unix(Sun workstations)IBM AIX(mainframes)Embedded systems(special-purpose OS)Palm,PocketPC,etcXbox,etc5Linus Torvalds1991,Finland,Linux Project1992,Linux Kernel 0.02Bash v1.08GCC v1.402019,Moves to Transmeta2019,Linux Kernel v2.22019,Linux Kernel v2.4Pronunciation:“Linn-ucks6Windows 2000&XP1989:10 developers left DEC VMS team and joined Microsoft Windows NT 1.02019:Windows NT 4.02019:Windows 20002019:Windows XP2019:Microsoft.Net Server7Linux vs.Windows NTLinux is kernel only,free and open sourceWindows is full-loaded 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 drivers8Operating System Interfacesdocin/sundae_meng9Software&hardware layerUser ProgramExecutable BinaryCompilerLinkerSystem libraryArchitectureusercompilerOS interfaceOSHardwaredevice driversOperating Systemkerneluser mode10Device DriverDevice driver的独一目的就是要將一切的硬體隱藏.他應該是整套軟體中独一能和硬體溝通的窗口.他能直接讀取或寫入特定裝置控制及狀態暫存器,假设裝置發生中斷,那ISR也要整合到裝置驅動程式.11System service call(monitor)C Programs:main()/call printf,provided/by the C library,to/print on the screenprintf(“Hello World!);Borland C library:Borland C library:Int printf()Int printf()/call SysOutputString,/call SysOutputString,/provided by NT/provided by NT/system library,to/system library,to/print on the screen/print on the screenSysOutputString();SysOutputString();NT library:NT library:Void SysOutputString()Void SysOutputString()/call NtOutputString,that in turn will call/call NtOutputString,that in turn will call/video card driver to output strings to/video card driver to output strings to/the screen/the screenNtOutputString();NtOutputString();12System service call(disk)C Programs:main()/call CreateFile/by the C library,to/create a file on diskCreateFile(“a.txt)Borland C library:Borland C library:Int CreateFile()Int CreateFile()/call NtCreateFile,/call NtCreateFile,/provided by NT to/provided by NT to/create a file/create a fileNtCreateFile();NtCreateFile();NT library:NT library:Void NtCreateFile()Void NtCreateFile()/call NtInternalCreateFile,that in turn will /call NtInternalCreateFile,that in turn will /call the file system driver and the disk /call the file system driver and the disk /driver to create a file on a disk /driver to create a file on a disk NtInternalCreateFile();NtInternalCreateFile();13System service calls(network)C Programs:main()so=createsocket();send(so,“text);close(so);Borland C library:Borland C library:int createsocket()int createsocket()NtCreateSocket();NtCreateSocket();int send()int send()NtSocketSend();NtSocketSend();NT library:NT library:Void NtCreateSocket()Void NtCreateSocket()NtAfdCreateSocket();NtAfdCreateSocket();1415Virtual computer conceptC+compilerFORTRAN compilerC compilerJava compilerAssemblerOperatingSystemCommandinterpreterLISP interpreterOperating systemMacroinstruction interpreterBare machineVirtual CComputerVirtual C+Computer16Importance of operating systemSystem 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 industry17What is Embedded System?是電腦軟體與硬體的綜合體,亦可涵蓋機械或其他附屬裝置;整個綜合體設計的目的,在於滿足某種特殊功能.例如:PDA,遊樂器,衛星導航系統,流程管理器 等.docin/sundae_meng18Embedded system architecture3-layered devicePalm,PocketPCUser ApplicationsEmbedded OSHardware2-layered deviceXBoxHardwareApplication19General-purpose&embedded OSGeneral-purpose Embedded OSExamplesLinux,WindowsWinCE,Palm OSHardwareGeneral-purpose Special deviceOS code sizeLargeSmallStability req.StrongWeakDevelop.costHugeMedium20Operating system conceptsdocin/sundae_meng21Process&ThreadHow 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 states.22Virtual memory(address space)0232-1virtual address space(4GB)page 0page 1page 2page 220vap0vap1xpage tablephysical memory(16MB)pp 0pp 1pp 2pp Npaging filepp 212x23Virtual memory(address space)0232-1virtual address space(4GB)page 0page 1page 2page 220vap0vap1xpage tablephysical memory(16MB)pp 0pp 1pp 2pp Npaging filepp 21224Memory managerphysical memorypp 0pp 1pp 2pp Npaging filepp 212process VAprocess VAPTPT25Memory manager physical memorypp 0pp 1pp 2pp Npaging filepp 212process VAprocess VAPTPT26Memory manager(w/constraint)physical memorypp 0pp 1pp 2pp Npaging filepp 212process VAprocess VAPTPTxmemory manager27Protectiondual mode operationCan 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 part of the virtual address spaceApplications can enter the kernel mode through systems calls(traps)28Mode change:system call trap1.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)29ThreadA 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 threads30SchedulerA component in OS that decides which thread in the thread pool gets the CPUPriority-based schedulerContext switchnew threadschedulerreadyrunningwaitingterminatingthreadssignalevents31SynchronizationAll threads in the same process share all global dataSynchronization among these threads is necessary to maintain data integrityResource lock is commonly used to guarantee thread mutual exclusiveabuse of such locks decreases scalabilityignorance of such locks decreases stabilityDeadlock issues32File SystemsA hard disk is just a raw media storageA hard disk device driver allows OS to communicate with the hardwareBut,it is the responsibility 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 code33Operating Systems and System SoftwareExample:web server softwaredocin/sundae_meng34User-mode web server architectureWeb ServerCMweb cachenetwork cardTCPIPUser ModeKernel ModeI/O moduleSocketSystem CacheFileSys35User-mode web server commonsUser-mode application architecturee.g.Microsoft Internet Information Server(IIS),Netscape Enterprise Server,Apache Server,etc.Dependent on generally system APIStand-alone web content cache limited by virtual address spaceTime-to-live cache replacement algorithmMemory-less dynamic code execution36SWC web server architectureUser ModeKernel ModeTCPIP-NTFSCMweb cachenetwork card+System CacheSWCmissI/O ModuleTWC.LIBUser CodeVAPAhit37SPECWEB99 Performance*estimated scaling data38Kernel vs.user-based web serverIncrease 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 transmission39Summary#personsmanyfew skillseasydifficultcontrolsmalllargerewardlowhighAppsEOSA.D.1492 Columbus discovers America-The new and free land is on your grip!
展开阅读全文
相关资源
正为您匹配相似的精品文档
相关搜索

最新文档


当前位置:首页 > 办公文档 > 工作计划


copyright@ 2023-2025  zhuangpeitu.com 装配图网版权所有   联系电话:18123376007

备案号:ICP2024067431-1 川公网安备51140202000466号


本站为文档C2C交易模式,即用户上传的文档直接被用户下载,本站只是中间服务平台,本站所有文档下载所得的收益归上传人(含作者)所有。装配图网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。若文档所含内容侵犯了您的版权或隐私,请立即通知装配图网,我们立即给予删除!