NTU-Exam 板


LINE

課程名稱︰即時系統 課程性質︰選修 課程教師︰郭大維 開課學院:電資學院 開課系所︰資工所、網媒所 考試日期(年月日)︰2010.01.18 考試時限(分鐘):120 試題 : Fall 2009 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 = 100. 1. Please define the following terminologies: (24) (a) Decomposition by Critical Time Constraints (CTC) in system synthesis: Ans: Having a process for each timing constraint. (b) Decomposition by Distributed Concurrency Control (DCC) in system synthesis: Ans: Partitioning the required computation into as many processes as possible to maximize parallelism. (c) Static Wear Leveling (SWL): Ans: All physical blocks will be considered as possible candidates of the victim block for space reclamation (also called garbage collection). (d) DC-erasing of a programmed cell of flash memory: Ans: Some programmed cells might lose stored electrons via tunneling through the interpoly dielectric and become erroneously erased during the programming of another cell on the same word line (row). (e) Forward validation: Ans: The validation of a transaction is performed against all currently executing transactions. (f) Load shedding: Ans: Kill less important processes (so as to make use of the available computation resources in the optimal way). (g) Wait-X policy: Ans: A transaction T commits if less or equal to X% of the processes that conflict with T have higher priority than T ; otherwise, T waits. (Once a conflicting transaction T_H with higher priority than T commits, T needs to be aborted.) It is often a good choice that T = 50. (h) Offspring set in schedulability analysis: Ans: An offspring set of a periodic process T is a set of processes whose periods divide the period of T. 2. Consider the potential operations over NAND flash memory, where Flash Translation Layer (FTL) and Memory Technology Device (MTD) are the two major layers for flash memory storage systems. Please answer the following questions: (15) (a) As a simple FTL implementation, BL associates each logical/virtual block with a physical block. When the data of a given logical page is written, they are written to the physical page with the same offset in the physical block as the offset of the logical page in the logical/virtual block, provided that the physical page is free. Otherwise, a new physical block is allocated, and all the valid pages in the original block are copied to the corresponding pages of the new block. Please explain why BL might have low space utilization. Please have comments on garbage collection activities of BL as well. (9) (b) Please define Single-Level Cell (SLC) and Multi-Level Cell (MLC) flash memory (3). Please compare SLC and MLC flash memory in terms of cost and performance as well. (6) Ans: (a) The utilization of BL is low because the mapped physical block may be nearly empty when a new physical block is needed. (This situation is very possible for skewed access patterns, which reveals high degrees of temporal locality and a small number of hot pages in the block are updated frequently.) The garbage collection activities are triggered frequently on each new block allocation. (b) ‧ SLC flash memory stores a single bit, while MLC flash memory stores more than 1 bit of data in each memory cell. ‧ SLC flash memory has higher cost and performance. 3. Please answer the following questions for disk scheduling. (18) (a) Please compare the First-Come-First-Serve (FCFS), Shortest-Seek-Time-First (SSTF), SCAN, and C-SCAN algorithms, in terms of the response time variation, when the disk workload is very light and when the disk workload is very heavy, respectively. Which algorithms might cause starvation when the disk workload is very heavy? (14) (b) Why is the Earliest Deadline First (EDF) not suitable for real-time disk scheduling? (4) Ans: (a) ‧ Very light disk workload: All the algorithms have similar variations of response time. ‧ Very heavy disk workload: SSTF > FCFS ~ SCAN > C-SCAN. ‧ Only SSTF might cause starvation. (b) EDF does not consider the lengthy disk seek time and rotational delay (also called latency delay). 4. Considering the correctness in concurrency control and database designs, please answer the following questions. (21) (a) What are the time complexities to determine whether a given schedule is final-state, view, and conflict serializable, respectively? You only need to answer "NP-Hard" or "not NP-Hard". (9) (b) ACID stands for Atomicity, Consistency, Isolation, and Durability. Which of ACID is/are related to serializability? You must provide explanation to receive any credits. (8) (c) When timing constraints are considered in real-time database systems, define absolute consistency. (4) Ans: (a) ‧ Final-state serializable: "NP-Hard". ‧ View serializable: "NP-Hard". ‧ Conflict serializable: "P" or "not NP-Hard". (b) ‧ Atomicity: unrelated. ‧ Consistency: related, because it determines the consistent state transformation of database. ‧ Isolation: semantically related but technically unrelated, because its violation may lead to the visibility of dirty data. ‧ Durability: unrelated. (c) Data reflect the changings of the external environment. 5. Please explain how the Read/Write Priority Ceiling Protocol (RWPCP) resolves read and write locks, compared to the Priority Ceiling Protocol (PCP). (8) Ans: ‧ Locks are classified into read and write locks. ‧ Read locks can be shared, while write locks are exclusive; i.e., there can be exactly one write lock, or multiple read locks for each data object at any time. ‧ The write priority ceiling of a data object x is statically defined and set as the highest priority of all the transactions that may write x. ‧ The absolute priority ceiling of a data object x is statically defined and set as the highest priority of all the transactions that may read or write x. ‧ The r/w priority ceiling of a data object x is dynamically defined, set, and used as follows. – All transactions that would like to read or write x must have a priority strictly higher than the current r/w priority ceiling of x. – If a transaction is allowed to read x, the r/w priority ceiling of x is set to the write priority ceiling of x. This prevents any transactions from writing x while still allowing higher priority transactions to read x. – If a transaction is allowed to write x, the r/w priority ceiling of x is set to the absolute priority ceiling of x to prevent all other transactions from reading or writing x. 6. Why is the predictability of the response time of transactions better in main-memory database systems (than that in disk or flash memory database systems)? (8) Ans: (a) Main memory databases have smaller transaction durations (Since main memory is faster than disk). (b) Main memory databases have have smaller lock granularities (Disk databases have block (sector) as the data unit of locking). (c) Main memory databases do not need disk accesses, which is affected by the rotational delay (latency time) and seek time. 7. Locking is a major method for conservative concurrency control. Consider the Two-Version Priority Ceiling Protocol (2VPCP) with the following compatibility table. Suppose that every data object has only one transaction that may update its value. Can we remove the Certify lock in 2VPCP? In other words, without modifying other parts of the protocol, is it correct to remove Certify lock? You must provide either proof or counterexample to receive any credits. (6) Table 1: Compatibility Table of 2VPCP ──────────────────────── Lock already set Read Write Certify ──────────────────────── Read Request Granted Granted Blocked Write Request Granted Blocked Blocked Certify Request Blocked Blocked Blocked ──────────────────────── Ans: No. Without Certify lock, during the certification, there might be some high priority transactions that erroneously read the partially-updated data. --



※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 111.250.48.23
※ 文章網址: https://webptt.com/m.aspx?n=bbs/NTU-Exam/M.1423792527.A.894.html ※ 編輯: rod24574575 (111.250.48.23), 02/13/2015 09:57:11
1F:→ rod24574575 : 已收資訊系! 02/13 09:58







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燈, 水草

請輸入看板名稱,例如:e-shopping站內搜尋

TOP