ncyu_phyedu 板


LINE

1.(10 points)give an advantage that a.a sequential file has over an indexed file b.a sequential file has over a hashed file c.a indexed file has over a sequential file d.a indexed file has over a hashed file e.a hashed file has over a sequential f.a hashed file has over a indexed file 2.(10 points)design an algorithm that lists all possible rearrangements of the symbols in a string of five distinct characters 3.(10 points)arrange the name Bi,Di,Ri,Si,Ti, and Wi in an order that requires the leaset number of comparisons when sorted by the quick sort algorithm. 4.(10 points)describe what is the stored-program concept. 5.(10 points)would a large array probably be passed to a subroutine by valve? yes or no? support your judgment 6.(10 points)draw a state diagram and write the turing.instructions for a turing machine that takes any string of 1s and changes every third 1 to a 0. thus,for example, ...b111111b... would become ...b110110b... 7.(15 points)implement the combination logic f(A,B,C,D)=sigma(0,3,8,10,12,14)+ d(1,2,5,7) a.by using 3 level NAND gate(using minimal number of gates) b.by using a decoder c.by using a 8*1 multiplexor 8.(5 points)describe the difference between syntax,run-time,and logic errors. 9.(20 points)given the following list:14,15,5,9,8,3,19,4 a.please construct a binary search tree for the sequence. b.please traverse the binary serch tree in postorder c.construct an AVL tree for the sequence. d.Construct a heap tree(note,the root has the maximum key)for the sequence. (note.show your answers step by step.) 1.which are privileged instructions? a.I/O instruction b.trap or software-generated interrupt c.WAIT instruction d.the base and limit registers(for memory space)loading 2.which are correct for real-time system? a.in hard real-time systems,the operating system kernel delays do not need to be bounded. b.a hard real-time system guarantees that critical tasks be completed on time c.virtual memory is almost never found on hard real-time systems d.a soft real-time system claims that a critical real-time task gets priority over other tasks,and retains that priority until it completes. 3.which activities should be taken in the secondary-storage management? a.free-space management b.creating and deleting derectries c.storage allocation d.buffering 4.which are correct for process state? a.if a process is created,it will enter the "running"state. b.if the waiting event of a process occurs,the process will enter the "running" state. d.if a running process encounters an interrupt,it will enter the "ready"state. 5.which are correct for CPU-scheduleing algorithms? a.the FCFS scheduling algorithm must be nonpreemptive. b.the SJF algorithm must be preemptive. c.An SJF algorithm is simply a priority algorithm where the priority is the inverse of the next CPU burst. d.the round-robin scheduling algorithm is designed especially for time-sharing systems. 6.which are correct for process synchronizations? a.a semaphor,apart from initialization,is accessed only through two standard atomic operarions:wait and signal. b.mutual-exclusion can be implemented with testandset or swap instructions. c.a spinlock(some kind of semaphores)is not useful when locks are expected to be held for short time d.a counting semaphore can be implemented using binary semaphores. 7.what conditions does the approach(i.e.,imposing a total ordering of all resource types,and requiring that each process requests resources in an increasing order of enumeration) try to prevent? a.mutual exclusion b.circular wait c.no preemption d.hold and wait 8.which are correct for pure segmentation? a.segmentation is a memory-management scheme that supports the user view of memory. b.a particular advantage of segmentation is the association of protection with the segment. c.an advantage of segmentation involves the sharing of code or data. d.like paging,segmentation has no external fragmentation. 9.which are correct for virtual memory? a.FIFO page replacement is a stack algoritm. b.the LRU strategy is the optimal page-replacement algorithm looking backward in time,rather than forward. c.the accuracy of the working set depends on the selection of a(i.e.,the working-set window). d.if I/O is done to ro from user virtual memory,these pages do not need to be locked in memory when demand paging is used. 10.which disk scheduling algorithms always service I/O requests in only one direction? a.SSTF scheduling b.SCAN scheduling c.C-SCA scheduling d.LOOK scheduling 11.the following code is designed to solved the dining philosopher problem. suppose that there are five philosophers spending their lives alternatively thinking and eating spaghetti,and they are seated around a table on which is placed five plates of pasta anf five forks. when a philosopher decides to eat,then he or she must obtain two forks by first picking up the left fork and then picking up the right fork.after consuming food,the philosophor replaces the forks and resumes thinking.what problems would occur in the following code executed by each philosopher?modify the code to solve the problems posed by you. semaphore fork[5]={1,1,1,1,1}; philosopher(int i){ while (true){ .../*thinking*/ p(fork[i]); /*pick up left fork*/ eat(); V(fork[(i+1)mod 5]; v(fork[i]); ) 12.consider the following page reference string: 1,2,3,4,2,1,5,6,2,1,2,3,7,6,3,2,1,2,3,6 how many page faults would occur for the following rplacemant algorithms:LRU replacement,FIFO replacement,Optimal replacement.Assuming the number of allocated frames is three and all frames are initially empty. 13.consider the problem of jobs waiting in --



※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 61.58.22.74







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

請輸入看板名稱,例如:Tech_Job站內搜尋

TOP