馨小妞>試卷(2022/01/14)

中山◆資工◆作業系統與資料結構題庫 下載題庫

106 年 - 106 國立中山大學_碩士班招生考試_資工系(甲組):作業系統與資料結構#105790 

選擇:0題,非選:13題 我要補題 回報試卷錯誤
【非選題】
1.

1. What would be the output of the following C program that uses the Ptbreads API? (Note that the line nunbers are for reference only.)61e130c2229ca.jpg



【非選題】
2.
2. Assume a page reference string for a prucess with m framcs (initially all emply). The page reference string has length n with p distinct page numbers occurring in it. For any page-replacemnent algorithms.

【題組】(a) What is an upper bound on the number of pige faults?


【非選題】
3.【題組】(b) What is a lower bound on the number of page faulls?

【非選題】
4.3. A computer whose proces esses have 2048 pages in their acldress spaces keeps its page tables in memory. The overhead required for reuding a w word from the pige table is 600 nsec. To reduce this overhead, the computer has a TLB, which holds 64 (page. frame) pairs and can do a lookup in 100 nsee. What hil rate is needed to reduce the mean overhead to 200 nsee or less

【非選題】
5.
4. Givcn a UNIX i-node with ten direet biocks and tihree icveis of indireet biocks (i.c.. a singic. a double, and a triple) and assuming that the sizes of a pointer and a block are, respectively. 8 bytes and 8 Kbytes, answer the following questions.

【題組】 (a) What would be the size of the smallest file allowed in bytes?


【非選題】
6.【題組】(b) What would be the size of the largest file allorwed in bytes?

【非選題】
7.
5. A disk has 24000 cylinders, cach with 16 tracks of 512 blucks. A seck takes I ns per cylinder moved. II' no attempt is made to put the hioks of a lile close to each otber. two blocks that are logically consecutive (i.c.. follow one another in the file) will require aun averragc seck. which tikes 6 mis. If. however. the operating system makes un attempt to cluster selated blocks. the meun interblock distancc c:ul be reduced lo 2 cylinders and the seek time seduced to 200 jas. Assuming that the rotational laleney is 3 mi and the transfer time is 10 ps per block, answer the following questions.

【題組】 (a)How long does it take to sead a 300 block randomly placed file?


【非選題】
8.【題組】(b) How long does it take to read a 300 block clustered file?

【非選題】
9.6. Derlare in a single statement in C a pointer "p" w the arriy "int a [256] :" so ha p [1] is an alias of a [0]. p[2] is an alias of' a [1] , and so on, all the way up so that p [256] is an alias of a [255]

【非選題】
10.

7. I The Ackermann Function . 1(mt.. ) is definedl reeursively for non-negative inegers s and n as Follows:
61e131756f442.jpg
Its value grows very quickly, even for small values of m and n. For insiance. .A( 1. 1) = 65833. What would
be the value of .A(2.3)?



【非選題】
11.

8. Assuming n = 2'". write out the closed form solution for the recurrence relation 61e131a829473.jpg



【非選題】
12.9. Analyze the behavior of QUICKSORT in the case where a schizoplrenic advetsary picks the best pos- sible splitter (partitioning element) instead of the worst, every other time (ie., he alternates between best aund worst). What running time is induced by this "adversary?"

【非選題】
13.10. Transform the following expression to prefix and postfix. 
(A+B)*(C+D-E)*F


懸賞詳解

國一地理下第一次

◎下表為某集團在旗下紡織業的徵才訊息,請回答 24-25 題:【題組】24.根據徵才訊息,該公司徵求的工作類型 應屬於哪一級產業? (A)第一級 (B)第二...

50 x

前往解題

106 年 - 106 國立中山大學_碩士班招生考試_資工系(甲組):作業系統與資料結構#105790-阿摩線上測驗

106 年 - 106 國立中山大學_碩士班招生考試_資工系(甲組):作業系統與資料結構#105790