A Scalable Algorithm for Readers-Writers Problem