




已阅读5页,还剩25页未读, 继续免费阅读
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
B.Ramamurthy,1,Multiprocessor and Real-Time Scheduling,Bina RamamurthyChapter 10CSE421,B.Ramamurthy,2,Introduction,When a computer system contains more than a single processor, several new issues are introduced into the design of scheduling functions. We will examine these issues and the details of scheduling algorithms for tightly coupled multi-processor systems.,B.Ramamurthy,3,Topics for discussion,Granularity of computationDesign issuesAssignment of processes to processorsMultiprogramming on individual processorsActual dispatching of a processReal-time systemsCharacteristicsReal-time schedulingRate-monotonic scheduling (RMS),B.Ramamurthy,4,Granularity,The main purpose of having multiple processors is to realize_?Applications exhibit parallelism at various levels. There are at least five categories of parallelism that differ in the degree of granularity.Fine grain parallelism: Parallelism inherent in a single inst. stream. usually does not involve the OS but done at compilation stage. High data dependency = high frequency of synch. reqd.,B.Ramamurthy,5,Granularity,Medium grain: Potential parallelism of an application can be implemented by multiple threads in a single process. High degree of coordination among the threads. Usually programmer specifies the parallelism in the design.Coarse grain: Multiprocessing of concurrent processes in a multiprogramming environment :Example : Prj2.Very coarse grain: When the synchronization needed is not so frequent the processes can be distributed among network nodes to form a single computing environment. Example: CORBA standard for distributed systemIndependent parallelism: Multiple unrelated processes.,B.Ramamurthy,6,Design Issues,Assignment of processes to processors.Use of multiprogramming on individual processors.Actual dispatching of a process.,B.Ramamurthy,7,Process/processor Assignment,Master/slave assignment: Kernel functions always run on a particular processor. Other processors execute user processes. Advantage: Resource conflict resolution simplified since single processor has control.Problem: Failure of master processor? Master processor does the scheduling = bottleneck.Peer assignment: OS can execute on any processor. Each processor does its own scheduling from the pool of available processes. This is similar to Solaris or NT symmetric multiprocessing (SMP).,B.Ramamurthy,8,Multiprogramming at each processor,Completion time and other application-related performance metrics are much more important than processor utilization in multi-processor environment.For example, a multi-threaded application may require all its threads be assigned to different processors for good performance.Static or dynamic allocation of processes.,B.Ramamurthy,9,Process dispatching,After assignment, deciding who is selected from among the pool of waiting processes - process dispatching.Single processor multiprogramming strategies may be counter-productive here.Priorities and process history may not be sufficient.,B.Ramamurthy,10,Process scheduling,Single queue of processes or if multiple priority is used, multiple priority queues, all feeding into a common pool of processors. Multi-server queuing model: multiple-queue/single queue , multiple server system. Study the system for 1, 2, and n processors. Inference: Specific scheduling policy does not have much effect as the processor number increases.Conclusion: Use FCFS with priority levels.,B.Ramamurthy,11,Thread scheduling,An application can be implemented as a set of threads that cooperate and execute concurrently in the same address space. Criteria: When related threads run in parallel perf. improves.Load sharing: pool of threads, pool of processors.Gang scheduling: Bunch of related threads scheduled together.Dedicated processor assignment: Each program gets as many processors as there are parallel threads.Dynamic scheduling: More like demand scheduling.,B.Ramamurthy,12,Real-time systems,Real-time computing is an important emerging discipline in CS and CE.Control of lab experiments, robotics, process control, telecommunication etc.It is a type of computing where correctness of the computation depends not only on the logical results but also on the time at which the results are produced.Hard real-time systems: Must meet deadline. Ex: Space shuttle rendezvous with other space station.Soft real-time system: Deadlines are there but not mandatory. Results are discarded if the deadline is not met.,B.Ramamurthy,13,Characteristics of Real-Time (RT) systems,DeterminismResponsivenessUser controlReliabilityFail-soft operation,B.Ramamurthy,14,Deterministic Response,External event and timings dictate the request of service.OSs response depends on the speed at which it can respond to interrupts and on whether the system has sufficient capacity to handle requests.Determinism is concerned with how long the OS delays before acknowledging an interrupt.In non-RT this delay may be in the order of 10s and 100s of millisecs, whereas in an RT it may have an upper-bound of few microsec to 1millisec.,B.Ramamurthy,15,RT . Responsiveness,Responsiveness is the time for servicing the interrupt once it has been acknowledged.Comprises:Time to transfer control, (and context switch) and execute the ISRTime to handle nested interrupts, the interrupts that should be serviced when executing this ISR. Higher priority Interrupts.response time = F(responsiveness, determinism),B.Ramamurthy,16,RT . User Control,User control : User has a much broader control in RT-OS than in regular OS.PriorityHard or soft deadlinesDeadlinesMemory Managemenmt: paging or swappingName the processes to be resident in memoryScheduling policies,B.Ramamurthy,17,RT . Reliability,Reliability: A processor failure in a non-RT may result in reduced level of service. But in an RT it may be catastrophic : life and death, financial loss, equipment damage.Fail-soft operation: Ability of the system to fail in such a way preserve as much capability and data as possible.In the event of a failure, immediate detection and correction is important.Notify user processes to rollback.Apply compensation.,B.Ramamurthy,18,Requirements of RT,Fast context switchMinimal functionality (small size) Ability to respond to interrupts quickly (Special interrupts handlers)Multitasking with signals and alarmsSpecial storage to accumulate data fastPreemptive scheduling,B.Ramamurthy,19,Requirements of RT (contd.),Priority levelsMinimizing interrupt disablesShort-term scheduler (“omni-potent”)Time monitorGoal: Complete all hard real-time tasks by dead-line. Complete as many soft real-time tasks as possible by their deadline.,B.Ramamurthy,20,Preemption and short-term scheduling,Fig.10.4,B.Ramamurthy,21,RT scheduling,Static table-driven approachFor periodic tasks.Input for analysis consists of : periodic arrival time, execution time, ending time, priorities.Inflexible to dynamic changes.General policy: earliest deadline first.,B.Ramamurthy,22,RT scheduling,Static priority-driven preemptive schedulingFor use with non-RT systems: Priority based preemptive scheduling. Priority assignment based on real-time constraints.Example: Rate monotonic algorithm,B.Ramamurthy,23,RT scheduling,Dynamic planning-based schedulingAfter the task arrives before execution begins, a schedule is prepared that includes the new as well as the existing tasks.If the new one can go without affecting the existing schedules than nothing is revised.Else schedules are revised to accommodate the new task.Remember that sometimes new tasks may be rejected if deadlines cannot b
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 2025年留学生事业单位招聘考试教师招聘考试教育心理学试卷及答案
- 初中数学函数应用训练方案
- 2025年能源解决方案:锂电池正极材料掺杂改性技术深度分析
- 2025年露营地交通枢纽换乘效率提升方案
- 电子公司采购材料计划方案文档
- 连锁超市货品陈列与促销管理方案
- 水利工程项目安全生产管理方案
- 汽车销售部门客户满意度提升方案
- 2026届安徽省铜陵市名校数学九上期末监测试题含解析
- 2026届浙江省湖州市吴兴区十校联考数学九年级第一学期期末经典试题含解析
- 2025年秋季新改版冀人版科学三年级上册分组实验报告单
- 2025标准版劳务劳动合同范本
- 窗户安装工安全教育培训课件
- 2025中国旅游集团迪庆香格里拉旅游投资发展有限公司岗位招聘28人笔试历年参考题库附带答案详解
- T/CNSS 003-2020医疗机构人乳库建立与管理规范
- 2026中国移动校园招聘备考考试题库附答案解析
- 2025年大学生国防科技知识竞赛题库及答案
- 声带息肉术后发声训练
- 1二年级上册小学生经典诵读校本课程教材
- 城市轨道交通乘客服务课件(完整版)
- 2022年公务员申论答题标准格子纸Word版A4打印版
评论
0/150
提交评论