Ok, I think I got this part. You are right, the allocate will skip locked entries (if a writer asks for the entry). So, I think I can experiment a bit by removing the "waitUnlocked" call in free.

But, do you think that there is still a race condition between a writer and a reader (while the reader is locking the file entry).
Like here?:

![image](https://cloud.githubusercontent.com/assets/1098011/2870433/a1afe02c-d2c6-11e3-85b6-f800ab3c1047.png)


Putting the entries.put statement inside the synchronized block for the writer could resolve this race condition