NTU-Exam 板


LINE

课程名称︰即时系统 课程性质︰选修 课程教师︰郭大维 开课学院:电资学院 开课系所︰资工所、网媒所 考试日期(年月日)︰2015.01.13 考试时限(分钟):120 试题 : Fall 2014 Final-Exam RTS Read each question over carefully several times. Answer all questions in the space provided. The exam is two hours long. Total score = 109. (1) Please define the following terminologies (15pts): a. Fundamental Frequency (Hint: The least upper bound of utilization factor K(2^(1/K) - 1)) Ans: The periods of processes from a fundamental frequency if the periods can form a number sequence in an increasing order such that the former number can divide the later one. b. MLC (Multi-Level Cell) Flash Memory Ans: Each cell of flash memory stores more than one bit of information. c. Isolation in ACID Ans: Invisibility for dirty data. d. Optimistic Concurrency Control Ans: The execution of a transaction has 3 stages: Read, validation, and write stages. In the read stage, no write is performed on the database. If a transaction passes the validation stage, it can go to the write stage and commit. If there is a good chance to pass the validation with serializability violation, then optimistic concurrency control is preferred. e. Wait Policy in Broadcast Commit Ans: When T comes to its validation phase, and a higher priority transaction H in conflict with T, then T waits until H commits. If H commits, abort T; otherwise, commit T. (2) Please answer the following questions in disk scheduling. You might provide explanation to receive any credits. (15pts) (A) Why EDF could have very bad performance in scheduling disk requests? (B) Batch processing ideas are often adopted to improve disk performance, such as SCAN and C-SCAN. In terms of the disk throughput, which one of SCAN and C-SCAN might be the best when the disk is heavily loaded? (C) Please explain why some file allocation methods, such as that under indexed allocation (like Unix's), could result in bad disk performance? Ans: (A) It is because the rotation delay and seek latency are too large. (B) SCAN might be better than C-SCAN because when the head reaches one end under C-SCAN, it immediately returns to the beginning of the disk. That is extra overheads. (C) It is because the contents of a file will be scattered over different tracks of a disk. (3) A software automation strategy might consist of 3 stages: (1) Capture the computational requirements of the application domain in terms of an appropriate model. (2) Translate requirements specifications into an instance of the domain-specific model for resource allocation analysis. (3) Solve the well-defined optimization problems to minimize chosen cost/risk criteria. Please answer the following questions: (14pts) (A) Which one of the stages is for the "Decomposition by Distributed Concurrency Control (DCC) or Maximizing Concurrent Process" presented in the class? (B) The "Decomposition by Centralizing Concurrency Control (CCC) or Minimizing Inter-process Communication" tries to partition the computation required by the timing constraints into sets, in which the computation in each set is assigned to a periodic process. Please give me two main advantages and one disadvantage of this approach? Ans: (a) The second stage. (b) The advantage: (1) Efficiency is improved by eliminating substantial redundant computations. (2) With fewer processes and more independent process, less inter-process communication may be required. The disadvantage: Maintainability seems more difficult, especially when some internal scheduling decision is implemented in a process. (4) Please answer the following questions for flash memory and phase change memory. You might provide explanation to receive any credits. (20pts) (A) Why there is a need to do garbage collection (of invalid pages) over flash memory? (B) Solid-State Disks (SSDs) are made of flash memory. There could be more than one flash-memory chips per SSD. When hot and cold data are stored on flash-memory chips, why we should avoid keeping hot data in one or few flash-memory chips, instead of spreading hot data over chips? Please give me two reasons. (Note that hot data might be read and/or updated often). (C) Phase change memory (PCM) and DRAM can both be read or written in one-bit unit. Please give me two different characteristics of PCM and DRAM. Ans: (A) It is because of the write once property of flash memory such that no data can be written to a page unless its residing block is erased first. It generates invalid pages for garbage collection. (B) (1) If we keep storing hot data on few chips, it might generates invalid pages on those chips because hot data might be updated often. As a result, those chips are updated often and will he broken soon. (2) Chips of lots of hot data are accessed more often such that the workloads among chips are not balanced. (C) (1) PCM is non-volatile, but DRAM is volatile. (2) The number of writes to a PCM cell is constrained, but there is no limit to DRAM cell currently. (3) PCM has different read and write speeds, but they are the same to DRAM. (5) Why View Serializability is the criteria acceptable to justify the correctness of a schedule, instead of Final-State Serializability? (8pts) Ans: It is because Final-State Serializability only guarantees the same final results, as a serial schedule. It does not consider the view of each transaction. (6) Why we have better response-time predictability for a main-memory database system, compared to a disk-based database system? Please give me three reasons. (12pts) Ans: (1) No unpredictability problem of disk access time and page faults. (2) Less contention due to a smaller transaction duration. (3) Less contention due to a smaller lock granularity. (7) RWPCP has absolute and write priority ceilings to implement read and write locks and to guarantee one priority inversion for each transaction, while PCP only has priority ceiling to implement exclusive locks, i.e., write locks. Please answer the following three questions with explanation to get any credit: (15pts) (A) Please explain how to set the Read/Write Priority Ceiling (RWPL) of a data item when the data item is locked in a read mode? (B) When there are multiple processors, how to set the Read/Write Priority Ceiling (RWPL) of a data item when the data item is locked in a read mode by a process τ so as to guarantee one priority inversion (as presented in the class)? (C) The Two-Version Read/Write Priority Ceiling Protocol (2VPCP) further extends RWPCP by having the working version and consistent version for each data item, where the same definitions of absolute and write priority ceilings are used. How 2VPCP set the Read/Write Priority Ceiling (RWPL) of a data item when the data item is locked in a write mode? Ans: (A) RWPL = write priority ceiling (B) RWPL = max(write priority ceiling, the priority of τ) (C) RWPL = write priority ceiling. (8) Aborting gives a higher-priority transaction a chance to abort a lower-priority transaction when the later might block the former for too long. The Basic Aborting Protocol (BAP), the Table-Driven Aborting Protocol (TAP), and the Dynamic Aborting Protocol (DAP) are presented. Please explain how TAP improves BAP in the miss ratio of transaction executions? Please explain how DAP improves BAP in the miss ratio of transaction executions? (10pts) Ans: (A) TAP improves BAP because TAP considers the binary relationship between any pair of transactions whether one can abort the other. In this way, potentially less aborting occurs. (B) DAP improves BAP because DAP considers the current tolerable blocking time of a transaction based on the current load before some aborting happens so that less unnecessary aborting occurs. --



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







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