File Addressing Techniques Which computational technique is commonly used to compute the storage address of a record in a direct-access file?

Difficulty: Easy

Correct Answer: Hashing

Explanation:


Introduction / Context:
Direct-access file organizations and many database indexes use a transformation from a record key to a storage location. The core idea is to quickly compute where a record should reside without scanning the file sequentially.


Given Data / Assumptions:

  • A key value (e.g., account number) exists for each record.
  • We desire average constant-time access to insert/find operations.
  • Collisions may occur and must be resolved.


Concept / Approach:
Hashing applies a deterministic hash function to the key to produce a bucket or slot address. Techniques such as modulo arithmetic, multiplicative hashing, or stronger hash functions map the key space to storage locations. Collision resolution uses chaining or open addressing (linear/quadratic probing, double hashing).


Step-by-Step Solution:
Choose a hash function h(key) that distributes keys uniformly.Compute address = h(key) mod table_size (or bucket index).If occupied, apply collision strategy; otherwise place/find the record.


Verification / Alternative check:
Performance analysis shows average O(1) expected access with well-chosen hash functions and load factors, validating hashing as the standard technique for direct addressing in many systems.


Why Other Options Are Wrong:
Bubble memory: a storage technology, not an addressing technique.Key fielding: vague term; not the computational mapping method itself.Dynamic reallocation: concerns memory management, not computing addresses.


Common Pitfalls:

  • Poor hash function choice causing clustering.
  • Ignoring load factor, which degrades performance.


Final Answer:
Hashing.

More Questions from Operating Systems Concepts

Discussion & Comments

No comments yet. Be the first to comment!
Join Discussion