OS Components and Structure Unversity of Washington操作系统的组成与结构华盛顿大学_第1页
OS Components and Structure Unversity of Washington操作系统的组成与结构华盛顿大学_第2页
OS Components and Structure Unversity of Washington操作系统的组成与结构华盛顿大学_第3页
OS Components and Structure Unversity of Washington操作系统的组成与结构华盛顿大学_第4页
OS Components and Structure Unversity of Washington操作系统的组成与结构华盛顿大学_第5页
已阅读5页,还剩19页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

1、os components and structuremarch 31, 2000instructor: gary kimuraslides courtesy of hank levyweek in reviewlpurpose of an oslhardware support for an oslnext the 60,000 foot view of an osos structurelto understand an os, lets first look at its components and then how theyre composed or organized.lwell

2、 come back and look at each of these in detail as the course progresses.lrealize that its never as simple as it looks. these basic concepts exist in some form in all systems, however each system implements them in a slightly different way.lalso, the divisions between components may not be as clean i

3、n the real world as in the modelprocess managementlan operating system executes many kinds of activities: user programs batch jobs or command scripts system programs: print spoolers, name servers, file servers, network listeners, etc.leach of these “execution entities” is encapsulated in a process.l

4、the process includes the execution context (pc, registers, vm, resources, etc) and all info the activity (program) needs to run.lthe os schedules processes to run.processesa program is a passive thing - just a file on the disk with code that is potentially runnable.a process is one instance of a pro

5、gram in execution; at any instance, there may be many processes running copies of a single program (e.g., an editor): each is a separate, independent process.4codestackpcregisterspage tablesresource counts.codestackpcregisterspage tablesresource counts.process bprocess aprocess operationslprocesses

6、are fundamental os-provided objects. lthe os supports operations on processes, e.g.: create a process delete a process suspend a process resume a process inter-process communication inter-process synchronization create/delete a subprocessmemory managementlprimary memory is the direct access storage

7、for cpu.lprograms must be stored in memory to execute.los must: allocate memory space for programs (both explicitly and implicitly) deallocate memory space when needed maintain the mappings from virtual to physical memory (page tables) decide how much memory to allocate to each process, and when a p

8、rocess should be removed from memory (policies)i/o managementlmuch of the os kernel is concerned with i/o.lthe os provides a standard interface between programs (user or sytem) and devices.ldevice drivers are the processes responsible for each device type. a driver encapsulates device-specific knowl

9、edge, e.g., for device initiation and control, interrupt handling, and errors.lthere may be a process for each device, or even for each i/o request, depending on the particular os.secondary storage managementlsecondary storage (disk) is the persistent memory, i.e., it endures system failures (we hop

10、e).llow-level os routines are typically responsible for low-level disk function, such as scheduling of disk operations, head movement, error handling, etc. lthese routines may also be responsible for managing space on the disk.lbut, the line between this and the file system is very fuzzy.space manag

11、ement functions may belong in the file system.file managementlsecondary storage devices are too crude to use directly for long-term storage.lthe file system provides logical objects and logical operations on those objects.la file is the basic long-term storage entity: a file is a named collection of

12、 persistent information that can be read or written.lthe file system supports directories - special files that contain names of other files and associated file information.file managementlfile system provides standard file operations, e.g.: file creation and deletion directory creation and deletion

13、manipulation of files and directories: read, write, extend, rename, protect. file copylthe file system also provides general services, e.g.: backup maintaining mapping information accounting and quotasprotection systemlprotection is a general mechanism throughout the oslall resources objects need pr

14、otection memory processes files deviceslprotection mechanisms help to detect errors as well as to prevent malicious destructioncommand interpreterlprocess that handles interpretation of user input commands from keyboard (or script files)lon some systems, command interpreter is a standard part of the

15、 os lon others, its simply a non-privileged process that interfaces to the user, permitting replacement of interpreter with otherslon others, theres not really a command language (e.g., the macintosh has no commands in the conventional sense)accounting systemlgeneral facility for keeping track of re

16、source usage for all system objectslmay be used to enforce quotas, or to produce bill$.14os structurehardwarememory managementi/o systemsecondary storage managementfile systemprotection systemaccounting systemprocess managementcommand interpreterinformation servicesthe os (a simplified view)error ha

17、ndlingos structurelan os consists of all of these components, plus lots of others, plus system service routines, plus system programs (privileged and non-privileged), plus .lthe big issue: how do we organize all of this? what are the entities and where do they exist? how does these entities cooperat

18、e?lbasically, how do we build a complex system thats: performant reliable extensiblestructuretraditionally, systems such as unix were built as a monolithic kernel:16hardwareos kerneluser programseverythingfile system, virtual memory, i/o drivers, process control, system services, swapping, networks,

19、 protection, interrupt handling, windows, accounting, .structurelproblems with monolithic kernels: hard to understand hard to modify unreliable: a bug anywhere causes a system crash hard to maintainlsince the beginnings of os design, people have sought ways to organize the os to simplify its design

20、and construction.structuring traditional approach is layering: implement systemas a set of layers, where each layer is a virtual machineto the layer above.that is, each layer provides a “machine” that has higher level features.18hardwarelayer 0layer 1layer 2layer 3hardware arch. interfacelayer 0 “vi

21、rtual machine”interfacelayer 1 interfacelayering in thethe first description of this approach was dijkstras the system.19hardwarecpu scheduling (processes)memory managementconsole device (commands)i/o device bufferinguser programsthe systemlsystem was composed as a set of sequential processes.leach

22、peforms a sequential computation.lprocesses communicate through explicit synchronization statements.leach process could be tested and verified independently.leach level sees a logical machine provided by lower levels. level 2 sees virtual processors level 3 sees vm (really segments) level 4 sees a “

23、virtual console” level 5 sees “virtual” i/o driversproblems with layeringlsystems must be hierarchical, but real systems are more complex than that, e.g., file system would like to be a process layered on vm vm would like to use files for its backing store i/olapproach is not flexible.loften has poor performance due to layer crossings.lsystems are often

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论