IPA FE Subject A sample Question 17
A question IPA Japan published in 基本情報技術者試験 科目A サンプル問題 問17, translated into English. ITPEC is based on the same exams.
When file areas are allocated on three media A through C under the conditions below, which of the following lists the media in descending order of the total amount of the allocated areas?
[Conditions]
Explanation
C, B, A — give each request to the medium with the most free space, which is the medium with the least allocated so far, since all have the same capacity.
Largest total first: C 110, B 100, A 90.
Answer (d)
Why not others:
- •(a) — the order in which the media were first used, not the totals; A takes the first 90 MB but nothing after it
- •(b) — puts A first, but its single 90 MB area is the smallest total; after the first request A always has the least free space and gets nothing more
- •(c) — puts C last, but C ends with the largest total, 110 MB, because it took the 70 MB request when it had the most free space
Key rule: With equal capacities, "largest free area" means "least allocated so far": track the running totals and break ties by the stated order.
Software · AI-written, may contain errors
This question comes from the past questions IPA Japan publishes, translated into English by ITPEC Practice. ITPEC Practice is an independent study tool and is not affiliated with IPA or ITPEC. See the original paper (PDF) or Report an issue.