S
spinoza1111
On Aug 2, 7:04 pm, "Chris M. Thomasson" <[email protected]> wrote:[snipped a bunch of crap]and I have
at this time no way of knowing whether it is, it would explain his
being online all the time. It's possible he can no longer get hired
as
a programmer owing to the fact that his only language is out of date,
and he answered one of those spammy ads to "make money with your
computer", and hit pay dirt.
These are only possibilities. If you can't reason with modal logic, I
doubt you're a competent programmer.
Go ahead and think up whatever you want. I am not so sure you can
understand
the type of programming I do. Humm...
Are you the auto parts catalog whiz? If so I think I do. Are you doing
space shuttle code or working for a rocket science Wall Street firm,
making sure the heat shield falls off (it's SO cool when it does that)
or that the tranche consists of deadbeat Dads who can't even pay for
the trailer? If so "I tremble for my country when I realize God is
just".
Reading Rainbow, you cannot understand English. So I really, really
hope that what I can't understand is auto parts, not rocket science,
here.lol. Anyway, some people might compare the type of programming I do with
"rocket science", or perhaps compare it to juggling running chainsaws.
Well, let's see if you can accomplish a task that I consider to be fairly
easy. I want to create a reader/writer lock that has wait-free fast-paths on
both the writer and reader side. I want this lock to be 100% starvation-free
for both writers and readers. I want bounded time for both readers and
writers. Your not allowed to use CAS. After you accomplish that, I want you
to augment your algorithm to allow for conditional reader-to-writer
upgrades, and non-conditional writer-reader downgrade. You may use CAS for
the upgrade/downgrade, but not for reader/writer acquisition or release.
BTW, your not allowed to use any loops in the algorithm. Oh, one more thing.
I will make it really easy for you in that you do not have to document any
membars. Once you accomplish this task, then we can begin to discuss some
more exotic synchronization algorithms...
I'm sorry Chris but I don't feel
Like reinventing another wheel
This is not my area of expertise.
You MAY, from where I sit, not be aware that it MAY be impossible to
actually do this on arbitrary platforms. If the lock is a single
instruction on your system in machine language the code isn't portable
to another system.
But I concede that you aren't doing auto parts. The question remains
whether or not C is the right tool for what you're doing.