From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,3ccb707f4c91a5f2 X-Google-Attributes: gid103376,public From: kilgallen@eisner.decus.org (Larry Kilgallen) Subject: Re: Java vs Ada 95 (Was Re: Once again, Ada absent from DoD SBIR solicitation) Date: 1996/11/04 Message-ID: <1996Nov4.072757.1@eisner>#1/1 X-Deja-AN: 194298093 x-nntp-posting-host: eisner.decus.org references: <325BC3B3.41C6@hso.link.com> <55gkch$gg6@fozzie.sun3.iaf.nl> x-nntp-posting-user: KILGALLEN x-trace: 847110482/4414 organization: LJK Software newsgroups: comp.lang.ada Date: 1996-11-04T00:00:00+00:00 List-Id: In article , dewar@merv.cs.nyu.edu (Robert Dewar) writes: > Geert said > > ">In the more general case a very simple spin-lock is enough and the >>overhead should only be one memory-read when the object is not locked. >>String objects are locked almost never and when they are locked they >>are only locked for a short time." > > > What do you mean by a very simple spin lock in a uniprocessor environment. Running under an operating system on a uniprocessor there clearly must be a method of yielding to the lock-holder. In a preemptive scheduling environment this is automatic (although a yielding call is more polite). In a non-preemptive scheduling environment, a simple call to yield the processor should suffice, and that still leaves the overhead as approximately a memory read and test. Larry Kilgallen