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

上传人:痛*** 文档编号:241610670 上传时间:2024-07-09 格式:PPTX 页数:38 大小:2.08MB
返回 下载 相关 举报
电机资讯工程实习-个人电脑系统(英文版)-课件_第1页
第1页 / 共38页
电机资讯工程实习-个人电脑系统(英文版)-课件_第2页
第2页 / 共38页
电机资讯工程实习-个人电脑系统(英文版)-课件_第3页
第3页 / 共38页
点击查看更多>>
资源描述
1What 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 interface2What is an operating system?Definition(cont)Manages resources and processes to support different user applicationsProvides Applications Programming Interface(API)for user applicationsUser ApplicationOperating SystemArchitectureUser Application3Modern operating systemsx86 platformLinuxWindowsMac platform Mac OSSun Solaris&Unix(Sun workstations)IBM AIX(mainframes)Embedded systems(special-purpose OS)Palm,PocketPC,etcXbox,etc4Linus Torvalds1991,Finland,Linux Project1992,Linux Kernel 0、02Bash v1、08GCC v1、401997,Moves to Transmeta1998,Linux Kernel v2、22001,Linux Kernel v2、4Pronunciation:“Linn-ucks”5Windows 2000&XP1989:10 developers left DEC VMS team and joined Microsoft Windows NT 1、01996:Windows NT 4、01999:Windows 20002001:Windows XP2002:Microsoft、Net Server6Linux 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)&printer serverWindows supports a wider range of HWLinux has more stable drivers7Operating System Interfaces8Software&hardware layerUser ProgramExecutable BinarypilerLinkerSystem libraryArchitectureuserpilerOS interfaceOSHardwaredevice driversOperating Systemkerneluser mode9Device DriverDevice driver的唯一目的就是要將所有的硬體隱藏、他應該是整套軟體中唯一能与硬體溝通的窗口、他能直截了当讀取或寫入特定裝置控制及狀態暫存器,假如裝置發生中斷,那ISR也要整合到裝置驅動程式、10System 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 Void SysOutputStringSysOutputString()()/call NtOutputString,that in turn will/call NtOutputString,that in turn will call call/video card driver to output strings to/video card driver to output strings to/the screen/the screenNtOutputString();NtOutputString();11System service call(disk)C Programs:main()/call CreateFile/by the C library,to/create a diskCreateFile(“a、txt”)Borland C library:Borland C library:Int CreateFile()/call NtCreateFile,/provided by NT to/create a fileNtCreateFile();NT library:NT library:Void NtCreateFile()/call NtInternalCreateFile,that in turn will /call the driver and the disk /driver to create a a disk NtInternalCreateFile();12System service calls(network)C Programs:main()so=createsocket();send(so,“text”);close(so);Borland C library:Borland C library:int createsocket()NtCreateSocket();int send()NtSocketSend();NT library:NT library:Void NtCreateSocket()NtAfdCreateSocket();1314Virtual puter conceptC+pilerFORTRAN pilerC pilerJava pilerAssemblerOperatingSystemmandinterpreterLISP interpreterOperating systemMacroinstruction interpreterBare machineVirtual CputerVirtual C+puter15Importance of operating systemSystem API are the only interface between user applications and hardwareAPI are designed for general-purpose,not performance driven(e、g、network applications)OS code cannot allow any bugAny break(e、g、invalid access)causes rebootThe owner of OS technology controls the software industry16What is Embedded System?是電腦軟體與硬體的綜合體,亦可涵蓋機械或其他附屬裝置;整個綜合體設計的目的,在於滿足某種特别功能、例如:PDA,遊樂器,衛星導航系統,流程管理器 等、17Embedded system architecture3-layered devicePalm,PocketPCUser ApplicationsEmbedded OSHardware2-layered deviceXBoxHardwareApplication18General-purpose&embedded OSGeneral-purpose Embedded OSExamplesLinux,WindowsWinCE,Palm OSHardwareGeneral-purpose Special deviceOS code sizeLargeSmallStability req、StrongWeakDevelop、costHugeMedium19Operating system concepts20Process&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、21Virtual memory(address space)0232-1virtual address space(4GB)page 0page 1page 2page 220vap0vap1xpage tablephysical memory(16MB)pp 0pp 1pp 2pp Npaging filepp 212x22Virtual memory(address space)0232-1virtual address space(4GB)page 0page 1page 2page 220vap0vap1xpage tablephysical memory(16MB)pp 0pp 1pp 2pp Npaging filepp 21223Memory managerphysical memorypp 0pp 1pp 2pp Npaging filepp 212process VAprocess VAPTPT24Memory manager physical memorypp 0pp 1pp 2pp Npaging filepp 212process VAprocess VAPTPT25Memory manager(w/constraint)physical memorypp 0pp 1pp 2pp Npaging filepp 212process VAprocess VAPTPTxmemory manager26Protectiondual 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)27Mode 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)28ThreadA 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 threads29SchedulerA ponent in OS that decides which thread in the thread pool gets the CPUPriority-based schedulerContext switchnew threadschedulerreadyrunningwaitingterminatingthreadssignalevents30SynchronizationAll threads in the same process share all global dataSynchronization among these threads is necessary to maintain data integrityResource lock is monly used to guarantee thread mutual exclusiveabuse of such locks decreases scalabilityignorance of such locks decreases stabilityDeadlock issues31A hard disk is just a raw media storageA hard disk device driver allows OS to municate with the hardwareBut,it is the responsibility of the OS to organize disk sectors/tracks for storing filessuch ponent is called the E、g、A hard disk that stores NTFS information cannot be read with the FAT32 driverexample:paper with Moses code32Operating Systems and System SoftwareExample:web server software33User-mode web server architectureWeb ServerCMweb cachenetwork cardTCPIPUser ModeKernel ModeI/O moduleSocketSystem Cache34User-mode web server monsUser-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 execution35SWC web server architectureUser ModeKernel ModeTCPIP-NTFSCMweb cachenetwork card+System CacheSWCmissI/O ModuleTWC.LIBUser CodeVAPAhit36SPECWEB99 Performance*estimated scaling data37Kernel 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 transmission38Summary#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交易模式,即用户上传的文档直接被用户下载,本站只是中间服务平台,本站所有文档下载所得的收益归上传人(含作者)所有。装配图网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。若文档所含内容侵犯了您的版权或隐私,请立即通知装配图网,我们立即给予删除!