Introduction
2022 SA am1
01-02: https://blog.yexca.net/archives/184
03-05: https://blog.yexca.net/archives/185
06-10: https://blog.yexca.net/archives/186
11-15: https://blog.yexca.net/archives/189
16-30: https://blog.yexca.net/archives/190
Ramblings
Mondays are always a drag. After the weekend, it’s hard to get into the groove. But for some reason today, my mood suddenly flipped from feeling almost depressed to being super optimistic—even though I didn’t actually do anything. Emotions and mental states are weird.
So, I slacked off a bit today and almost skipped writing this. But this paper has 30 questions; at my current pace, it’s going to take at least half a month to finish. :cry:
Question 3
ポログラム言語のうち、ブロックの範囲を指定する方法として特定の記号や予約語を用いず、等しい文字数の字下げを用いるという特征をもつものはどれか。
ア C
イ Java
ウ PHP
エ Python
Translation: Which programming language is characterized by using indentation of a specific number of characters to define the scope of a code block, rather than using specific symbols or reserved words?
Clearly Python, which is option エ.
Question 4
キャッシュメモリのアクセス時間が主記憶のアクセス時間の1/30で、ヒット率が95%のとき、実効メモリアクセス時間は、主記憶のアクセス時間の約何と何倍になるか。
ア 0.03
イ 0.08
ウ 0.37
エ 0.95
This question tests Effective Memory Access Time (EMAT), calculated using the following formula:
$$ EMAT = Cache Access Time \times Hit Rate + Main Memory Access Time \times Miss Rate $$Let Main Memory Access Time = $T$. Then Cache Access Time = $\frac{T}{30}$. From the question, Hit Rate = 95%, so Miss Rate = 5%.
So, $EMAT = \frac{T}{30} \times 95\% + T \times 5\% \approx 0.08T$. The answer is option イ.
To be honest, I’ve forgotten most of my computer organization coursework, so I had to brush up on this.
Question 5
プロセッサ数と、計算処理におけるプロセスの並列化が可能な部分の割合とが、性能上へ及ぼす影響に関する記述のうち、アムダールの法則に基づいたものはどれか。
ア 全ての計算処理が並列化できる場合、速度向上比は、プロセッサ数を増やしてもある水準に漸近的に近づく。
イ 並列化できない計算処理がある場合、速度向上比は、プロセッサ数に比例して増加する。
ウ 並列化できない計算処理がある場合、速度向上比は、プロセッサ数を増やしてもある水準に漸近的に近づく。
エ 並列化できる計算処理の割合が増えると、速度向上比は、プロセッサ数に反比例して減少する。
Translation: Regarding the impact of the number of processors and the proportion of parallelizable parts of a computation on performance, which description is based on Amdahl’s Law?
ア: If all computation can be parallelized, the speedup ratio will asymptotically approach a certain level even if the number of processors is increased.
イ: If there is computation that cannot be parallelized, the speedup ratio increases proportionally with the number of processors.
ウ: If there is computation that cannot be parallelized, the speedup ratio will asymptotically approach a certain level even if the number of processors is increased.
エ: As the proportion of parallelizable computation increases, the speedup ratio decreases in inverse proportion to the number of processors.
To solve this, you need to know Amdahl’s Law. It describes how the degree of parallelization in a program limits the performance gain from adding more processors. It states that the non-parallelizable portion of the program will eventually bottleneck the performance improvement. The formula is:
$$ S(N)=\frac{1}{(1-P)+\frac{P}{N}} $$Where:
- $S(N)$ is the speedup ratio using $N$ processors.
- $P$ is the proportion of the program that can be parallelized.
- $N$ is the number of processors.
Based on this, the answer is ウ.