1. A method of locking variables comprising: assigning a variable protected by a single lock to a memory page; creating a local copy of the memory page; locking the memory page; allowing a process to access the local copy of the memory page; returning an exception that is handled by an exception handler when an additional process attempts to access the memory page; after the process is finished with the local copy of the memory page, copying the local copy of the memory page to the memory page; and unlocking the memory page.