[理工] [計系]-師大100-資工
第四題我想要觀念釐清
4.The processing times needed for the five stages in a pipelined datapath are
400ps, 150ps, 200ps, 350ps,and 150ps,respectively.A register with 50ps
access time is needed between consecutive stages.
(a) What is the fastest clock frequency this datapath can operate?
(b) What is the maximum speed-up when compared to the single cycle
implementation of the datapath?
請問(a)小題是要直接算整個IF,ID,EX,MEM,WB的clock frequency為1450ps,還是要比較
lw,R-type,branch指令誰執行最少的clock?
(b)小題的single cycle是取決於最大指令clock cycle 還是說取決於最大執行stage
400ps然後再乘以五(個stages)?
第11題我就真的不太會了
11.Buffer overflow is one of the most common attack to operating systems.
Please explain how a hacker can use the code below to gain a system shell
and enter the system.
#include <stdio.h>
#define BUFFER_SIZE 256
int main(int argc, char *argv[])
{
char buffer[BUFFER_SIZE];
if (argc < 2)
return -1;
else {
strcpy(buffer,argv[1]);
return 0;
}
}
他給的圖:
bottom _____________ frame pointer
∣ ∣ return address ∣ ←—————
∣ ∣————————————∣
∣ ∣ saved frame pointer ∣
∣ ∣————————————∣
∣ ∣ ∣
∣ ∣————————————∣
∣ ∣automatic variables ∣
∣ ∣————————————∣
↓ ∣ parameters ∣
top ∣____________∣
請高手幫幫忙
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 175.98.50.200
推
02/06 22:13, , 1F
02/06 22:13, 1F
→
02/06 22:15, , 2F
02/06 22:15, 2F
→
02/06 22:15, , 3F
02/06 22:15, 3F
推
02/06 22:19, , 4F
02/06 22:19, 4F
→
02/06 22:20, , 5F
02/06 22:20, 5F
→
02/06 22:21, , 6F
02/06 22:21, 6F
→
02/06 22:22, , 7F
02/06 22:22, 7F
→
02/06 22:22, , 8F
02/06 22:22, 8F
→
02/06 22:22, , 9F
02/06 22:22, 9F
推
02/06 22:25, , 10F
02/06 22:25, 10F
→
02/06 22:25, , 11F
02/06 22:25, 11F
→
02/06 22:50, , 12F
02/06 22:50, 12F
→
02/06 22:51, , 13F
02/06 22:51, 13F
→
02/07 11:05, , 14F
02/07 11:05, 14F
→
09/11 14:53, , 15F
09/11 14:53, 15F