A Cloud Filesystem With Locking Service Yijie Ma Carnegie Mellon University ABSTRACT The consistency of sharing file is always a concern when the file is written or read by multiple clients at the same time. If a locking mechanism is not used, then the last-writer-win situation may occur so that the previous writing will be lost. Systems that cannot withstand this situation such as an online banking system needs a locking service to keep track of all operations on shared resource, keep them in order and do not miss one of them. The author of this paper tries to solve this problem under the situation when a single datastore is shared by multiple clients. The system developed by the author is a cloud filesystem using Amazon S3 as datastore and a locking server which uses reader-writer lock to maintain the consistency of the file on S3. The first part of this paper presents the detail of the system architecture. The second part presents design of different parts and two reader-writer lock algorithms and compare them in terms of wakeup latency and writer starvation issues.