东南大学操作系统课件(汪芸老师版)
操作系统(东南大学滕至阳ppt)chapter(8)

r2
r3
r4
局部时钟 R
图12-3 分布式系统中的事件顺序
第十二章
分布式操作系统
12.2.1 事件定序
◆给进程Pi中事件a的逻辑时钟值记为Ci(a) ◆进程Pi中的事件a先于进程Pj中的事件b
(用ab表示),当且仅当 Ci(a)<Cj(b) 或者 Ci(a)=Cj(b)且Pi<<Pj
◆若进程号i<进程号j,则Pi<<Pj。通常把
④为了释放该资源,Pi从自己的队列中撤消请求消息, 并发送一个打上时间戳的释放消息release给其他进程;
⑤当进程Pj收到Pi的release消息后,它撤消自己队列中
的原Pi的request(Ti , i)消息。
第十二章
分布式操作系统
12.3 资源管理
◆局部集中式管理 ◆分级式管理
◆分散式管理及其算法
安全与保密机制
13.2.2 强制访问控制
13.2.2.2 强制访问控制
◆在强制访问控制中,系统对主体与客体都分配一个
特殊的一般不能更改的安全属性,系统通过比较主体 与客体的安全属性来决定一个主体是否能够访问某个 客体
第十三章
安全与保密机制
13.3 信息流的格阵模型
13.3.1 格阵模型
◆格阵模型用来描述信息流的通道与流动策略 ◆信息流动策略 ◆信息状态 ◆状态转换与信息流 ◆格阵结构
11 E
图12-10 模块通信图
4 10 P1 8 3 2 4 6 B 12 D A 4 8 3 5 C 11 E 12 F 4 6 5 8 P2 2 5
图12-11 完全图
第十三章
安全与保密机制
13.1 概述
◆所谓“系统安全”包括三个方面:
操作系统教学配套课件汪荣斌操作系统第5章

