2022 SA am2 - 21-25

📢 This article was translated by gemini-3-flash-preview

Introduction

2022 SA am2

01-08: http://127.0.0.1:4000/archives/191
09-15: http://127.0.0.1:4000/archives/192
16-20: http://127.0.0.1:4000/archives/193
21-25: http://127.0.0.1:4000/archives/194


These five questions weren’t too bad. I was feeling confident until I caught a glimpse of the afternoon essay questions—my confidence vanished instantly. :cry:

Thoughts

Thinking about the meaning of life is definitely something people only do when they have free time. Once you get busy, there’s no room for stray thoughts. Though if you’re too busy, you might start thinking about it again.

I’ve realized two of my previous shortcomings. First, I always assumed I could “review anytime.” Second, I was misusing the concept of “lifelong learning.”

Let’s start with “lifelong learning.” The concept itself is correct, but my interpretation was flawed. I used to think that because knowledge is infinite, I could never fully master anything, which led to a “know-nothing” mindset. In reality, while knowledge is endless, you don’t need to be a master of an entire field to apply it effectively. Often, mastering a specific subset is enough to handle the job.

For example, after passing an exam, I would still feel like I knew nothing and wasn’t qualified for the work. But objectively, if you’ve mastered the necessary parts, you are capable of the task. This mindset probably stems from my education—hearing things like “the world is huge,” “what you’ve learned is never enough,” or “true experts are on another level.” While this encourages learning, it made me over-focus on my deficiencies and lose confidence. I hear many students now saying “I can’t do anything,” and it might be a side effect of this mindset.

Then there’s the “I can look it up anytime” dependency. When I was studying for the JLPT N2, I read an article about how people learned before writing systems. Without written records, you might only hear a lesson once in your life, so you must memorize it. The article noted that because the internet is so convenient, we stop memorizing things. We think searchable info is our own knowledge, but if the network goes down, we actually know nothing. True knowledge is what has been internalized into memory.

In my case, I skipped memorizing things like Linux commands or specific algorithms because I thought I could just look them up. This created an illusion of competence; when I actually needed to write them, I couldn’t. That’s effectively not knowing it. This cycle reinforced that “know-nothing” feeling.

Summary: Realize that if it’s not memorized, you don’t know it. The knowledge required for a specific job or role has boundaries. You don’t need to chase absolute mastery of everything.

Writing this out feels slightly off from what I meant, and I used ChatGPT to help since my writing skills aren’t great, but there it is.

21

In a system with an instruction cache of capacity $a$ MB and access time $x$ ns, and main memory of capacity $b$ MB and access time $y$ ns, which expression represents the average access time for the main memory and instruction cache combined from the CPU’s perspective? Let $r$ be the probability that the required instruction code is not in the instruction cache (miss rate), and ignore cache management overhead.

$$ \begin{align} ア &\frac{(1-r)\cdot a}{a+b} \cdot x +\frac{r \cdot b}{a+b} \cdot y \\ イ &(1-r) \cdot x + r \cdot y \\ ウ &\frac{r \cdot a}{a+b} \cdot x + \frac{(1-r) \cdot b}{a+b} \cdot y \\ エ &r \cdot x + (1-r) \cdot y \end{align} $$

Translation/Analysis:

  1. Cache hit time is $(1-r) \times x$
  2. Cache miss time (reading from main memory) is $r \times y$

Therefore, the answer is イ.

22

Which of the following describes the “Shared Everything” characteristic in database server clustering technology?

ア Clustering configuration improves availability; in the event of a failure, data within the failed range can be taken over by a standby server.

イ Each server is responsible for specific managed data. If one server fails, the data managed by that server cannot be processed, reducing the overall system availability.

ウ Data is partitioned across multiple magnetic disks, and since there is a one-to-one correspondence between servers and disks, parallel processing can be performed using multiple servers.

エ Loads are balanced to effectively utilize resources of all servers. Additionally, by sharing data, processing can continue even if one server fails.

Analysis: Shared Everything is a database cluster architecture where all servers share the same data storage. This allows any server’s resources to access and process any data in the database, enhancing redundancy and fault tolerance. If one server fails, others take over.

  • Option ア describes a Primary/Standby (Active/Passive) architecture.
  • Option イ describes a Shared Nothing architecture.
  • Option ウ describes a Shared Disk architecture (roughly).
  • Option エ describes the Shared Everything/Resource sharing mechanism.

The answer is エ.

23

