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 20:07, 26 May 2009 editBeno1000 (talk | contribs)Pending changes reviewers3,659 editsmNo edit summary← Previous edit Revision as of 16:56, 25 July 2009 edit undoAlexbot (talk | contribs)196,144 editsm robot Adding: ja:ジャイアントロックNext edit →
Line 12: Line 12:
] ]
] ]



] ]
]

Revision as of 16:56, 25 July 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: