Re: spin lock
- From: Elizabeth D Rather <eratherXXX@xxxxxxxxx>
- Date: Fri, 24 Aug 2007 17:23:37 -1000
Krishna Myneni wrote:
Elizabeth D Rather wrote:....
From your description, I gather that GRAB and RELEASE are equivalent to the spin
lock and unlock methods, while GET uses a scheduling scheme to grant access to
the resource and prevent one task from hogging the shared resource. It may be
that I have to implement something similar for my application as well.
When you say that tasks always PAUSE during I/O, is this the POSIX pause() function?
No, unless they coincidentally do the same things ;-) The SwiftOS multitasker (which technically is identical to the polyFORTH multitasker and generations before that) runs standalone (multitasking under Windows is quite different). It's basically a round-robin, with the rule that whenever a task initiates I/O it relinquishes the CPU and remains inactive (other tasks can run) until the I/O is complete. A task can also voluntarily pause any other time, e.g. during a CPU-intensive operation.
Cheers,
Elizabeth
--
==================================================
Elizabeth D. Rather (US & Canada) 800-55-FORTH
FORTH Inc. +1 310-491-3356
5155 W. Rosecrans Ave. #1018 Fax: +1 310-978-9454
Hawthorne, CA 90250
http://www.forth.com
"Forth-based products and Services for real-time
applications since 1973."
==================================================
.
- Follow-Ups:
- Re: spin lock
- From: Elizabeth D Rather
- Re: spin lock
- References:
- spin lock
- From: Krishna Myneni
- Re: spin lock
- From: Elizabeth D Rather
- Re: spin lock
- From: Krishna Myneni
- spin lock
- Prev by Date: Re: spin lock
- Next by Date: Re: spin lock
- Previous by thread: Re: spin lock
- Next by thread: Re: spin lock
- Index(es):
Relevant Pages
|