当前位置:文档之家› 计算机体系结构(深入理解计算机系统)样卷

计算机体系结构(深入理解计算机系统)样卷


19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
(d) Address translation
Parameter
VPN TLB Index TLB Tag TLB Hit? (Y/N) Page Fault? (Y/N) PPN
Value
(hex) (hex) (hex)
(d) ( ) When a client and a server connect each other through the Internet, they are uniquely identified by the MAC address and port pair.
(e) ( ) In different C compilers, we always see the same number of bytes allocated for long integer (long int) type.
In the following tables, all numbers are given in hexadecimal. The contents of the TLB and the page table for the first 32 pages are as follows:
Index 0
.
(b) An approach is known as
whenever the memory perform
write-operations immediately after the cache updates its copy of a desired word
w.
(c) “CISC” is short for for
i “exam-sample” — 2009/6/15 — 0:15 — page 1 — #1
i i
úôÆ 200x-200x ÆcgGÆÏ
5OÅNX(¨6§Ï"ÁÁò (ò)
mƵ>íÆ Á/ªµmò #N áu<Ö7!)P!>f`; \|
Ámµ2006 c 6 x F ¤Imµ120 ©¨
i “exam-sample” — 2009/6/15 — 0:15 — page 3 — #3
i i
Computer Architecture Final Exam (Sample) (Page 3 of 8)
June. x, 2006
• The TLB is 4-way set associative with 16 total entries.
(a) The box below shows the format of a virtual address. Indicate (by labeling the diagram) the fields (if they exist) that would be used to determine the following: (If a field doesn’t exist, don’t draw it on the diagram.) VPO The virtual page offset VPN The virtual page number TLBI The TLB index TLBT The TLB tag
(f) ( ) Both threads and processes share their codes and data in Unix/Linux programs.
(g) ( ) The most commonly used hardware description languages are Verilog, having a syntax similar to the Ada language, and VHDL, having a syntax similar to C language.
(h) ( ) If we have a instruction pipeline with nonuniform stage delays, then the system throughput is determined by the speed of the fastest stage.
(i) ( ) We can say that “network byte order” is the same as “big-endian byte order” which is defined as the least significant byte has the lowest address.
, and “RISC” is short .
(d) In order to run myprog.c which begins with “include ‘‘csapp.h’’” in Linux
system, we should type a compiling command gcc -c myprog.c; and a linking
4(%eax) 9(%eax, %edx) 260(%ecx, %edx) 0xFC(, %ecx, 4) (%eax, %edx, 4)
Value
4. (20%) The following problem concerns the way virtual addresses are translated into physical addresses.
(j) ( ) When an arithmetic/logic instruction is executed, it always sets the condition codes.
i “exam-sample” — 2009/6/15 — 0:15 — page 2 — #2
i i
Computer Architecture Final Exam (Sample) (Page 2 of 8)
00 7 1 10 6 0 01 8 1 11 7 0 02 9 1 12 8 0 03 A 1 13 3 0 04 6 0 14 D 0 05 3 0 15 B 0 06 1 0 16 9 0 07 8 0 17 6 0 08 2 0 18 C 1 09 3 0 19 4 1 0A 1 1 1A F 0 0B 6 1 1B 2 1 0C A 1 1C 0 0 0D D 0 1D E 1 0E E 0 1E 5 1 0F D 1 1F 3 Valid
03 B 1 07 6 0 28 3 1 01 F 0 31 0 1 12 3 0 07 E 1 0B 1 1 2A A 0 11 1 0 1F 8 1 07 5 1 07 3 1 3F F 0 10 D 0 32 0 0
Page Table VPN PPN Valid VPN PPN Valid
(hex)
(e) Physical address format (one bit per box)
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
command
.
3. (8%) Assume the following values are stored at the indicated memory addresses and registers:
(a) Memory
Address Value 0x100 0xFF 0x104 0xAB 0x108 0x13 0x10C 0x11
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
For the given virtual addresses, indicate the TLB entry accessed and the physical address. Indicate whether the TLB misses and whether a page fault occurs.
i “exam-sample” — 2009/6/15 — 0:15 — page 4 — #4
i i
Computer Architecture Final Exam (Sample) (Page 4 of 8)
June. x, 2006
If there is a page fault, enter “-” for “PPN” and leave (e) blank. Virtual address: 7E37C (c) Virtual address format (one bit per box)
(b) ( ) In Unix/Linux system, all input/output devices such as disks, printer, keyboard, etc. are represented as files.
(c) ( ) If we are going to obtain executable file aaaa from the source file test.c we just type “gcc -o test.c” in the Linux system.
)6¶µ
ÆÒµ

̵ XXX
µKò©S< 1 2 3 4 5 6 7 8 o©
Zhejiang University Computer Architecture, Summer 2006
Final Exam
1. (10%) Determine whether the following statements are true or false. If it is true write a otherwise a × in the bracket before the statement.
June. x, 2006
2. (10%) Fill in the blanks.
相关主题