課程名稱︰計算機與網路
課程性質︰必修
課程教師︰黃乾綱
開課學院:工學院
開課系所︰工程科學與海洋工程學系
考試日期(年月日)︰96/1/15
考試時限(分鐘):120
是否需發放獎勵金:是
(如未明確表示,則不予發放)
試題 :
Please explain your answer as clearly as possible. Do NOT provide your
final result ONLY.{每題10分}
1. (Chap 5)
a. (3%) A computer uses isolated I/O addressing. Memory has 2^8 words.
If each controller has 8 register, how many controller can be
accessed by this computer?
b. (3%) A computer uses memory-mapped I/O addressing. The address bus
uses 11 lines (11bits). If memory is made of 2000 words, how
many four-register controllers can be accessed by this computer?
c. (2%) Which device has circle track, which has spiral track? Hard disk
or CD-ROM.
d. (2%) What is the machine cycle? Describe the operation of each steps.
2. (chap 5)
a. What determine the number of wires of Address bus, Data bus and Control
bus?
b. Given the following picture. Execute the program in the memory. How do
the values change in all registers(R1,R2,R3,I,PC) while executing the
4 instructions from address 070~073?
_________Data bus_____
∣ ∣
∣ ∣
--- --------
∣ R1 ∣ 070 ∣ Load 200 R1 ∣
——— ————————
——— ————————
∣ R2 ∣ 071 ∣ Load 201 R2 ∣
——— ————————
——— ————————
∣ R3 ∣ 072 ∣ Add R1 R2 R3 ∣
——— ————————
——— ————————
∣ I ∣ 073 ∣ Store 202 R3∣
——— ————————
_____∣ .
.
.
————— ————————
∣ PC ∣ 200 ∣ +25 ∣
————— ————————
∣ ————————
∣ 201 ∣ -13 ∣
∣ ————————
∣ ————————
∣ 202 ∣ ∣
∣ ————————
∣____________∣
Address bus
3. (chap 6) Please fill in the blanks in descriptions with the answer in
options.
______________________________________
Descriptions
﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉
The _(1)_ layer is designed to control the dialog between users.
The _(2)_ layer is responsible for source to destination (end-to-end)
delivery of the entire message.
The _(3)_ layer is reponsible for transmitting a bit stream over physical
medium.
The _(4)_ layer organize bits into logical units called frames.
The _(5)_ layer is responsible for node to node delivery of a frame between
two adjacent stations
The _(6)_ layer is concerned with the syntax and semantics of the information
exhanged between two systems.
The _(7)_ layer enables the user to access the network.
Routers operate at the _(8)_ layers of the OSI model.
IP (Internet Protocol) defined at the _(9)_ layer.
TCP and UDP defined at the _(10)_ layer.
______________________________________
4. (Chap 6)
a. (3%) If we found a large amount of traffic on a long bus LAN.
What can be done to alleviate the situation?
b. (2%) The IP address of NTU WWW is 140.112.8.130. Convert it into binary
notations.
c. (2%) Explain why the length of current IP address (IPv4) is not enough
for 3G cell phone?
d. (3%) Extract the values of method, host and port from the following
URL: telnet://ptt.cc:3000.
5. (Chap 5,6,7,9) Explain the difference between the two terminologies
a. Programmed I/O vs. Interrupt-driven I/O
b. Repeater vs. Bridge
c. RISC vs. CISC
d. Batch system vs. Time-sharing system
e. Assembler vs. Complier
6. (Chap 7)
a. What is the Deadlock? Give your explanation and describe the four
neccrssary conditions for deadlock.
b. What is the Starvation?
7. (Chap 7) A multiprogramming system uses paging. The available memory is
128MB, and ezch frame is 4MB. The first program needs 47MB.
The third program needs 33MB.
a. How many pages are unused?
b. What is the total memory wasted?
8. (Chap 7) Given the following state diagram with the boundaries between
a program, a job, and a process. Please explain the situations.
(1) (2) (3), at what condition the process will leave running
state or waiting state.
Inactive on the disk
∣ ↑
∣ ∣
↓ ∣
Hold Terminated
∣ ↑
enter the memory∣ Exit∣
--------------------------------------------------------------------------
Process ↓ Get access to CPU ∣
Ready ——————————→ Running
↖ ↖__________╱ ╱
╲ (1) ╱
╲ ╱
(3) ╲ ╱(2)
╲ ╱
╲ ╱
╲ ↙
Waiting
9. (Chap 8) Please explain the process of Insertion Sort algorithm, and use
the Insertion Sort to sort the following sequence, step by step.
[25, 37, 8, 12, 54, 64, 37, 5]
10. (Chap 8) Please write a recursive algotithm to implement the following
function:
︴1 ,if k=0 or n=k
sombination function: C(n,k)=︴
︴C(n-1,k)+C(n-1,k-1) ,if n>k>0
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 61.228.137.226