• 沒有找到結果。

99學年度資訊工程系碩士班招生試題

N/A
N/A
Protected

Academic year: 2021

Share "99學年度資訊工程系碩士班招生試題"

Copied!
2
0
0

加載中.... (立即查看全文)

全文

(1)

1. Please explain the following terminologies:

(a) Belady's anomaly (5%) (b) Convoy effect (5%) (c) Race condition (5%)

2. Answer the following questions briefly.

(a) Explain von Neumann architecture. (5%) (b) Explain the concept of RISC. (5%)

(c) Explain how the number of stage of a pipeline may affect its throughput without considering the effect of all kinds of hazards? (5%)

3. Given a classic processor that uses flat 16-bit address space and is equipped with 64KB main memory and 1KB 2-way set associative cache with each block being 4 words long (1 word = 16 bits).

(a) What is the bit length of the tag field in this cache? (10%)

(b) At least how many bytes are necessary to implement this cache? (5%) (c) If words of the following word addresses 15, 16, 1030, 103 1, 1032, 17,45,

46,4,5,260,6, 1030,103 1 are read into the processor one-by-one, how many times would this cache hit and miss? Assume that the cache is empty at the beginning. (5%)

4. Consider the following set of processes with the length of the CPU burst given in milliseconds:

(a) Draw five Gantt charts that illustrate the execution of these processes using the following scheduling algorithms: FCFS, preemptive SJF, preemptive priority (a smaller priority number implies a higher priority),

non-preemptive priority, and RR (quantum = 1). (10%) Process

f'1

, . p2 p3

P4

(b) What is the turnaround time of P4 for each of the five scheduling algorithms in part (a)? (5%)

(c) What is the waiting time of P3 for each of the five scheduling algorithms in part (a)? (5%)

Arrival Time 0 1 2 3

Burst Time 8 1 4 2

Priority 2 1 4 3

(2)

5 . Given a list of records

(Ro,

R1,

. . .,

R,1) and given the following six sorting methods: (A) bubble sort (B) quick sort (C) heap sort @) merge sort (E) radix sort Q insertion sort.

Note: Please answer the following questions by (A)(B)(C)(D)(E)(F) if possible.

(a) Explain what is "stable" property for sorting algorithm. (2%)

(b) Please list all the "stable" sorting algorithms among (A)(B)(C)(D)QQ.

(2%)

(c) Please list all sorting methods that have O(n log n) for time complexity in the "worst" case among (A)(B)(C)@)(E)(F). (2%)

6 . Consider the undirected graph shown below,

(a) Complete the (traditional) adjacency lists representation for this undirected graph. Arrange each adjacency list alphabetically. (3%)

(b) Please draw its depth-first search tree, starting at root node A (only show the discovery edges). Please consider the search path alphabetically. (3%) 7. Draw the final result after keys 5, 19,28, 15,20, 17, 10,33 are inserted into a

hash table wjth collisions resolved by (a) chaining (3%), (b) linear probing (3%).

Assume the table has eight slots with its address starts at 0, and let the hash function be h(k) = k mod 8.

8. Express the r d g time of each code fragment as a 8 function of n:

(a) (3%) (b) (3%)

for (a=l; a<=n; a++) for (a=l; a<=n; a++) for (b=l; b<=a; b++) for (b=l;b<=a; b*=2)

C++; C++;

(c) (3%) (d) (3%)

for (a=l; a<=n; a*=2) for (a=l; a<=n; a*=2) for ( b = l ; b<=a; b++) for (b=l; b<=a; b*=2)

C++; C++;

參考文獻

相關文件

• The memory storage unit holds instructions and data for a running program.. • A bus is a group of wires that transfer data from one part to another (data,

When we know that a relation R is a partial order on a set A, we can eliminate the loops at the vertices of its digraph .Since R is also transitive , having the edges (1, 2) and (2,

國立高雄師範大學數學教育研究所碩士論文。全國博碩士論文資訊網 全國博碩士論文資訊網 全國博碩士論文資訊網,

• Each student might start from a somewhat different point of view and experience the encounters with works of art and ideas in a different way... Postmodern

◉ Given an unlabeled training corpus, produce a vector for each word that encodes its semantic information. These vectors are useful because:.. 1) semantic similarity between two

Highest levels of memory hierarchy Fast: level 1 typically 1 cycle access time With luck, supplies most data. Cache

• Cell: A unit of main memory (typically 8 bits which is one byte).. – Most significant bit: the bit at the left (high- order) end of the conceptual row of bits in a

• The memory storage unit holds instructions and data for a running program.. • A bus is a group of wires that transfer data from one part to another (data,