データの読み書きが高速な順に左側から並べたものはどれか。
平成23年度 秋期 ITパスポート試験 問79
This question's explanation and your answers so far.
問 79
Incorrectア
This option gives the order main memory, secondary storage, register, which badly mistakes the actual speed relationships. It places the register, which should be the fastest, in the slowest position, and apart from the correct part that secondary storage is slower than main memory, nothing about it holds up. A register is inside the CPU and can be read from and written to at the same speed as the clock, making it the fastest storage device, so it cannot possibly be slower than secondary storage, which is an external device. This order does not match the order by capacity from largest to smallest either (secondary storage, main memory, register), so from any point of view it is not the correct arrangement.
Incorrectイ
This option gives the order main memory, register, secondary storage, so the first two are swapped. Main memory is semiconductor memory outside the CPU, and when the CPU accesses it, address specification and transfer over the bus are required, so it is necessarily slower than a register inside the CPU. A register is storage that the arithmetic unit refers to directly, and it sits at the very top of the memory hierarchy. Placing secondary storage last is correct, but because the order of the register and main memory is reversed, this option is wrong.
- ウ
正解 The correct answer is ウ. A computer does not use just one kind of storage device; it combines several devices that differ in speed, capacity, and price. This is called the memory hierarchy: the closer a device is to the CPU, the faster it is, but the smaller its capacity and the higher its unit price (the price per bit), while the farther a device is from the CPU, the slower it is, but the larger its capacity and the cheaper its unit price. Arranging the three devices in this question in order of closeness to the CPU, that is, from fastest to slowest, gives the following. First is the register. It is a storage circuit inside the CPU itself, and it temporarily holds the data, instructions, and addresses used in operations. It can be accessed at the same speed as the CPU's operating clock and is the fastest of all storage devices, but its capacity is only about several tens to several hundreds of bytes. Second is main memory. It is semiconductor memory (DRAM) that holds the programs being executed and the data being processed, and the CPU can read from and write to it directly. It is slower than a register, but faster than secondary storage by orders of magnitude, and it is volatile, so its contents are lost when the power is turned off. Third is secondary storage. It refers to SSDs, hard disks, optical discs, and the like, and it stores programs and files for the long term. It is non-volatile, so its contents are not lost when the power is turned off, and it offers large capacity at a low price, but its access speed is far slower than that of main memory. The CPU cannot read from or write to it directly; the data must first be loaded into main memory and then processed. Therefore, arranged from the left in order from fastest to slowest, the order is register, main memory, secondary storage, so ウ is correct. Incidentally, what is placed between main memory and the register to bridge the speed gap between them is cache memory, and for the hierarchy as a whole the order is register, cache memory, main memory, secondary storage.
Incorrectエ
This option gives the order register, secondary storage, main memory. Placing the register first is correct, but the last two are swapped. Secondary storage consists of external storage devices such as SSDs and hard disks; in exchange for retaining its contents when the power is turned off, its access speed is far slower than that of main memory. The CPU cannot read from or write to secondary storage directly, and it must first load the required programs and data into main memory before processing them. This relationship also makes it clear that main memory is faster than secondary storage, so this arrangement is wrong.
- The order of the memory hierarchy — from fastest to slowest: register, cache memory, main memory, secondary storage. The closer to the CPU, the faster, smaller in capacity, and more expensive (a higher price per bit); the farther away, the slower, larger in capacity, and cheaper. These form a trade-off relationship, and combining them makes it possible to achieve both speed and low cost.
- The role of each storage device — a register is the fastest storage, holding the operands inside the CPU. Main memory is volatile semiconductor memory that holds the programs and data being executed, and the CPU reads from and writes to it directly. Secondary storage consists of non-volatile, large-capacity devices such as SSDs and hard disks; the CPU cannot handle them directly, so the data is loaded into main memory before being processed. Cache memory is fast buffer memory that bridges the speed gap between the register and main memory.