NTU-Exam 板


LINE

课程名称︰即时系统 课程性质︰选修 课程教师︰郭大维 开课学院:电资学院 开课系所︰资工所、网媒所 考试日期(年月日)︰2012.11.13 考试时限(分钟):180 试题 : Fall 2011 Mid-Exam RTS Read each question over carefully several times. Answer all questions in the space provided. The exam is 180 minutes long. The total score is 102. (1) Please define the following terminologies (21pts): a. Achievable Utilization Factor Ans: The Achievable Utilization Factor α of a scheduling policy P is defined as follows: Any process set with total utilization factor no more than α is schedulable. b. Priority Ceiling Ans: Define a semaphore's priority ceiling as the priority of the highest priority process that may lock the semaphore. c. Partitioned Earliest Deadline First Scheduling Ans: Tasks are first partitioned over processors. EDF is then used to schedule tasks on each processor without task migration. d. Dynamic Power Management Ans: Dynamic power management tries to select an optimal power saving states with proper hardware support. e. Forbidden Region Ans: In a forbidden region, no task scheduling/dispatching should be done. f. The Instantaneous Utilization of a Sporadic Job S_(i, j) Ans: u_(i, j) = e_(i, j) / p_(i, j), where p_(i, j) denotes the release-time difference between S_(i, j) and S_(i, j+1). g. Polling Server Ans: A polling Server periodically checks up for the arrival of sporadic tasks. If there is any pending sporadic task, then the server services the pending tasks until its execution budget is used up. (2) Redundancy is often used to detect errors and mask failures. Please explain Time Redundancy. The storing of copies for each piece of data is Space Redundancy or Information Redundancy. Please give me the argument of your answer. (8pts) Ans: (A) Time Redundancy: repetition of a computation or communication. (B) It is Information Redundancy because extra information is kept (please give me your argument if you choose another one). (3) Please compare the Timeline (or Cyclic Executive) and Pipelined architectures in terms of life-cycle cost and predictability in run-time behavior. Given two procedures P1 and P2, where the execution frequencies of P1 and P2 are 20Hz and 25Hz. Please determine the largest possible granularity of the timer and the smallest size of the major cycle under the Timeline architecture. (10pts). Ans: (A) Timeline architecture is better than Pipelined architecture in terms of the predictability in run-time behavior. Pipelined architecture is better than Timeline architecture in terms of life-cycle cost. (B) The largest timer granularity could he 10ms. The smallest major cycle could be 200ms. (4) Please answer the following uniprocessor scheduling problems: You must provide explanation to receive any points. (15pts) (A) Consider the metric to minimize the sum of completion times, i.e., Sum(X_j), of a set {τ_1, ... , τ_n} of n tasks, where each τ_i has an execution time c_i and a deadline d_i, and X_i is the completion time of a task τ_i. Please provide the optimal and efficient scheduling algorithm to minimize the sum of completion times. (5pts) (B) Continue with the above Subproblem A. If the metric becomes the minimization of the weighted sum of completion times, i.e., Sum(w_j X_j) then do we have still an optimal and efficient scheduling algorithm? (5pts) (C) If the metric is to minimize the minimum number of tasks that miss their deadlines, is your optimal scheduling algorithm for the above Subproblem A still optimal? If yes, please tell me why. If not, give me an optimal algorithm. (5pts) Ans: (A) The smallest execution time first scheduling is an optimal algorithm. (B) There is no optimal and efficient scheduling algorithm because it is a NP-Hard problem. (C) It is not optimal. EDF is the optimal algorithm to minimize the minimum number of tasks that miss their deadlines. (5) In dynamic voltage scaling, we must satisfy the deadlines of tasks and, at the same time, minimize the energy consumption. Please answer the following questions: (12pts) (A) Suppose that dynamic voltage scaling is adopted with the Priority Inheritance Protocol. Please tell me whether (or when) we should increase the voltage of the processor when a lower-priority task blocks and has priority inheritance form a higher-priority task. You should give me your argument. (5pts) (B) Please briefly summarize the scheduling algorithm in "Frances Yao, Alan Demers, and Scott Shenker, "A Scheduling Model for Reduce CPU Energy", FOCS, 1995" that minimize the total energy consumption in executing a given set of tasks, where each task τ_i ∈ T requires c_i computation time at the normalized processor frequency 1 with an arrival time a_i and an absolute deadline constraint d_i. (Hint: the intensity of an interval) (7pts) Ans: (A) We should increase the voltage of the processor if the higher-priority task might miss its deadline because of the blocking. (B) (1) We first select jobs in an interval with the highest intensity and then use the earliest-deadline first scheduling for the jobs and running at the intensity as the frequency. (2) We then adjust the arrival times and deadlines of the remaining tasks by excluding the possibility to execute them at the chosen critical interval. (3) Run the algorithm for the revised input again until all jobs are selected. (6) The deadline modification technology lets the earliest deadline first algorithm (EDF) remain an optimal scheduling algorithm for independent periodic tasks. What will be the main problem in practice when we adopt the deadline modification technology for task scheduling during the run time? (6pts) Ans: The technology is a pseudo polynomial time approach. We might need to look into the future for an extended period in deadline modification. (7) Why a Total Bandwidth Server allows tasks to better utilize unused background time, compared to a Constant Utilization Server. Which one of a Total Bandwidth Server and a Constant Utilization Server has a higher possibility for starvation? You must provide explanation to receive any points. (10pts) Ans: (A) It is because when a sporadic job with execution time e arrives at time t to an empty queue, a Total Bandwidth Server will immediately set its deadline d and budget e_s for potential execution, but a Constant Utilization Server does nothing when t < d. (B) A Constant Utilization Server has a lower possibility for starvation because the current deadline of a Constant Bandwidth Server of size u_i is never more than (max e_i)/u_i from the current time such that the length of starvation suffered by any server is bounded by max_i((max e_i)/u_i), where u_i is the server size. (7) RMA: Consider the following process set with assigned priorities (Max: 1, Min: 4): (hint: use schedulability bound tests, completion time test, or schedulability point test. All critical sections are NESTED.) (20pts) ┌─────┬─────┬───────┬─────┬─────┐ │ │ T1 │ T2 │ T3 │ T4 │ ├─────┼─────┼───────┼─────┼─────┤ │ P_i │ 50 │ 120 │ 200 │ 300 │ │ │(periodic)│ (periodic) │(periodic)│(periodic)│ ├─────┼─────┼───────┼─────┼─────┤ │ C_i │ 10 │ 30 │ 45 │ 60 │ ├─────┼─────┼───────┼─────┼─────┤ │Semaphores│ S1(5) │ S1(5), S2(10)│ S2(20) │ S1(10) │ ├─────┼─────┼───────┼─────┼─────┤ │ deadline │ 50 │ 120 │ 180 │ 150 │ ├─────┼─────┼───────┼─────┼─────┤ │ priority │ 1 │ 4 │ 3 │ 2 │ └─────┴─────┴───────┴─────┴─────┘ (a) Consider periodic process set {T1, T2, T3, T4} without semaphore sharing, and the priorities of T1, T2, T3, and T4 be inversely proportional to their periods, i.e., T1 > t2 > T3 > T4. Show me which process is schedulable or unschedulable. (b) Consider periodic process set {T1, T2, T3, T4} without semaphore sharing, and the priorities of the tasks are as shown in the above table. Show me which process is schedulable or unschedulable. (c) Consider periodic process set {T1, T2, T3, T4} with semaphore sharing, and the priorities of the tasks are as shown in the above table. Show me which process is schedulable or unschedulable under the Priority Ceiling Protocol. Ans: (a) T1: 10 ≦ 50 => V T2: (10) + 30 = 40 ≦ 50 => V T3: (10*2 + 30) + 45 = 95 ≦ 100 => V T4: (10*3 + 30*2 + 45) + 60 = 195 > 150 => X (b) T1: 10 ≦ 50 => V T2: (10*3 + 60 + 45) + 30 = 165 > 120 => X T3: (10*3 + 60) + 45 = 135 ≦ 150 => V T4: (10*2) + 60 = 80 ≦ 100 => V (c) T1: 10 + 10 = 20 ≦ 50 => V T2: (10*3 + 60 + 45) + 30 = 165 > 120 => X T3: (10*3 + 60) + 45 + 10 = 145 ≦ 150 => V T4: (10*2) + 60 + 5 = 85 ≦ 100 => V --



※ 发信站: 批踢踢实业坊(ptt.cc), 来自: 114.24.75.17
※ 文章网址: https://webptt.com/cn.aspx?n=bbs/NTU-Exam/M.1421227615.A.BA0.html
1F:→ rod24574575 : 已收资讯系! 01/14 17:27







like.gif 您可能会有兴趣的文章
icon.png[问题/行为] 猫晚上进房间会不会有憋尿问题
icon.pngRe: [闲聊] 选了错误的女孩成为魔法少女 XDDDDDDDDDD
icon.png[正妹] 瑞典 一张
icon.png[心得] EMS高领长版毛衣.墨小楼MC1002
icon.png[分享] 丹龙隔热纸GE55+33+22
icon.png[问题] 清洗洗衣机
icon.png[寻物] 窗台下的空间
icon.png[闲聊] 双极の女神1 木魔爵
icon.png[售车] 新竹 1997 march 1297cc 白色 四门
icon.png[讨论] 能从照片感受到摄影者心情吗
icon.png[狂贺] 贺贺贺贺 贺!岛村卯月!总选举NO.1
icon.png[难过] 羡慕白皮肤的女生
icon.png阅读文章
icon.png[黑特]
icon.png[问题] SBK S1安装於安全帽位置
icon.png[分享] 旧woo100绝版开箱!!
icon.pngRe: [无言] 关於小包卫生纸
icon.png[开箱] E5-2683V3 RX480Strix 快睿C1 简单测试
icon.png[心得] 苍の海贼龙 地狱 执行者16PT
icon.png[售车] 1999年Virage iO 1.8EXi
icon.png[心得] 挑战33 LV10 狮子座pt solo
icon.png[闲聊] 手把手教你不被桶之新手主购教学
icon.png[分享] Civic Type R 量产版官方照无预警流出
icon.png[售车] Golf 4 2.0 银色 自排
icon.png[出售] Graco提篮汽座(有底座)2000元诚可议
icon.png[问题] 请问补牙材质掉了还能再补吗?(台中半年内
icon.png[问题] 44th 单曲 生写竟然都给重复的啊啊!
icon.png[心得] 华南红卡/icash 核卡
icon.png[问题] 拔牙矫正这样正常吗
icon.png[赠送] 老莫高业 初业 102年版
icon.png[情报] 三大行动支付 本季掀战火
icon.png[宝宝] 博客来Amos水蜡笔5/1特价五折
icon.pngRe: [心得] 新鲜人一些面试分享
icon.png[心得] 苍の海贼龙 地狱 麒麟25PT
icon.pngRe: [闲聊] (君の名は。雷慎入) 君名二创漫画翻译
icon.pngRe: [闲聊] OGN中场影片:失踪人口局 (英文字幕)
icon.png[问题] 台湾大哥大4G讯号差
icon.png[出售] [全国]全新千寻侘草LED灯, 水草

请输入看板名称,例如:iOS站内搜寻

TOP