freenode/#sicl - IRC Chatlog
Search
7:58:34
beach
Yeah. It's not clear what material this person has read, though. But he says he enjoyed what he saw.
8:00:03
beach
"I read your article on operating systems. You think very clearly, concisely, outside the box, and like a master." I need to show that to my (admittedly small) family. :)
8:02:03
beach
That's a good idea actually. I don't often get that much praise. At least not all at the same time. :)
11:45:03
beach
I know he used a bunch of different URLs at some point, some of which didn't work for a while.
13:26:03
Bike
did you see what i mentioned about change-class and dfuns/disembodied call sites? i'm going to try things anyway, but it's a pretty critical caveat
13:26:59
beach
I took note, and I'll try to keep it in mind when I get back to this idea. Or, maybe you will figure it out first.
13:29:03
Bike
maybe on sicl you can determine quickly if an object has been allocated in the thread local nursery, so other threads don't have access to it?
13:30:37
beach
One could also put a lock on change-class. It is bound to be an infrequent operation.
13:32:33
Bike
it would be any region between testing the class of an object and calling a dfun/specialized function/whatever
13:33:26
Bike
a lock on change-class itself to avoid the mutant instances i mentioned before would probably be fine, though
13:33:54
Bike
well, are you okay with, like, grabbing a lock every time a method function is entered? because i don't know about that one.
13:38:20
Bike
and of course for instances of built in classes, or possibly structures depending on how sicl wants to do that, none of this matters
13:38:44
Bike
(i mean, i know sicl structure instances are the same as standard object instances, but you could still forbid change-class)
13:40:31
beach
Now, the only built-in classes are those for which there are no instances, or only immediate instance, and of course CONS.
13:41:17
beach
So CONS, CHARACTER, SINGLE-FLOAT, FIXNUM, and all the ones with no direct instances like SEQUENCE, LIST, etc.
13:47:02
beach
Well, there can't be a single global lock since most of the time of any thread would probably be spent in a method function. Now, it is a problem if that method function is not an accessor?
13:52:41
beach
So, apparently "air con" is a frequent abbreviation for "air conditioning" but "I have air con" does not translate to "Je l'air con" in French.
13:53:27
Bike
i suppose that depends on how deep it goes. If you have a function FOO that calls a function BAR that calls an accessor, and with dfuns only FOO does any discrimination, you probably still have an issue
13:54:11
Bike
like have (defmethod put ((x class-a)) (push x *class-as*)) (defmethod put ((x class-b)) (push x *class-bs*)) and then have class-a's in *class-bs*
13:54:56
beach
Sure, but aren't those bugs due to bad programming again? And I maintain that we can't protect programmers from themselves.
13:56:09
beach
I mean, in your example, having class-a's in *class-bs* can happen without any threads what so ever.
13:56:49
Bike
depends on what you mean by bad programming. the standard of course doesn't define any concurrent behavior. i think "change-class concurrent with generic function dispatch is defined" and "...is undefined" are both reasonable ideas of how things ought to work
13:58:21
Bike
i mean, of course sicl can say it's undefined, and then the programmer is hitting undefined behavior, so it's bad programming.
13:58:25
beach
And I am willing to accept that, as long as the system is safe, we can let things like that happen, if they are due to programming that will make the outcome depend on relative speed of threads.
14:00:05
Bike
speaking of: to include machine atomic read-modify-write operations i'm probably going to need to define more cleavir instructions. this means some redundancy, like, there will be an aref instruction, an aset instruction, and then acas, and then armw or something for atomic increment and so on
14:00:21
Bike
and i'm wondering if there isn't a better way to arrange this. i mean, for a start i can just give aref and aset instructions a common superclass
14:00:30
beach
Oh, and I don't want any "impossible situations" to be possible. As in two events that are clearly ordered in time, and the first one seeing a change that the second doesn't.