5.1.5 使用MMC相关命令
MMC命令的语法格式如下: mmc path\filename.msc[/a][/64][/32]
5.2 用户账户管理
用户账户提供了个人用来登录本地计算机或 者域所使用的用户名和密码。同时,用户 账户还是为用户授权、应用登录脚本、分 配配置文件和主目录以及为用户配置其他 工作环境属性的一种方式。
5.4.2 组策略中的管理模板
5.4.3 组策略的应用实例
1.“桌面”设置 2.个性化“任务栏”和“开始”菜单 3.对IE进行设置 4.轻松实现Windows高级功能
5.5 小结
在本章里学习,您学习了Windows 系统的: 操作“管理控制台” 对用户账户管理 对用户组管理 组策略的创建与高级应用
第5章 用户账户和组的管理
主讲:汪荣斌
重庆电子工程职业学院.软件工程系
学习目标:
希望您能——
了解管理控制台程序的应用 掌握用户账户管理 掌握本地组的管理 掌握组策略的创建与使用
重庆电子工程职业学院.软件工程系
5.1 管理控制台(MMC)
Microsoft管理控制台(MMC)是用来创建、保 存和打开管理工具(控制台)集合的工具。 MMC不执行管理功能,但集成管理工具。添加 到控制台的主要工具类型称为管理单元,其他 可 添 加 的 项 目 包 括 ActiveX 控 件 、 指 向 Web 链 接、文件夹、任务板视图和任务。
① 在控制台窗口中,选择“文件”菜单下的“选项”菜单 项,打开“选项”对话框,如图5-6所示。
② 在“控制台模式”下拉列表框中选择适当的模式,然后 单击“确定”按钮即可。此处共有4种模式.
2024版操作系统课件汤子瀛本科操作系统5[1]
![2024版操作系统课件汤子瀛本科操作系统5[1]](https://img.taocdn.com/s3/m/b33ab5a3e109581b6bd97f19227916888486b996.png)
2024/1/29
26
设备分配与回收
设备分配策略
先来先服务、优先级高者先服务等。
设备分配数据结构
设备控制表、设备分配表等。
设备回收
当设备不再使用时,需要将其回收并更新相关数据结 构。
2024/1/29
27
设备驱动程序
设备驱动程序定义
控制和管理特定设备的软件程序。
设备驱动程序功能
提供与设备硬件交互的接口,实现设备初始化、数据传输、错误处 理等。
设备驱动程序结构
通常由设备无关层和设备相关层组成,提高了设备驱动的可移植性和 可维护性。
2024/1/29
28
设备独立性软件
设备独立性概念
应用程序独立于具体使用的物理设备。
设备独立性软件功能
将应用程序的I/O请求转换为具体的设备I/O 操作,提供了统一的设备接口。
2024/1/29
设备独立性实现
通过逻辑设备名、设备类驱动程序等实现设 备独立性。
设备分类
按传输速度、共享属性、连接方式等分类,如块设备、字符设备等。
25
I/O控制方式
程序直接控制方式
CPU直接控制I/O操作,简单但效率低。
中断驱动方式
CPU发出I/O请求后等待中断,提高了CPU利用率。
DMA方式
直接内存访问,减少了CPU的干预,提高了数据传输效率。
通道控制方式
通道控制器独立控制I/O操作,进一步减轻了CPU负担。
2024/1/29
覆盖与交换技术
覆盖技术是将程序分为多个段,常用的段常驻内存,不常用的段在需要时调入内存。交换技术是将内存中暂 时不能运行的进程或程序调出到外存上,以便腾出足够的内存空间给新的进程或程序使用。
操作系统东南大学滕至阳chapter3

fdwProtect)
LPVOID lpvAddress; // 该区虚地址
DWORD cbSize;
// 该区域的长度
DWORD fdwAllocationType; // 该区域被指定的类型
DWORD fdwProtect; // 该区域的访问保护即访问权限
第三章 存储管理
3.2 存储概念和虚存管理
置换“旧表目” (4)由B、w形成物理地址 (5)访问主存 (6)结束本次访问
第三章 存储管理
3.4.3.5 页面共享
主存
块号
附接的共享页
主存
进程甲的原有页
块5(共享例程第0页)
页号
块号
附接的共享页
进程乙的原有页
页表
图3-16 共享例程的页面
块7(共享例程第1页) 块9(共享例程第2页)
第三章 存储管理
基 址 /限 长 保 护 法 (左 )
上 下 界 保 护 法 (右 )
第三章 存储管理
3.4.2 可变分区 ◆根据进程空间的实际大小按需分配主存空间
◆这种管理方法下,主存分区的个数,各区域的
大小,在主存内活动的进程个数等都是随时间而 变化的。所以,可变分区又称为动态分区
图3-5
图3-6
PS5 PS4 PS3 PS2 PS1 主存需求量:50K 70K 30K 100K 60KFCFS 估计运行时间:15 8 20 5 10
存储管理
3.2 存储概念和虚存管理
◆链接工作的实质是按照各个程序段之间的 调用关系把各段的地址统一成从0开始的一维 线性地址。链接既可在作业运行之前,也可 在作业的程序段执行过程中依调用关系动态 地进行。前者称为静态链接,由link程序完 成;后者称为动态链接
计算机操作系统汤子瀛第3章

• 解:采用字位扩展的方法。需要32片SRAM芯片。
MREQ#
A22-2 R/W#
OE# A22-20 ramsel0
3-8 译码
ramsel1
ramsel2
A19-2
… ramsel7
CPU
D31~D0
WE A CE
WE A CE
WE A CE
256Kx8 4片
存储器芯片的控制信号
SRAM 芯片的控制信号: ADD 地址信号,在芯片手册中通常表示为 A0,A1,A2,…。 CS 芯片选择,低电平时表示该芯片被选中。 WE 写允许,低电平表示写操作,高电平表示读操作。 Dout 数据输出信号,在芯片手册中通常表示为 D0,D1,D2,…。 Din 数据输入信号。 OE 数据输出允许信号。
WE A CE
256K ×1
D
D0
WE A CE
256K ×1
D
D1
WE A CE
256K ×1
D
D2
A19-2
WE A CE
256K ×1
D
D31
例2 设有若干片256K×8位的SRAM芯片,问: (1) 采用字扩展方法构成2048KB的存储器需要多少片SRAM芯片? (2) 该存储器需要多少字节地址位? (3) 画出该存储器与CPU连接的结构图,设CPU的接口信号有地址信号、数据信号、控 制信号MREQ#和R/W#。 (4) 写出译码器逻辑表达式。
列地址译码 控
制
列地址
图 3-2 RAM 的阵列结构
动态存储单元
字选择
数据线
CT
CD
图 3-3 动态存储单元结构
操作系统东南大学滕至阳chapter(8)

操 作 系 统 原理
目录
第十二章 分布式操作系统
12.1 标识符系统 12.2 分布式进程互斥/同步 12.3 资源管理 12.4 死锁问题 13.5 任务分布
15
操 作 系 统 原理
目录
第十三章 安全与保密 机制
13.1 概述
13.5 运行域
13.2 访问控制 13.6 安全域
●并发(concurrence)性是指2个或2个以上的进程的执行在时 间上有重叠 ●共享(sharing)是指系统中的硬件和软件资源能为多个用户 共同使。通 常有互斥共享和同时共享2种方式
19
第一章 引 言
1.1 什么是操作系统
●虚拟(virtual)的本质含义是把物理上的一个变成逻辑上的多 个 ●不确定性(nondetermistic) ●可重构性(reconstruction) ◆操作系统与计算机硬件、应用软件的关系(图1-1)
输入输出
预定
9
操 作 系 统 原理
目录
第八章 并发程序设计
Hale Waihona Puke 8.1 并发程序概念 8.2 操作系统提供的支持 8.3 并发程序设计语言
10
操 作 系 统 原理
目录
第九章 操作系统设 计与实现
9.1 操作系统的设计目标 9.2 操作系统的设计方法 9.3 操作系统的实现
11
操 作 系 统 原理
目录
第十章 多处理机操 作系统
10.1 多处理机系统结构 10.2 多处理机操作系统的功 能与类型
10.3 多处理机调度 10.4 动态负载平衡
12
操 作 系 统 原理
目录
第十一章 网络操作系统
操作系统讲义
操作系统目录第一章引论赵英1.1操作系统的作用与功能1.2操作系统基础概念1.3操作系统的特性1.4操作系统的性能第二章进程管理陈春超、张莹、王羽中、许静2.1 进程的基本概念2.2 进程的状态及表示2.3 进程通讯基础2.4 经典的进程通讯问题2.5 中断和陷入2.6 进程调度第三章存储管理刘家根、毛敏、李建强、何晓燕、常虹3.1 存储管理和概述3.2 存储管理的早期技术3.3 虚拟存储的的基本思想3.4 页式虚拟组织3.5 页式虚拟组织存储虚拟管理算法3.6 段式虚拟存储器3.7 段式虚拟存储器第四章输入和输出李明、刘娜、杨玲玲4.1 概述4.2 终端4.3 时钟第五章文件系统基础林碧华、王琳、程晓5.1 概述5.2 文件5.3 目录5.4 文件系统实现5.5 文件系统的可靠性及性能1操作系统第一章引论1.1 操作系统的作用和功能首先,让我们对操作系统的作用和功能有一个基本的了解,操作系统作为计算机系统中最重要的系统软件,它的作用可以从两个角度来观察,从用户的角度来说,操作系统是对用户所提供的使用计算机的界面 (Interface),也就是我们将要讨论的虚拟机的概念。
而从机器的角度来说,操作系统又是对计算机各种系统资源的管理者,负责对各种硬件和软件资源进行分配。
所以,了解一下操作系统的基本作用和功能对于全面理解操作系是十分重要的。
1.1.1 从虚拟机角度观察 OS大家知道,用户直接使用裸机是非常不方便的,例如,用户对裸机进行输入、输出操作时,必须直接对硬件进行繁琐的程序设计,这对多数用户而言是难以胜任的。
而操作系统的主要任务就是将这些复杂的硬件操作与用户隔离开来,代替用户对计算机硬件进行控制,如磁盘读写、中断响应、内存管理等。
从用户的角度来看,他们所直接面对的不再是令人头疼的硬件,而是使用起来方便的多的操作系统了,这就是我们所说的虚拟机 (Virtual Machine)。
1.1.2 从资源管理者角度观察 OS购置计算机的用户最关心的莫过于系统性能与价格是否相称,能否高效地工作,能否给他们带来一定的经济效益,而在这时操作系统的任务就是合理而有效地管理好系统中所有的软、硬件资源,按照需要和一定规则对它们进行分配、控制和回收,以便经济而高效地向用户提供各种性能优良的服务。
东南大学操作系统课件(汪芸老师版)
Chapter 7: DeadlocksgAgenda•The Deadlock ProblemSystem Model•System Model•Deadlock Characterization •Methods for Handling Deadlocks( Prevention, Avoidance, Detection and (Prevention Avoidance Detection and Recovery )The Deadlock Problem•A set of blocked processes each holding a resource and waiting to acquire a resourceg qheld by another process in the set. Example•Example–System has 2 disk drives.–P1and P2each hold one disk drive and eachneeds another one.Bridge Crossing Exampleg g pThe Deadlock Problem •Examplep,–semaphores A and B, initialized to 1P0P1wait (A);wait(A);wait(B)wait (B);wait(A)gAgenda•The Deadlock ProblemSystem Model•System Model•Deadlock Characterization •Methods for Handling Deadlocks( Prevention, Avoidance, Detection and (Prevention Avoidance Detection and Recovery )ySystem Model•Resource types R 1, R2, . . ., R mCPU cycles, memory space, I/O devices •Each resource type R i has W i instances.•Each process utilizes a resource asEach process utilizes a resource asfollows:–request–use–releaseDeadlock CharacterizationDeadlock can arise if four conditions holdsimultaneously.•Mutual exclusion:only one process at a time can use a resource.•Hold and wait: a process holding at least one resource is waiting to acquire additional resources held by other processes.h ld b hDeadlock CharacterizationNo preemption:a resource can be released •No preemption: a resource can be released only voluntarily by the process holding it, after that process has completed its task that process has completed its task.•Circular wait:there exists a set {P 0, P 1, …, P 0} of waiting processes such that 0is waiting for a of waiting processes such that P 0 is waiting for a resource that is held by P 1, P 1is waiting for a resource that is held by P , …, P is waiting for y 2,,n –1g a resource that is held by P n , and P 0is waiting for a resource that is held by P 0.Resource-Allocation Graph pA set of vertices V and a set of edges E .•V is partitioned into two types:={}the set consisting of all –P = {P 1, P 2, …, P n }, the set consisting of all the processes in the system.–R = {R 1, R 2, …, R m }, the set consisting of all resource types in the system resource types in the system.Resource-Allocation Graphp•request edge –directed edge P1 →R j •assignment edge –directed edge R j→P iResource-Allocation Graph(Cont.)(Cont)•ProcessResource Type with 4 instances•P requests instance of R P i R ji j•P i is holding an instance of R j P i R j is holding an instance ofExamplepResource Allocation Graph With A DeadlockA DeadlockGraph With A Cycle But No DeadlockN D dl kComments•If graph contains no cycles ⇒nodeadlock.g p y•If graph contains a cycle ⇒if only one instance per resource type,then deadlock.then deadlockif several instances per resource type,possibility of deadlockpossibility of deadlock.gAgenda•The Deadlock ProblemSystem Model•System Model•Deadlock Characterization •Methods for Handling Deadlocks( Prevention, Avoidance, Detection and (Prevention Avoidance Detection and Recovery )Methods for HandlingDeadlocks•Ensure that the system will never enter a E th t th t ill t deadlock state.•Allow the system to enter a deadlock state and then recover.state and then recover•Ignore the problem and pretend that deadlocks never occur in the system;y p g y,used by most operating systems, including UNIX.Tolerance & RecoveryDetectionPrevention & AvoidanceDeadlock Prevention•Mutual Exclusion–not required for sharable resources; must hold forh bl t h ld f nonsharable resources.Deadlock Prevention•Hold and Wait–must guarantee that whenever a process requests a resource, whenever a process requests a resource it does not hold any other resources.–Low resource utilization; starvation possible.Deadlock Prevention•No Preemption–y–Process will be restarted only when it canregain its old resources, as well as the new ones that it is requesting.q gDeadlock Prevention•Circular Wait–impose a total ordering of all resource types, and require that eachll t d i th t h process requests resources in an increasing order of enumeration.Deadlock AvoidanceRequires that the system has some additionala priori information available.•Each process declare the maximum number ofresources of each type that it may need. resources of each type that it may need •Dynamically examines the resource-allocationstate to ensure that there can never be a state to ens re that there can ne er be a circular-wait condition.Deadlock Avoidance•Resource-allocation state is defined by the number of available and allocated resources, and the maximum demands of resources,and the maximum demands of the processes.Safe State•System is in safe state if there exists a q1,2,,nsequence <P, P, …, P> of ALL the processes is the systems such that for each P i, the resources that P i requests each P the resources that P i requests can be satisfied by currently available resources + resources held by all the P j, resources+resources held by all the with j < i.Safe State Safe State–If Pi resource needs are not immediatelyavailable, then Pi can wait until all Pjhavef inished.–When P is finished, Pi can obtain neededjresources, execute, return allocated resources, and terminate.–When Pi terminates, Pi +1can obtain itsneeded resources, and so on.,Comments•If a system is in safe state ⇒noIf t i i f t tdeadlocks.•If a system is in unsafe state ⇒possibility of deadlock.•Avoidance ⇒ensure that a system will A id th t t ill never enter an unsafe state.Safe, Unsafe , Deadlock State Deadlock StateAvoidance algorithmsg•Single instance of a resource type. Use a resource-allocation graphUse a resource allocation graph•Multiple instances of a resource type. Use the banker’s algorithmResource-Allocation GraphpUnsafe State Unsafe StateResource-Allocation GraphAlgorithm•Suppose that process P i requests a resource R jThe request can be granted only if •The request can be granted only if converting the request edge to an assignment edge does not result in the assignment edge does not result in the formation of a cycle in the resourcell ti hallocation graphgBanker’s Algorithm•Multiple instances.M ltiple instancesp p•Each process must a priori claimmaximum use.•When a process requests a resource it When a process requests a resource itmay have to wait.•When a process gets all its resources itmust return them in a finite amount of must return them in a finite amount oftime.Data StructuresData StructuresLet n= number of processes, and m = number of resources types. •Available:Vector of length m. If available [j]yp j = k, there are k instances of resource type Ravailable.•Max: n x m matrix. If Max [i,j] = k, then:n x m matrix If Max i j]=then process P i may request at most k instancesf tof resource type R j.Data Structures•Allocation: n x m matrix. If Allocation[i,j] = k then P i is currently allocated kth i tl ll t d instances of R j.j•Need: n x m matrix. If Need[i,j] =k, then P i may need k more instances of R j tomay need more instances of to complete its task.i j]i j]i j]Need[i,j]= Max[i,j] –Allocation[i,j].Safety Algorithmy g1.Let Work and Finish be vectors ofg,p ylength m and n, respectively. Initialize: Work = AvailableFinish [i] =false for i= 0, 1, …, n-1.2.Find any i such that both:(a) Finish i] = false()[]≤Work(b) NeediIf no such i exists,go to step4.If no such i exists, go to step 4.y gSafety Algorithm3.Work= Work + Allocation iFinish[i] =true]=go to step 2.4.If Finish[i] == true for all i, then the 4If Fi i h]t f ll th th system is in a safe state.for Process Pfor Processi1.If Request i≤Need i go to step2.,, Otherwise, raise error condition, since process has exceeded its maximumclaim.2.If Request i≤Available, go to step3.Otherwise P i must wait, sinceOtherwise must wait sinceresources are not available.for Processfor Process Pi3.Pretend to allocate requested resources to Pi by modifying the state as follows:Available= Available –Request;Allocation= Allocation+ Request;i i iNeedi =Needi–Requesti;z If safe the resources are allocated to Pi.⇒z If unsafe ⇒Pi must wait, and the old resource-allocation state is restoredExamplep• 5 processes P0 through P4;3resource types:3 resource types:A(10 instances),B(5instances),C(7 instances).Examplep:S h t t ti•Snapshot at time TAllocation Max AvailableA B C A B C A B C0 1 07 5 3 3 3 2P0107533322 0 03 2 2P13 0 2 9 0 2P30290222 1 1 2 2 2P3P0 0 2 4 3 34Examplep•The content of the matrix Need is defined to be Th t t f th t i N d i d fi d t b Max–Allocation.NeedA B CP7 4 31 2 2122P16 0 0P2P0 1 13P 4 3 14ExampleThe system is in a safe state since the •The system is in a safe state since the sequence < P1, P3, P4, P2, P0> satisfies safety criteria.safety criteriaExample: P Request (1,0,2)p1q()•Check that Request ≤Available (that is, (1,0,2) Check that Request Available(that is(102)≤(3,3,2) ⇒true.Allocation Need AvailableAll ti N d A il blA B C A B C A B CP0 1 0 7 4 3 2 3 03 0 20 2 0P30202013 0 1 6 0 0P22 1 1 0 1 1211011P30 0 2 4 3 1P4Example: P Request (1,0,2)p1q()•Executing safety algorithm shows thatE ti f t l ith h th tsequence < P, P, P, P, P> satisfies13402safety requirement.•Can request for (3,3,0) by P4be granted?Can request for(330)by be granted?•Can request for (0,2,0) by P0be granted?Deadlock Detection•Allow system to enter deadlock state •Detection algorithm•Recovery schemeSingle Instance ofEach Resource TypeEach Resource Type•Maintain wait-for graphNodes are processes–Nodes are processes.–P→P j if P i is waiting for P j.iy g •Periodically invoke an algorithm that searches for a cycle in the graph. If there is a cycle there exists a deadlockis a cycle, there exists a deadlock.Single Instance ofEach Resource TypeE h R T•An algorithm to detect a cycle in a graph requires an order of n2operations,e e s t e u be o e t ces t e where n is the number of vertices in the graph.Resource-Allocation Graphand Wait-for Graphd W it f G hResource-Allocation Graph Corresponding wait-for graph。
会计软件应用课件(东南大学)005-006
37
2)调整余额方向
在录入会计科目余额时,系统提供 了调整余额方向的功能,即在还未录 入会计科目余额时如果发现会计科目 的余额方向与系统设置的方向不一致 时可以将其方向调整。
注意:
总账科目与其下级明细科目的余额方向必须 一致。 余额的方向应以科目属性或类型为准,不以 当前余额方向为准。
38
39
第3章 总账管理 1.系统概述
2.总账管理系统初始设置 3.实验二 初始设置 4.总账管理系统日常业务处理 5.实验三 日常业务处理 6.总账管理系统期末处理 7.实验四 期末处理
40
5
②计算机处理步骤
审核 记账凭证 原始凭证 录入凭证 记账 转账凭证 期末业务处理 银行对账数据 科目汇总 输出 辅助核算数据 报表子系统 账簿
开户行对账单
银行对账单
银行对账
余额调节表
6
3)总账管理与其他系统的主要关系
成本管理 工资管理 记账凭证 记账凭证 记账凭证 总账管理 应收应付 记账凭证 决策支持 记账凭证 资金管理 记账凭证 余额表 会计报表 其他费用 账证 财务分析 固定资产
19
3.2 设置基础数据(建立会计科目— —增加明细科目)
1
2 3
4
5
20
注意:
增加明细科目时,系统默认其类型与上级 科目保持一致。
已经使用过的末级会计科目不能再增加下 级科目。
非末级会计科目不能再修改科目编码。
21
3.3 设置基础数据(建立会计科目— —修改会计科目)
1
3
2 4
如果要 对已经设置 完成的会计 科目的名称、 编码及辅助 项目等内容 进行修改, 应在会计科 目未使用之 前在会计科 目的修改功 能中完成。 22
操作系统东南大学滕至阳chapter3
第三章 存储管理
3.4.3.5 页面共享
主存
块号
附接的共享页
主存
进程甲的原有页
块5(共享例程第0页)
页号
块号
附接的共享页
进程乙的原有页
页表
图3-16 共享例程的页面
块7(共享例程第1页) 块9(共享例程第2页)
第三章 存储管理
第三章 存储管理
3.4.3 页式管理
◆把进程空间划分成较小的片段(称为页面),把主存
也划分成较小的片段(称为块),使页长等于块长, 恰好1页能占用主存的1块 (图3-10)
3.4.3.1 数据结构 ◆ 图3-11 ◆ 图3-12
块
0
页
1
0
2
1
3
2
4
进程空间分页
5
6
7
主存分块
图3-10 页式管理示意图
Windows系统DLL 3GB
共享对象
非系统DLL 2GB
私用地址
空间
未用
4MB
16KB
不可寻址
0
第三章 存储管理
3.2 存储概念和虚存管理 ◆ Windows API控制进程的虚拟地址空间
◆ (1)私用堆 用户使用HeapCreate()来产生私用堆空间
HANDLE HeapCreate(flOptions, dwInitialSize, dwMaximumSize)
存器组,称之为“快表”,用它存放现行进程页 表 中最近常用的部分表目
◆图3-15
pw 页号
页号 块号 ┇┇
Bw 块号
图3-15 快表的使用
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
Chapter 12: Mass-Storage SystemsgAgenda•Disk StructureDisk Attachment•Disk Attachment•Disk Scheduling•Disk Management •RAID StructureRAID Structure •Tertiary Storage DevicesgAgenda•Disk StructureDisk Attachment•Disk Attachment•Disk Scheduling•Disk Management •RAID StructureRAID Structure •Tertiary Storage DevicesTypesyp•Magnetic disks Magnetic tapes •Magnetic tapesgMoving-head Disk MachanismgAgenda•Disk StructureDisk Attachment•Disk Attachment•Disk Scheduling•Disk Management •RAID StructureRAID Structure •Tertiary Storage DevicesDisk Attachment•Host-attached storage accessed through p gI/O ports talking to I/O busses•SCSI itself is a bus, up to 16 devices on one cableone cableNetwork-Attached Storage(NAS)g()RPCStorage Area Network(SAN) g()InfiniBandgAgenda•Disk StructureDisk Attachment•Disk Attachment•Disk Scheduling•Disk Management •RAID StructureRAID Structure •Tertiary Storage DevicesEvaluation CriteriaAccess time and disk bandwidth •Access time and disk bandwidth •Access time has two major components –Seek time: for a disk to move the head to thecylinder containing the desired sectory g–Rotational latency:the additional time waiting for a disk to rotate the desired sector to thefor a disk to rotate the desired sector to thedisk headMinimize seek time•Minimize seek time•Seek time ≈seek distance•Disk bandwidth: the total number of bytes,ytransferred, divided by the total time between the first request for service and the completion of the last transfer.the completion of the last transferFCFS(First-come-first-serve)()SSTF(Shortest-seek-time-first)•Basic idesSelects the request with the minimum --Selects the request with the minimum seek time from the current head position.•May cause starvation of some requests. M t ti f tSCAN•Basic ideaThe disk arm starts at one end of the--The disk arm starts at one end of the disk, and moves toward the other end, servicing requests until it gets to the other servicing requests until it gets to the other end of the disk, where the head movement is reversed and servicing continues.SCAN()C-SCAN(Circular SCAN)•Basic ideaOne way servicing--One way servicing•Provides a more uniform wait time than SCAN.SCANC-SCANC-LOOK•Basic ideaB i idArm only goes as far as the last--Arm only goes as far as the last request in each direction, then reverses direction immediately, without first direction immediately without first going all the way to the end of the disk.C-LOOKy g gSummary for Scheduling Algorithms•SSTF is common and has a natural appeal SSTF is common and has a natural appealp•SCAN and C-SCAN perform better forsystems that place a heavy load on thedisk.disk•Performance depends on the number and types of requests.t f tq•Requests for disk service can beinfluenced by the file-allocation method.gAgenda•Disk StructureDisk Attachment•Disk Attachment•Disk Scheduling•Disk Management •RAID StructureRAID Structure •Tertiary Storage DevicesDisk Managementg•Formatting and partitioning Boot blocks•Boot blocks•Bad blocks•Swap-space managementBooting from a Disk in Windows 2000Windows2000gAgenda•Disk StructureDisk Attachment•Disk Attachment•Disk Scheduling•Disk Management •RAID StructureRAID Structure •Tertiary Storage DevicesRAID Structure•RAID–redundant arrays of inexpensive/ pindependent disks•Multiple disk drives provides reliability via redundancy•RAID is arranged into six different levels.RAID LevelsgAgenda•Disk StructureDisk Attachment•Disk Attachment•Disk Scheduling•Disk Management •RAID StructureRAID Structure •Tertiary Storage Devicesy gTertiary Storage Devices•Low cost is the defining characteristic of Lo cost is the defining characteristic oftertiary storage•Generally, tertiary storage is built usingremovable mediaremovable media•Common examples of removable mediaare floppy disks and CD-ROMs; other fl di k d CD ROM thtypes, such as holographic disks andMEMOs are available.Operating System Issuesp g y•To manage physical devices and to present T h i l d i d t t a virtual machine abstraction to applications •For hard disks, the OS provides two abstraction:–Raw device –an array of data blocks.–File system –the OS queues and schedules the interleaved requests from several applications.Some issues•File naming •Performance •CostPrice per Megabyte of DRAM, From 1981 to 2004Price per Megabyte of Magnetic Hard Disk, From 1981 to 2004Price per Megabyte of a Tape Drive,From 1984-2000From1984-2000End of Chapter 12。