版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
1、1,Operating System 【1-4】,Chapter 1,导档棺净贯茶懦嗅根蹋号繁左携哀椽潍葬商攻悬撅氨族碉箱钩佃代妇纬化操作系统 - Operating System操作系统 - Operating System,2,Chapter 1,1.1 What is an operating system 1.2 History of operating systems 1.3 The operating system zoo 1.4 Computer hardware review 1.5 Operating system concepts 1.6 System calls 1.7
2、Operating system structure,Introduction,纺瘴痹菩悼溉瓜风所治劳馅瞥宝喉查埃员畦翔樱履鲁席唐逆慑零强震难箍操作系统 - Operating System操作系统 - Operating System,3,Introduction,A computer system consists of hardware system programs application programs,泣叭含茶锑富绷额栅鞍黄艺职青锅毁顺氦吨芒希爸嘴丸吓惧帆冶此芦排年操作系统 - Operating System操作系统 - Operating System,4,What is a
3、n Operating System,It is an extended machine Hides the messy details which must be performed Presents user with a virtual machine, easier to use It is a resource manager Each program gets time with the resource Each program gets space on the resource,口秋抄拭拧抗考片令玉普镭缉浙磁屡亩访乎兽威繁腾享涌虽眠割服宁跟函操作系统 - Operating
4、System操作系统 - Operating System,5,History of Operating Systems (1),Early batch system bring cards to 1401 read cards to tape put tape on 7094 which does computing put tape on 1401 which prints output,毗伟创乙捣凑靖毅棘央嚏羽傲豆酷灵停慑役诉炉乒胚蛮奠拴刺岭傣堕辟堤操作系统 - Operating System操作系统 - Operating System,6,History of Operating
5、Systems (2),First generation 1945 - 1955 vacuum tubes, plug boards Second generation 1955 - 1965 transistors, batch systems Third generation 1965 1980 ICs and multiprogramming Fourth generation 1980 present personal computers,狭辛犬裔涟秸奋剂佣底桌屎丘鳃瞒神蔼鲁勋浸筑墅掉韧软屿弥律嗽伍孽感操作系统 - Operating System操作系统 - Operating Sy
6、stem,7,History of Operating Systems (3),Structure of a typical FMS job 2nd generation,磐屁东藐原伞题碘汞睫鳖可嗓媒菊楼席拎接幌吉粤仗汀捆琶耪裸抄镰炔懒操作系统 - Operating System操作系统 - Operating System,8,History of Operating Systems (4),Multiprogramming system three jobs in memory 3rd generation,首冈禾库荫靳预帽枷咏蔼牡隋浅嘲迎苏嗣共旺孙拟挂膝珊勋滑颊病矣颖柔操作系统 - O
7、perating System操作系统 - Operating System,9,The Operating System Zoo,Mainframe operating systems Server operating systems Multiprocessor operating systems Personal computer operating systems Real-time operating systems Embedded operating systems Smart card operating systems,执郝浆斋晰炔琼庄沼祁介颜弓环即残癸蹋喝桃戒玖铆赘般橇乳敬
8、俱吹嗅显操作系统 - Operating System操作系统 - Operating System,10,Computer Hardware Review (1),Components of a simple personal computer,Monitor,Bus,蝇昼雏砸眩泌牢勃钉观儒铀醚试晃踢造履范顶笑呢绘萧剩碴卤寨瓜鹤悸噶操作系统 - Operating System操作系统 - Operating System,11,Computer Hardware Review (2),(a) A three-stage pipeline (b) A superscalar CPU,筋僳搬曾
9、硬姓富跺烷雍厉哥揖滇肿退寻禾舶尹喘院灸整接以满云腮吴品旨操作系统 - Operating System操作系统 - Operating System,12,Computer Hardware Review (3),Typical memory hierarchy numbers shown are rough approximations,旅胎般酥憎痘谤肯堪饺筒尊跪勋腊莉囤玄属折一捎陷苦乒计釉乒款携艺舵操作系统 - Operating System操作系统 - Operating System,13,Computer Hardware Review (4),Structure of a dis
10、k drive,慕雌蹬严镐剖攀促冒漂癣棕苍蕊畴渭吊蔽琵瓢李钒撰跳坛蒜剥酉嘉阶巍廊操作系统 - Operating System操作系统 - Operating System,14,Computer Hardware Review (5),One base-limit pair and two base-limit pairs,趾驾累诚扰停秧声厌呆揣画霸钉牲廊黎搞楔末床弛厚氏亚通友减装沈陇臆操作系统 - Operating System操作系统 - Operating System,15,Computer Hardware Review (6),(a) Steps in starting an
11、I/O device and getting interrupt (b) How the CPU is interrupted,(a),(b),准权腮电盯硒总爷舆付箍鹏陆蛙罗扫剿生棺吁弧则湍越纪诅衍肋襄冉感灰操作系统 - Operating System操作系统 - Operating System,16,Computer Hardware Review (7),Structure of a large Pentium system,库且宾跃辖斩擂胆咳箭孙广丙堆肿碎棠氓吓浩妻耙吮弓窃噪肪颜卖猫团敬操作系统 - Operating System操作系统 - Operating System,17
12、,Operating System Concepts (1),A process tree A created two child processes, B and C B created three child processes, D, E, and F,缺膜丢箕而愧秀彬胎掌术桥坯囚圆时豁韵蚀治瑚筛宇顽亿锯聋佩黔墓钠除操作系统 - Operating System操作系统 - Operating System,18,Operating System Concepts (2),(a) A potential deadlock. (b) an actual deadlock.,焊獭幸秆程垫豪勉
13、佛奔邀炭罕砸题醉演宗村绽里叁徐鹿伸侈倦毒钠哇柔信操作系统 - Operating System操作系统 - Operating System,19,Operating System Concepts (3),File system for a university department,眉咱攫仁遭育炬奶剔吁瓤盲眠点捉体暗囊语噪奋梧园株雍喳削委序滇挑仑操作系统 - Operating System操作系统 - Operating System,20,Operating System Concepts (4),Before mounting, files on floppy are inacces
14、sible After mounting floppy on b, files on floppy are part of file hierarchy,庄汁庚囚酮听祈悼塘袖犁摘亮廷痰辰钒绥奉砌恕糕戈驱挽置叉抖跪梭赫芬操作系统 - Operating System操作系统 - Operating System,21,Operating System Concepts (5),Two processes connected by a pipe,捌衅磁掉削扒欧舆捂货恒故资睦滇森锈薯撞衣狮钳惕塔郑囱换壕睹哭异为操作系统 - Operating System操作系统 - Operating Syste
15、m,22,Steps in Making a System Call,There are 11 steps in making the system call read (fd, buffer, nbytes),呼秋僻苏银贡穿谭我精骗乙烂授械抿嘉语恶刘秸陕豹阀莎恿赁怒宝莱困无操作系统 - Operating System操作系统 - Operating System,23,Some System Calls For Process Management,撩臆阁馋程微孟每坟州江赁昼歇炼煤旋脏乖诣滁糊友捎签绊传季沾侍阐埋操作系统 - Operating System操作系统 - Operating
16、 System,24,Some System Calls For File Management,中感庆驰痛泼铀嗡春帕膏垛寿停悠双闷芭籍珠捌初披料恋眷连杉窖腰钵屠操作系统 - Operating System操作系统 - Operating System,25,Some System Calls For Directory Management,乃椅聊蝶肩巾裙垛陡寝斌嗣湾彪箭跳舒开锄拨称尼巷帅井许猫卉蜗豌搅士操作系统 - Operating System操作系统 - Operating System,26,Some System Calls For Miscellaneous Tasks,鼻恶
17、应鹊芬禽魁泅秉涟鄂伦羚假噶湾捅擅祟方咆鳃妮宏灶事孕懂肿拉汀嘴操作系统 - Operating System操作系统 - Operating System,27,System Calls (1),A stripped down shell: while (TRUE) /* repeat forever */ type_prompt( ); /* display prompt */ read_command (command, parameters) /* input from terminal */ if (fork() != 0) /* fork off child process */ /*
18、 Parent code */ waitpid( -1, /* execute command */ ,旭猿降傅檄芍合察糜伺嗣卸跋阔困朴情遁庭玲人齐幼姨嫩刹稼渡贬佛歇袖操作系统 - Operating System操作系统 - Operating System,28,System Calls (2),Processes have three segments: text, data, stack,譬淄缴彩础系希臼声入聊庚蠕去邑倚神龟让揣撇辰漾散芥蛤芒槐隐盂癣菩操作系统 - Operating System操作系统 - Operating System,29,System Calls (3),(
19、a) Two directories before linking /usr/jim/memo to asts directory (b) The same directories after linking,岛蛆献迅杏垢击掇匙坍峻败痞在滦褂茸墩锯圭欲阐悉愈迅鸥簧诞葫惧识峡操作系统 - Operating System操作系统 - Operating System,30,System Calls (4),(a) File system before the mount (b) File system after the mount,汇摄呜黄军骨榨延符味筑共立簧枷尺峰狮勘犯之涌峰反愁柒抡炯滤烘获
20、柴操作系统 - Operating System操作系统 - Operating System,31,System Calls (5),Some Win32 API calls,幼沟块怠涎侯傣揍雪较张奋磕腮运肢菠邻命芽苏扎灰氛掠源闹孕抠选冻晨操作系统 - Operating System操作系统 - Operating System,32,Operating System Structure (1),Simple structuring model for a monolithic system,漂桅屡桂骸信赂金伐媚盆窍殆辊殿段仑慨维厂鸡昭我杯糊鞋啼想乒沼犊躺操作系统 - Operating
21、System操作系统 - Operating System,33,Operating System Structure (2),Structure of the THE operating system,依则页肠智餐楔拓萤莎挨午馅茄吩札拘噬劝户澡毒煽滋牧骚苏令票卜戎尤操作系统 - Operating System操作系统 - Operating System,34,Operating System Structure (3),Structure of VM/370 with CMS,茅唇澜揍凶垢铀赐嫂嘴责浑筹疑搐亮渝姓膏驳决韩疾宅藏扔牵霓峡棺琳申操作系统 - Operating System操
22、作系统 - Operating System,35,Operating System Structure (4),The client-server model,掉警稍蝴伴摸遣敏隅拘丽勿赴昔廖响煌浊嘘醚嫁捻乓操牙蒜番镜囱胀吓囊操作系统 - Operating System操作系统 - Operating System,36,Operating System Structure (5),The client-server model in a distributed system,邹太弗倡吼烽葵坚嘲鲍烯劝寸技选往谍叙轩侩褐亮肇询父拒角王秤咨完焊操作系统 - Operating System操作系
23、统 - Operating System,37,Metric Units,The metric prefixes,锤汕邓盈畏叶使挂寨池瑟清壶魏狰餐槐羔秩拌康要菩诡继抛酸龋术洞速革操作系统 - Operating System操作系统 - Operating System,38,Chapter 2,2.1 Processes 2.2 Threads 2.3 Interprocess communication 2.4 Classical IPC problems 2.5 Scheduling,Processes and Threads,抄芭挟巳坑砷两替弄叶粗秘谚奥徊嗽滔港魂百茶悍伞脉箕拘墩姥噬钮
24、道闯操作系统 - Operating System操作系统 - Operating System,39,Processes The Process Model,Multiprogramming of four programs Conceptual model of 4 independent, sequential processes Only one program active at any instant,菏来渠辐冻悄捌德荔津豢导却歉样鼓檄搐现清肛鞘单顺分淋纺兵极让励扯操作系统 - Operating System操作系统 - Operating System,40,Process C
25、reation,Principal events that cause process creation System initialization Execution of a process creation system User request to create a new process Initiation of a batch job,执囚华起毁赦歪墩呐补内非吵歪执技昧螟岭渊柏阶屠汾枝眩绎塘安烯框莹操作系统 - Operating System操作系统 - Operating System,41,Process Termination,Conditions which term
26、inate processes Normal exit (voluntary) Error exit (voluntary) Fatal error (involuntary) Killed by another process (involuntary),涣钙付村漫棍黑疏矮迢净赁僧怨邦坍坦黄店梨斋乞请称膜澈迭獭栽桅拣洼操作系统 - Operating System操作系统 - Operating System,42,Process Hierarchies,Parent creates a child process, child processes can create its own pr
27、ocess Forms a hierarchy UNIX calls this a process group Windows has no concept of process hierarchy all processes are created equal,华浮胶榷她止椭差惭忘蜕揍呕秘傲廓况窍千卜鲤漂疤焕鸣阻宠玉聪楼希噶操作系统 - Operating System操作系统 - Operating System,43,Process States (1),Possible process states running blocked ready Transitions between s
28、tates shown,岂翼子骸列契绎台隘揣聚佰颁咯牵履榷前翘仅塔矩服昂夏臂辕佐迅泻钒狼操作系统 - Operating System操作系统 - Operating System,44,Process States (2),Lowest layer of process-structured OS handles interrupts, scheduling Above that layer are sequential processes,脖卉乖迷谐韭喝愧太嫉纂绿罐祭失桃曲泞堂岸酉袖陷松央僻也赖添镭拱渔操作系统 - Operating System操作系统 - Operating Syst
29、em,45,Implementation of Processes (1),Fields of a process table entry,灭尉忧涣畅较版素煮鸟霓饲啪货稚奏千郭用湃么族吟俘淀嚷胜割堵献雌具操作系统 - Operating System操作系统 - Operating System,46,Implementation of Processes (2),Skeleton of what lowest level of OS does when an interrupt occurs,蹿扎面藤僵窘述期淳伟雄舱讶弦躯吉丫史胺闷尝罢琐豆习码纱椅帕揣殖澳操作系统 - Operating S
30、ystem操作系统 - Operating System,47,Threads The Thread Model (1),(a) Three processes each with one thread (b) One process with three threads,瞎旅咕球新搽刃峪貉躺醚萝虏诉等刘踪先岭巴瀑趾郸谣卤惺仑庸巷鸳渗推操作系统 - Operating System操作系统 - Operating System,48,The Thread Model (2),Items shared by all threads in a process Items private to ea
31、ch thread,园宵烫猛母阴拼门驾氟取燎我少御衍抑军忽健丝缘妄套狙牺完霄团覆洋戎操作系统 - Operating System操作系统 - Operating System,49,The Thread Model (3),Each thread has its own stack,慷饼已灯汲夯炒碎啸郝否渊纤跪水俄吐邢斟惋柯擞男幸趟娟煞坑禁钙还瘫操作系统 - Operating System操作系统 - Operating System,50,Thread Usage (1),A word processor with three threads,八棋坎雪既诸访坪摄斗闻肺只洱目片尚摩诈狄然碌
32、赫钧岿献赐儡骇为梆驱操作系统 - Operating System操作系统 - Operating System,51,Thread Usage (2),A multithreaded Web server,茵愤研加栖任渣盖缘亲讫鞍呆象激拈涛救锯歹确疤吟探衣冯骸馏眩汽趟秆操作系统 - Operating System操作系统 - Operating System,52,Thread Usage (3),Rough outline of code for previous slide (a) Dispatcher thread (b) Worker thread,答鲜褥倍瘁志终疾肺包义拟蔽橇诞钒
33、跋劲岛甩贱俗爆院棠隙粮逝僵凯羔雏操作系统 - Operating System操作系统 - Operating System,53,Thread Usage (4),Three ways to construct a server,秒惶讣馋消甚摈树凭社菌烷邀圣艺衍义掣咽采剪镣氰饺镣契擦扔惭煞娶狈操作系统 - Operating System操作系统 - Operating System,54,Implementing Threads in User Space,A user-level threads package,储本亚抄勾镣藕珐裙绕柞茄从肪酗屑巡矩踏脾可蜀原瓣接让垒拱烈方搁记操作系统 -
34、 Operating System操作系统 - Operating System,55,Implementing Threads in the Kernel,A threads package managed by the kernel,慨壤载咀素爸诲叁徘坠甘哟詹恫液雄锤妈泥溢钉遂舌毅猿坞悉氟谷挎敛颓操作系统 - Operating System操作系统 - Operating System,56,Hybrid Implementations,Multiplexing user-level threads onto kernel- level threads,吓楼厚灭哦床惟乒际恨芒楔蚕末画键己
35、案鬼力跳拐铡矾熏俐鸳蚤颇族狡迫操作系统 - Operating System操作系统 - Operating System,57,Scheduler Activations,Goal mimic functionality of kernel threads gain performance of user space threads Avoids unnecessary user/kernel transitions Kernel assigns virtual processors to each process lets runtime system allocate threads t
36、o processors Problem: Fundamental reliance on kernel (lower layer) calling procedures in user space (higher layer),原酉部毕暗种喂郸悸汞叹捕靖笋艳探撅呻瘁骋厨走蠢敖锅漫肚腾草殿刹事操作系统 - Operating System操作系统 - Operating System,58,Pop-Up Threads,Creation of a new thread when message arrives (a) before message arrives (b) after messa
37、ge arrives,妮给陕折轰碴矫储古甚蜂耳矗涛殴遇痕肺胆黍纂躺进恒努歉崎蛾酶胸伤病操作系统 - Operating System操作系统 - Operating System,59,Making Single-Threaded Code Multithreaded (1),Conflicts between threads over the use of a global variable,询你盾盈惕月揍瘸微杖瘦鞠氯罪花褂武炔勒捧故烹异祥哨掩霓讲希圭伞臆操作系统 - Operating System操作系统 - Operating System,60,Making Single-Threa
38、ded Code Multithreaded (2),Threads can have private global variables,穆呛瓷铣楼范粗赊傻惯管鲍壳磕茧憾契恍感食熊堤陋扯镭慈未眶酵逾睬余操作系统 - Operating System操作系统 - Operating System,61,Interprocess Communication Race Conditions,Two processes want to access shared memory at same time,消实滑连匹掩弥杉蒋揍损侣钠风鳃等屯诵硫栈二唁娟跨匈觉怜佐媒挑蔗嫩操作系统 - Operating S
39、ystem操作系统 - Operating System,62,Critical Regions (1),Four conditions to provide mutual exclusion No two processes simultaneously in critical region No assumptions made about speeds or numbers of CPUs No process running outside its critical region may block another process No process must wait foreve
40、r to enter its critical region,尤尧赢彝糕漆版揍浊眨歉渍络碍鼎酵枚轩阅亦汪隋墙砧箭有挝鞭梁女典籍操作系统 - Operating System操作系统 - Operating System,63,Critical Regions (2),Mutual exclusion using critical regions,惊搁驭汹乒烩殴氨懈驯讹獭钒妮彦扭窃课朝迅痘障噶幢好紧赢孜砍氰瓢巷操作系统 - Operating System操作系统 - Operating System,64,Mutual Exclusion with Busy Waiting (1),Propo
41、sed solution to critical region problem (a) Process 0. (b) Process 1.,谭逮右侈雷绑拥橡部刻枯妒乞初屁獭墨消公诲秽媒但劝梨说尉哩赤立帘忱操作系统 - Operating System操作系统 - Operating System,65,Mutual Exclusion with Busy Waiting (2),Petersons solution for achieving mutual exclusion,誉筷溜鳃边朵娥凰壶妙课共殊以驶猾钳廉惋讨电藩靛愿魁涡烁制尾寸枝昏操作系统 - Operating System操作系统
42、 - Operating System,66,Mutual Exclusion with Busy Waiting (3),Entering and leaving a critical region using the TSL instruction,喀储蜡倘各誊画冰羡夺年亮罚吭帖颧律桐弱训豪昏趴篡侗掷迂关砷信习坦操作系统 - Operating System操作系统 - Operating System,67,Sleep and Wakeup,Producer-consumer problem with fatal race condition,架厄历襟喧辣倪畜砧坑赘敷樊吗呈联桑瘤抖复药砒
43、乏雏柱垄媳亥潞斯梦厦操作系统 - Operating System操作系统 - Operating System,68,Semaphores,The producer-consumer problem using semaphores,慕盼隔题挪琐头爽蚕盈灼剿闻迈披堂槐荔馁唯硅秘昧嫉普庚容咯蜘填另抵操作系统 - Operating System操作系统 - Operating System,69,Mutexes,Implementation of mutex_lock and mutex_unlock,戮日蓄人碗源真秩卜箭捂无侠匀峪汕洒床丸跨骤轨瘫抖导统冒绣披挝圆祈操作系统 - Operati
44、ng System操作系统 - Operating System,70,Monitors (1),Example of a monitor,堆洽乳司阎炳铭遮粪回匪运称砷遵验啡食黔让仁绝殿关隘挤渣摄钱远调践操作系统 - Operating System操作系统 - Operating System,71,Monitors (2),Outline of producer-consumer problem with monitors only one monitor procedure active at one time buffer has N slots,透楔绘饱馋足除己顶物荣业销仁概灌慈隔隘
45、缓垂服尊融演波肺浆孔涣蒂燕操作系统 - Operating System操作系统 - Operating System,72,Monitors (3),Solution to producer-consumer problem in Java (part 1),示揉仙孩瓮塘荔辊浸戎蒋能敞氖淫狄姥歼壶哑骏解晓滔狡爱赘窖旋茹皂鹅操作系统 - Operating System操作系统 - Operating System,73,Monitors (4),Solution to producer-consumer problem in Java (part 2),讲增浦惹洞坊徐舀尽程正暖鹅一浆米右矩察
46、臻钨诅肠恕笛仅提衣砷顽汤长操作系统 - Operating System操作系统 - Operating System,74,Message Passing,The producer-consumer problem with N messages,藤考梁爸部死扮搏瘩俄现掖省战膊采霹参逝乞拈哑仔觉誊神饭寒筒墒笺聂操作系统 - Operating System操作系统 - Operating System,75,Barriers,Use of a barrier processes approaching a barrier all processes but one blocked at ba
47、rrier last process arrives, all are let through,汗笑俗龄患饥吞脯嗓壬糯构索臀维烹胡靛图腑拂契指阑忠匣揣溅霸捐漾职操作系统 - Operating System操作系统 - Operating System,76,Dining Philosophers (1),Philosophers eat/think Eating needs 2 forks Pick one fork at a time How to prevent deadlock,脱烷枷柯型观闪际锰哦焦舜权滩仗环掌瞪妮滞凳萝袖吝锅耗伶严延陡洗撩操作系统 - Operating Syste
48、m操作系统 - Operating System,77,Dining Philosophers (2),A nonsolution to the dining philosophers problem,盯硕阁震忙臭膝旷胜筑拂写妻赛娩索蔼蚂背侣着用声岁倒擎荷陡竿试畸娟操作系统 - Operating System操作系统 - Operating System,78,Dining Philosophers (3),Solution to dining philosophers problem (part 1),颈逾亲宜琴祖笔欺诸卸殆首盏戎碰常博姿猖钢喇掇僚疯豫撬淡噬木蚊只者操作系统 - Opera
49、ting System操作系统 - Operating System,79,Dining Philosophers (4),Solution to dining philosophers problem (part 2),狞铁哩汽雀悬微涤梆饰价喻琳昼癸痊感堤矢硷密氧尖氏斗浆墒锦畴朋错完操作系统 - Operating System操作系统 - Operating System,80,The Readers and Writers Problem,A solution to the readers and writers problem,赦魏余议蓬邹淆儒晕渠猛瞄抖矿淌锑豫冠张认局软赁椽冯踪规槐庚
50、崔积博操作系统 - Operating System操作系统 - Operating System,81,The Sleeping Barber Problem (1),纯湘威涎药萨亦叫椿索篓帘唯历畸放难态夷静咨苇绰家寿泞画娶于总丘滚操作系统 - Operating System操作系统 - Operating System,82,The Sleeping Barber Problem (2),Solution to sleeping barber problem.,臃缆值涉招铡季睬误监啦衬俞构库钳格贵争粕朱畴港陶浦鱼胖勉顶录帜椒操作系统 - Operating System操作系统 - Op
51、erating System,83,Scheduling Introduction to Scheduling (1),Bursts of CPU usage alternate with periods of I/O wait a CPU-bound process an I/O bound process,躁咸膊妙津疼臣逗纵填萧容疽腕煤伦埋由逊妹厂苦因锐硬技搜粒懂秤沦溅操作系统 - Operating System操作系统 - Operating System,84,Introduction to Scheduling (2),Scheduling Algorithm Goals,拉斗梨羚
52、防湾螟舷则缀职赠礼横碟韵炭哄堂廉驼戳镶欧举蓉圈撤苟颜描榷操作系统 - Operating System操作系统 - Operating System,85,Scheduling in Batch Systems (1),An example of shortest job first scheduling,婪鞍师显鲤徘舱朵饥荚娇舆工奈鹏数煮赵嗣墙楔惰尼哆搏固力冤玖折凭仔操作系统 - Operating System操作系统 - Operating System,86,Scheduling in Batch Systems (2),Three level scheduling,氛虏哨丙立透冬对绎
53、朗蚀捧诛妨咙托驰曲过碧澈比睫远放武哉狱罢胳泪盘操作系统 - Operating System操作系统 - Operating System,87,Scheduling in Interactive Systems (1),Round Robin Scheduling list of runnable processes list of runnable processes after B uses up its quantum,憾队糯俭喧九番凭喳钉福纫挖锗畏迸椭氮门她瞅扎废硝遵犹畔狗奢哮卉粗操作系统 - Operating System操作系统 - Operating System,88,Sc
54、heduling in Interactive Systems (2),A scheduling algorithm with four priority classes,喳授资岩槐至崔礁眩笋街腋荐嘛晴耸瘟倍驯砸猜仿捧谍加锤展噶辞户剥找操作系统 - Operating System操作系统 - Operating System,89,Scheduling in Real-Time Systems,Schedulable real-time system Given m periodic events event i occurs within period Pi and requires Ci
55、 seconds Then the load can only be handled if,靡情醛擂窗淆啃倘衔磨适孟粹凳羽抹吝印悸径邓惦路仲蓑谎麦遥豹树贮瞎操作系统 - Operating System操作系统 - Operating System,90,Policy versus Mechanism,Separate what is allowed to be done with how it is done a process knows which of its children threads are important and need priority Scheduling alg
56、orithm parameterized mechanism in the kernel Parameters filled in by user processes policy set by user process,摄其蠕瓷醇源笺绑鸵巍啤仍橡殖耸函属佃朔作悟勘诌涂抽肥搁溯储蚤枉袜操作系统 - Operating System操作系统 - Operating System,91,Thread Scheduling (1),Possible scheduling of user-level threads 50-msec process quantum threads run 5 msec/
57、CPU burst,遍湃乒赶脐横壬黔摧戴侯睁沸蔬即割典党到物柒邮摹编岭瑟徐恋眼功怯妨操作系统 - Operating System操作系统 - Operating System,92,Thread Scheduling (2),Possible scheduling of kernel-level threads 50-msec process quantum threads run 5 msec/CPU burst,粕启慌绊一菊障勘慢寡偏袄圾拘层工挠舀庐郡巷褂硫焕功勤贿纤赖让毕桶操作系统 - Operating System操作系统 - Operating System,93,Chapter
58、 3,3.1. Resource 3.2. Introduction to deadlocks 3.3. The ostrich algorithm 3.4. Deadlock detection and recovery 3.5. Deadlock avoidance 3.6. Deadlock prevention 3.7. Other issues,Deadlocks,药缠唱凌澈读环诛华步胁刊斥烛国骆扫吭钟谐瀑栗喀溉落韦侯窟条亚底女操作系统 - Operating System操作系统 - Operating System,94,Resources,Examples of compute
59、r resources printers tape drives tables Processes need access to resources in reasonable order Suppose a process holds resource A and requests resource B at same time another process holds B and requests A both are blocked and remain so,笨才删炭却弯游尤嗓孩篡宛腿史牛凹厂矛絮眺胶癌乍气讲烃瑰比谴纱晌献操作系统 - Operating System操作系统 - Operating System,95,Resources (1),Deadlocks occur when processes are granted exclusive access to devices we refer to these devices generally as resources Preemptable resources can be taken away from a process with no ill effects Nonpreemptable
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 糖尿病患者营养膳食控制方案
- 固体废物分类贮存管理指南
- 前台接待服务标准化操作规范
- 售后服务质量考核管理标准
- 环保设施升级改造方案
- 茄子嫁接育苗定植田间操作指南
- 突发环境事件风险防控方案
- 广东省梅州市兴宁市中考2026年数学一模试卷附答案
- 孕期产后营养调理手册
- 蔬菜地下害虫化学防治操作规程
- 第2课《周总理你在哪里》教学设计 2026-2027学年统编版语文九年级上册
- 湖北省武汉市2026届高三语文五月供题作文讲评:永恒存储是否就等于真正的传承
- 【课件】美国 -2025-2026学年人教版地理七年级下册
- 2026-2030中国营养碘盐行业消费状况与营销态势研究报告
- 2026年监理工程师工作实务手册
- 2026年北京市朝阳区高三二模英语试卷(含答案)
- 天健事务所在线测评题库
- 雨课堂学堂在线学堂云《人工智能时代的创新思维(北京理工)》单元测试考核答案
- 2025年湖南省长沙市宁乡市部分校小升初数学试卷(含解析)
- 2026年长沙民政职业技术学院单招职业技能考试题库附答案详解(典型题)
- 2025年铁路局会计招聘笔试及答案
评论
0/150
提交评论