Misplaced Pages

Giant lock: Difference between revisions

Article snapshot taken from Wikipedia with creative commons attribution-sharealike license. Give it a read and then ask your questions in the chat. We can research this topic together.
Browse history interactively← Previous editNext edit →Content deleted Content addedVisualWikitext
Revision as of 17:33, 9 June 2008 edit79.114.27.129 (talk)No edit summary← Previous edit Revision as of 20:07, 26 May 2009 edit undoBeno1000 (talk | contribs)Pending changes reviewers3,659 editsmNo edit summaryNext edit →
Line 1: Line 1:
In ], '''giant lock''', which is also known as '''big-lock''' or '''kernel-lock''', is a ] which may be used to implement a ] in the kernel, which is needed for ] support. In ], '''giant lock''', which is also known as '''big-lock''' or '''kernel-lock''', is a ] which may be used to implement a ] in the kernel, which is needed for ] support.


It is an approach of single, global lock which is held when ] enters the ], for example, after a ], and released when thread returns to ]. While threads which are in the ] can run concurrently in the ], only one thread can run in the kernel space, and threads in other processors which are going to enter the kernel space have to wait. This means that giant lock eliminates all ] in kernel space. It is an approach of single, global lock which is held when a ] enters the ], for example, after a ], and released when the thread returns to ]. While threads which are in the ] can run concurrently in the ], only one thread can run in the kernel space, and threads in other processors which are going to enter the kernel space have to wait. This means that giant lock eliminates all ] in kernel space.


The main disadvantage of giant lock is that it eliminates the concurrency, thus decrease the performance on ] systems. However, the advantage of giant lock is that there is no need to modify many parts of the operating systems, thus it is easy to implement. Giant lock approach is mostly used by operating systems to implement an initial support for SMP. As an alternative to giant lock, most of the modern operating systems use ] approach. The main disadvantage of giant lock is that it eliminates the concurrency, thus decrease the performance on ] systems. However, the advantage of giant lock is that there is no need to modify many parts of the operating systems, thus it is easy to implement. Giant lock approach is mostly used by operating systems to implement an initial support for SMP. As an alternative to giant lock, most of the modern operating systems use ] approach.

Revision as of 20:07, 26 May 2009

In operating systems, giant lock, which is also known as big-lock or kernel-lock, is a lock which may be used to implement a concurrency control in the kernel, which is needed for SMP support.

It is an approach of single, global lock which is held when a thread enters the kernel space, for example, after a system call, and released when the thread returns to user space. While threads which are in the user space can run concurrently in the processors, only one thread can run in the kernel space, and threads in other processors which are going to enter the kernel space have to wait. This means that giant lock eliminates all concurrency in kernel space.

The main disadvantage of giant lock is that it eliminates the concurrency, thus decrease the performance on multiprocessor systems. However, the advantage of giant lock is that there is no need to modify many parts of the operating systems, thus it is easy to implement. Giant lock approach is mostly used by operating systems to implement an initial support for SMP. As an alternative to giant lock, most of the modern operating systems use fine-grained locking approach.

See also

Categories: