Introduction to Term Paper on Distributed Operating Systems on Locking In the Multithreaded Free BSD Kernel:
The main objective of this paper is to give idea of locking in the multithreaded free BSD kernel. There is SMP support in free BSD and kernel in this is referred as SMPng . Generally, this SMP should allow multiple threads to be executed in the kernel concurrently. But the problem if the kernel is given concurrent access is there data structures are corrupted if two concurrent threads attempt to modify the same shared data structure. Hence MP capable CPU’s are used to solve these problems.
Brief into Distributed Operating Systems on Locking In the Multithreaded Free BSD Kernel
Generally, in SMP the synchronization primitives like mutexes, condition variables, shared/exclusive locks, and semaphores are introduced first. Then the spin mutex which is used for protecting the scheduler queues, sleep queues, etc and sleep mutex are added. Next the interrupt handlers are placed into the interrupt threads. The MP capable CPU’s uses two mechanisms they are atomic operations and memory barriers.
In atomic operation, CPU performs such that all the results are made visible to other CPU’s. Atomic operations are used as best building blocks for higher level synchronization primitives because of the reason that they can modify only one variable. Memory barriers are used to control the memory accessing order.
Two tools are specified for lock diagnosing they are lock assertions and witness. In this lock assertion one can assert the recursive/non-recursive lock to thread if it does not own a lock. In witness, the order in which locks are acquired is checked.
Download Term Paper on Distributed Operating Systems on Locking In the Multithreaded Free BSD Kernel.