Path: utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!uunet!zaphod.mps.ohio-state.edu!know!pluto.hemel.bull.co.uk!ewoods From: ewoods@hemel.bull.co.uk (Eoin Woods) Newsgroups: comp.realtime Subject: Re: Spin locks Message-ID: <1991Jan22.084616.16547@hemel.bull.co.uk> Date: 22 Jan 91 08:46:16 GMT References: <830@marvin.jpl.oz> Sender: @hemel.bull.co.uk Organization: Bull HN UK Lines: 29 Nntp-Posting-Host: brno david@marvin.jpl.oz (David Magnay) writes: >Can someone pls explain spinlocks. Are these a form of semaphore ? Hmm, interesting question! Basically yes. The most simple spin-lock is a piece of code which would look something like: while (locked) check_lock (lockA) ; The essential thing about a spin-lock (if I can remember my real-time systems courses) is that the process concerned loops until the lock it is waiting for is released (and so can be inefficient in a real-time environment as it uses resources and is stuck until the lock is released for it). A good reference for this sort of information is : "Real-Time Systems Design", 2nd ed, Allworth and Zobel, Macmillan. Eoin. -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~ Eoin Woods, Software Development Group, Bull HN Information Systems, ~ ~ Maxted Road, Hemel Hempstead, Herts HP2 7DZ, UK. ~ ~ Tel : +44 442 232222 x4823 Fax : +44 442 234084 ~ ~ < Eoin.Woods@hemel.bull.co.uk or ...!uunet!ukc!brno!ewoods> ~ ~ < When do we start news group comp.os.emacs ? :-) > ~