@Shubhgupta
you are not wrong,if read lock or write lock would be acquired explicitly.
but here there is is no individual read/write lock. only one lock is there for both the operations
after acquiring what they are doing is not visible outside, so we can't say na, that okay this time laurel is reading the file1, let's share this lock to hardy,,... or next time it is writing on file1, it can't be shared. this solution would create complicacy. isn't it?
i think this is one possible explanation to your doubt. :)