logo

Crowdly

Suppose we want to implement a concurrent hash table that uses open addressing t...

✅ The verified answer to this question is available below. Our community-reviewed solutions help you understand the material better.

Suppose we want to implement a concurrent hash table that uses open addressing to resolve collisions. Recall the following:

  • Open addressing checks the array index at the hash function and if it is not available, moves ahead according to some rule until it finds an empty spot in the array.
  • Recall also that two commonly used rules for finding the empty array slot are:

    1. Linear probing: First check the hashed index i and if it is occupied, then move to index i+1 modulo the size of the array and so on recursively until an open spot is found.
    2. Quadratic probing: First check the hashed index i and if it is occupied, then move to index i^2 modulo the size of the array and so on recursively until an open spot is found.

  • Linear probing makes it easy to implement a search, but increases clustering, whereas quadratic probing increases the difficulty of implementing a search, but reduces clustering.

With all of this in mind, which of the following approaches to implementing the concurrent hash table do you expect will perform best in terms of turnaround time?

More questions like this

Want instant access to all verified answers on moodle31.upei.ca?

Get Unlimited Answers To Exam Questions - Install Crowdly Extension Now!