Yes that is right. CPUs can execute instruction out of order. So you might write Read, Write, Read but the CPU might decide to do the second read before the write. You can ever know. Even if you use some clever trick it will only work on the one exact model CPU you tested it with.
This is not now the CDC 6400 built in the 1960's could start on e instruction then start up to nine more before the first one finished. As long as some future instruction did not use the result of a previous one the CPU would not wait for the result. You could have up to 10 instructions being executed at the same time. We tried for that but it was hard to do. Four at once was easy. Modern CPUs are MUCH more complex and will even do speculative executions. and brach prediction which means they need a way to "back up", and toss out results from wrong predictions. It is impossible to know the timing in advance. I think hyper threading (hardware level multitasking) adds even one more layer. On Sat, Oct 26, 2013 at 6:49 PM, Dennis Ferguson < [email protected]> wrote: > > That's perfect if it works like it seems it should. The problem with > modern CPUs is > finding an instruction sequence that does the read-write-read in that > order, allowing > each to complete before doing the next.-- Chris Albertson Redondo Beach, California _______________________________________________ time-nuts mailing list -- [email protected] To unsubscribe, go to https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts and follow the instructions there.
