Patent ID: 8589937

Claim:
A computer system defining first and second virtual machines and a memory shared by said first and second virtual machines, said computer system comprising: a filesystem cache in said shared memory; a lock structure in said shared memory to record which virtual machine, if any, currently has an exclusive lock for writing to said filesystem cache; said first virtual machine includes a first program function to acquire said exclusive lock when available by manipulation of said lock structure, and a second program function active after said first virtual machine acquires said exclusive lock, to write to said filesystem cache, said lock structure being directly accessible by said first program function, said filesystem cache being directly accessible by said second program function; and said second virtual machine includes a third program function to acquire said exclusive lock when available by manipulation of said lock structure, and a fourth program function active after said second virtual machine acquires said exclusive lock, to write to said filesystem cache, said lock structure being directly accessible by said third program function, said filesystem cache being directly accessible by said fourth program function; wherein said first and second program functions reside in a memory private to said first virtual machine such that said second virtual machine cannot invoke said first or second program functions, and said third and fourth program functions reside in a memory private to said second virtual machine such that said first virtual machine cannot invoke said third or fourth program functions; said lock structure also records which virtual machine, if any, currently has a nonexclusive lock for reading from said filesystem cache; said first program function can acquire said nonexclusive lock when available by manipulation of said lock structure, and said second program function is active after said first virtual machine acquires said nonexclusive lock to read from said filesystem cache; and said third program function can acquire said nonexclusive lock when available by manipulation of said lock structure, and said fourth program function is active after said second virtual machine acquires said nonexclusive lock to read from said filesystem cache.