Consider a system where each file is associated with a 16-bit number. For each…
2014
Consider a system where each file is associated with a 16-bit number. For each file, each user should have the read and write capability. How much memory is needed to store each user's access data?
Answer: A. 16 KB — Concept. A permission is a yes/no flag, so a single right costs exactly one bit of storage. An identifier of n bits can name 2n distinct objects. Therefore…
- A.
16 KB
- B.
32 KB
- C.
64 KB
- D.
128 KB
Attempted by 383 students.
Show answer & explanation
Correct answer: A
Concept. A permission is a yes/no flag, so a single right costs exactly one bit of storage. An identifier of n bits can name 2n distinct objects. Therefore one user’s complete access record occupies (number of objects) × (bits of rights kept per object) bits; divide by 8 for bytes and by 1024 for kilobytes.
Application.
The identifier is a 16-bit number, so the system can name 216 = 65,536 files.
Each user needs one read flag and one write flag for every file: 2 rights × 1 bit = 2 bits per file.
Bits per user = 65,536 files × 2 bits = 131,072 bits.
Bytes per user = 131,072 ÷ 8 = 16,384 bytes.
Kilobytes per user = 16,384 ÷ 1024 = 16 KB.
Cross-check. Two bits are one quarter of a byte, so the record is 65,536 ÷ 4 = 16,384 bytes — the same 16 KB reached without ever converting to bits.
Contrast. The size depends entirely on how tightly the two rights are packed:
Bits kept per file | Memory per user |
|---|---|
2 bits (read + write, bit-packed) | 16 KB |
4 bits | 32 KB |
8 bits (one whole byte per file) | 64 KB |
16 bits (two bytes per file) | 128 KB |
Bit-level packing of the two rights is what keeps the per-user record at 16 KB; padding each file’s rights out to a whole byte or more inflates it.