作者aweila75 (David)
看板TransCSI
標題Re: [問題] 95NCCU-CS 一些題目
時間Fri Apr 20 21:05:33 2007
※ 引述《Daiblo2 (要開始做專題囉)》之銘言:
: ※ 引述《aweila75 (David)》之銘言:
: : 9.下列何種排程演算法不可能導致飢餓現象:
: : a.FIFO b.FILO c.SJF d.Longest Job First
: : 答案應該是d吧?
: 應該是d沒錯
: : 11.網路卡位於OSI哪一層?
: : a. 2 b. 3 c.4 d.5
: : 答案是a嗎?
: 網路卡屬於第二層
: : 13.下列何種裝置不是OSI第一層裝置?
: : a.Hub b.Transceiver c.bridge d.repeater
: : (不知道)
: c.bridge應該是屬於第二層才對
: : 16.下列何者是使用動態連結的優點?
: : a.較小的執行檔案 b.較短的執行時間 c.較容易維修 d.較依賴外部檔案
: : 答案是a吧?
: : 18.what is the lower bound of comparison sorts under the von neumann
: : architecture?
: : a. O(n^2) b.O(nlogn) c.O(n) d.O(logn)
: : 好像知道他問什麼又好像不知道,我覺得答案是d?
: : 煩請解釋題目一下。
: 假如是用"比較"的演算法排序最快的時間是多少
: 所以是b.0(nlogn)
^^^^^^^^^^^ 為什麼不是d?
: 這題跟資料結構有關
: : 3.Suppose the access times for main memory and cache are 50 ns and 5 ns,
: : What is the overall average memory access time if the cache hit rate is 80%?
: : 我算是11不知道對嗎?
: 5 * 0.8 + (5+50)*0.2 = 15ns
: 假如在cache沒抓到就必須去memory抓
: 但一定會先去cache搜尋過一遍才知道
: 所以才是(5+50)
嗯!其實這題是我答案算好加法加錯了=.=
: : 5.(a)What are the phases (in correct order) in the compilation processo f
: : converting a C program into an executable binary program?
: : (b) In which phase of part(a), may an assembler be used?
: : (c) What are the roles of loader and linker in staring up an executable
: : program?
: : (a)語彙分析階段→語法分析階段→解釋階段→與機器無關的最佳化階段→儲存位置的
: : 分配階段→數碼產生階段→組合及輸出階段
: : (答案是這個嗎?)
: 沒錯
: : (b)???請解答ꄊ: 應該是需要
: 網路上搜尋一下就知道了
: : (c)linker是將編譯過的程式連結其他子程式與程式庫,產生可執行模組。
: : loader是在linker完成可執行模組後將其載入主記憶體執行的角色。(這題沒寫錯吧?)
:
感謝解答。
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 218.162.126.6
推 Daiblo2:題目有寫"comparsion sort"就是限定要用"比較"的演算法才 04/21 00:41
→ Daiblo2:行 像radix sort就不行 而"比較"的時間最快是O(nlogn) 04/21 00:41
推 aweila75:樓上的老大,我終於懂你說的"比較"的意思了!我懂了感恩 04/21 22:31
推 Daiblo2:假如沒唸過資結 可能會比較難以理解我的話 04/21 22:41
推 aweila75:恩,我是轉科生,資料結構是自己讀的所以比較笨,抱歉 04/22 09:03
推 Daiblo2:不知你要轉大二還是大三 這些題目轉大二來說難了點 04/22 18:29
推 Daiblo2:抱歉推錯了^^ 04/22 19:46
→ aweila75:大二。你是不是打錯打成大二阿? ^^^^ 還是我會錯意呵 04/22 22:43
→ Daiblo2:不用管我上面推文啊 那是打錯^^ 04/23 11:56