ImageVerifierCode 换一换
格式:DOCX , 页数:24 ,大小:430.60KB ,
资源ID:23893153      下载积分:3 金币
快捷下载
登录下载
邮箱/手机:
温馨提示:
快捷下载时,用户名和密码都是您填写的邮箱或者手机号,方便查询和重复下载(系统自动生成)。 如填写123,账号就是123,密码也是123。
特别说明:
请自助下载,系统不会自动发送文件的哦; 如果您已付费,想二次下载,请登录后访问:我的下载记录
支付方式: 支付宝    微信支付   
验证码:   换一换

加入VIP,免费下载
 

温馨提示:由于个人手机设置不同,如果发现不能下载,请复制以下地址【https://www.bdocx.com/down/23893153.html】到电脑端继续下载(重复下载不扣费)。

已注册用户请登录:
账号:
密码:
验证码:   换一换
  忘记密码?
三方登录: 微信登录   QQ登录  

下载须知

1: 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。
2: 试题试卷类文档,如果标题没有明确说明有答案则都视为没有答案,请知晓。
3: 文件的所有权益归上传用户所有。
4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
5. 本站仅提供交流平台,并不能对任何下载内容负责。
6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

版权提示 | 免责声明

本文(操作系统考前抱佛脚知识点整理.docx)为本站会员(b****8)主动上传,冰豆网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知冰豆网(发送邮件至service@bdocx.com或直接QQ联系客服),我们立即给予删除!

操作系统考前抱佛脚知识点整理.docx

1、操作系统考前抱佛脚知识点整理Chapter1 Introduction1.What is OS?It is an extended machine It is a resource manager 2.OS Conceptsprocessesaddress Spaces & Filesprotection & Shell3.System CallsSystem calls provide the interface between a running program and the operating system.(1)ProcessUNIX examples fork system cal

2、l creates new process.execve system call used after a fork to replace the process memory space with a new program.waitpid system call used to move the parent process off the ready queue until the termination of the child.exit system call is used when a process is finished executing.例1:例2:/* fork pro

3、cesses */main() int i, pid; for (i=1; i0表示有S.count个资源可用 S.count=0表示无资源可用 S.count0则|S.count|表示S等待队列中的进程个数 P(S):表示申请一个资源 V(S):表示释放一个资源。信号量的初值应该大于等于02) P,V操作必须成对出现,有一个P操作就一定有一个V操作当为互斥操作时,它们同处于同一进程; 当为同步操作时,则不在同一进程中出现。如果P(S1)和P(S2)两个操作在一起,那么P操作的顺序至关重要,一个同步P操作与一个互斥P操作在一起时同步P操作在互斥P操作前;而两个V操作的顺序无关紧要。Monito

4、rs管程, why use monitor?wait操作必须在signal之前,否则该信号会永远丢失Message passingUsing semaphore to solve Classical IPC problemsvDining-Philosophers ProblemvReaders and Writers Problem10.Process SchedulingScheduling opportunity (when to schedule)vA new process is createdvThe running process exitsvThe running proces

5、s is blocked vI/O interrupt (some processes will be ready)vClock interrupt (every 10 milliseconds)Scheduling algorithmvBatch systems 批处理First-Come First-Served (FCFS)Short Job First (SJF) 短作业优先只有在所有的作业都可以同时运行的情形下,SJF才是最优化的vInteractive systemRound Robin (RR) 轮转调度Priority SchedulingMulti Queue & Multi

6、-level Feedback多级队列Chapter6 Deadlock1.Resource TypePreemptable ResourcesNon-preemptable Resources2.Deadlock DefinitionA set of processes is deadlocked if each process in the set is waiting for an event that only another process in the set can cause.3.Four Conditions for Deadlock(资源死锁的4个条件)Mutual exc

7、lusion conditionHold and wait condition 占有和等待No preemption condition 不可占有Circular wait condition 环路等待4.Deadlock ModelingResource Allocation Graph是进程是资源资源到进程已占用进程到资源已阻塞vIf graph contains no cycles no deadlock.vIf graph contains a cycle if only one instance per resource type, then deadlock.if several

8、instances per resource type, possibility of deadlock.5.Methods for Handling DeadlocksThe Ostrich AlgorithmPretend假装there is no problem DetectionvOne resource of each type: resource allocation graph algorithmv Multiple resources of each type: matrix-based algorithm算法:Ri212 所以偏移量为12位(Offset) 所以页号为(32-

9、12)=20位被分为10bits PT1域、10bits PT2域vInverted page tables每个页框(物理内存)有一个页表项,而不是每一个虚拟页面Address Translation SchemePage Fault 缺页中断程序访问了一个未映射的页面vPage Replacement Algorithm (Second Chance是对FIFO的改进,Clock是对Second Chance的另一种实现,Aging近似于LRU并且更有效的实现,最好的两种算法是Aging、WSClock)vOptimal(实际不能用)vFIFOvSecond ChancevClockvNRU

10、 最近未使用(R访问定期清零、M修改,一共分四种情况)vLRU 最近最少使用(访问页框k时,把行置为1,列置为0,行的和最小的就是最近最少使用的)vNFU 最不常使用vAging (位数有限)vWorking Set (开销大)t秒实际运行时间中所访问的页面集合(其中,生存时间=当前实际时间-上次时间)若(R=1)设置上次使用时间为当前实际时间若(R=0且生存时间t)移出这个页面若(R=0且生存时间=t)记住最小时间vWSClock工作集时钟算法5.Design Issues for Paging SystemsReplacement Scope (全局置换通常比局部置换好)vLocal Re

11、placement 局部置换vGlobal Replacement 全局置换Page Size太大:最后一页平均一般是空的页面大internal fragmentation内部碎片 大,使更多没有用的程序保留在内存中太小:需要更多页面页表,装入页面寄存器花费的时间越长s/p是每个进程大约需要的页数Separate Instruction and Data SpacesShared Pages6.Segmentation分段: Address Translation Allows each table to grow or shrink, independently7.Segmentation

12、with paging: Address TranslationChapter4 File System1.File and File SystemFile: A named collection of related information that is recorded on secondary storage.File System: A method for storing and organizing files and the data they contain to make it easy to find and access them.2.Basic Functions o

13、f File SystemPresent logical (abstract) view of files and directoriesHide complexity of hardware devicesFacilitate efficient use of storage devicesOptimize access, e.g., to diskSupport sharingProvide protection3.Files TypesRegular file 普通文件(ASCII, Binary) and Directory 目录文件Character and Block specia

14、l file (UNIX) 字符特殊文件和块特殊文件4.File StructurevThree kinds of filesbyte sequence 字节序列(最大灵活性)record sequence 记录序列(固定长度)tree (Records not necessarily the same length ,Records contain keys ,Tree sorted on key)5.File Access: Sequential and Random access6.Directory StructureOne-level directory systemhas one

15、directory (root) containing all the filesTwo-level directory systemhas a root directory and user directories.Hierarchical directory system 层次目录系统has a root directory and arbitrary number of subdirectories.7.Path Name: Absolute and Relative path name (路径名第一个字符是分隔符,则这个路径就是绝对路径)8.File ImplementationContiguous Allocation 连续分配vAdvantagesSimple to implement (Need only starting sector & length of file)Read performance is excellent 读操作性能好(suits for sequential access and direct access)vDisadvantagesDisk fragmentation 磁盘碎片The m

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1