Added critical section, an OS concept that provides some form of mutaal exclusin, but does not prevent deadlocks.