Which of the following descriptions regarding the reliability of a system composed of several subsystems is appropriate?

ア Fault masking, which prevents the impact of a fault in one subsystem from spreading to others, does not change the system’s MTBF but leads to a reduction in MTTR.

イ When a fault is detected in a subsystem, retrying may sometimes yield the correct result. Therefore, retrying leads to an improvement in the system’s MTBF and a reduction in MTTR.

ウ Fault detection performed while a subsystem is running is done without stopping the system, so it does not change the system’s MTTR but leads to an improvement in MTBF.

エ Failover, which disconnects a failed subsystem and automatically switches to a standby subsystem, does not change the system’s MTBF but leads to a reduction in MTTR.

Analysis: For systems with multiple subsystems, reliability depends on MTBF (Mean Time Between Failures) and MTTR (Mean Time To Repair/Recovery).

  • Fault Masking: Prevents faults from spreading. While it helps isolate issues, it doesn’t directly reduce the time to repair the underlying failed component as much as a failover does.
  • Retry: This is a fault-tolerance mechanism for transient errors. It doesn’t improve the system’s MTBF (the failure still happened) and doesn’t necessarily shorten the repair time.
  • Fault Detection: Detecting a fault doesn’t magically increase the time between failures (MTBF).
  • Failover: Switches a failed system to a standby one. This significantly reduces the recovery time (MTTR) by bypassing the repair process, but doesn’t change how often the subsystems fail (MTBF).

The answer is エ.

24

Transactions $T_1 \sim T_4$ are scheduled between times $t_{1}$ and $t_{10}$. A transaction wait-for graph was created just before $T_1$ issues a commit at time $t_{10}$. Which transaction corresponds to ‘a’? Here, select(X) represents referencing resource X with a shared lock, and update(X) represents updating resource X with an exclusive lock. These locks are released upon commit. In the wait-for graph, an arrow $T_i \rightarrow T_j$ indicates that $T_i$ is waiting for $T_j$ to release a lock.

(Transaction Schedule $t_1$)

Time$T_1$$T_2$$T_3$$T_4$
$t_1$select(A)
$t_2$select(B)
$t_3$select(B)
$t_4$select(A)
$t_5$update(B)
$t_6$select(C)
$t_7$select(C)
$t_8$update(C)
$t_9$update(A)
$t_{10}$commit

(Transaction Wait-for Graph)

image

ア $T_1$ イ $T_2$ ウ $T_3$ エ $T_4$

Analysis: Shared locks (S) allow multiple readers. Exclusive locks (X) block everything.

  1. At $t_5$, $T_4$ wants update(B) (X-lock). Resource B is S-locked by $T_2$ and $T_3$. So $T_4$ waits for $T_2$ and $T_3$. ($T_4 \rightarrow T_2$ and $T_4 \rightarrow T_3$).
  2. At $t_8$, $T_2$ wants update(C) (X-lock). Resource C is S-locked by $T_1$ (and $T_2$ itself). So $T_2$ waits for $T_1$. ($T_2 \rightarrow T_1$).
  3. At $t_9$, $T_3$ wants update(A) (X-lock). Resource A is S-locked by $T_1$ and $T_4$. So $T_3$ waits for $T_1$ and $T_4$. ($T_3 \rightarrow T_1$ and $T_3 \rightarrow T_4$).

Looking at the graph:

  • Transaction ’d’ is waited on by everyone but waits for no one. This is $T_1$ (it commits at $t_{10}$).
  • Transaction ‘a’ is waited on by one entity and waits for ’d’. Based on $T_2 \rightarrow T_1$, ‘a’ is $T_2$.
  • Transactions ‘b’ and ‘c’ are $T_3$ and $T_4$.

The answer is イ.

25

The diagram shows a connection configuration for integrating an internal extension network using existing telephones and a PBX into an IP network. What is the appropriate combination of devices for $a \sim c$ in the diagram?

image

-abc
PBXVoIP GatewayRouter
PBXRouterVoIP Gateway
VoIP GatewayPBXRouter
VoIP GatewayRouterPBX

Analysis:
To integrate legacy telephony into an IP network:

  • PBX (Private Branch Exchange): The core of the legacy system, handling internal calls.
  • VoIP Gateway: Converts analog/telephony signals to IP packets for network transmission.
  • Router: Forwards data packets across the IP network.

The sequence is: Telephone -> PBX (a) -> VoIP Gateway (b) -> Router (c) -> IP Network.

The answer is ア.