Commit Graph

8883 Commits

Author SHA1 Message Date
Kartik K. Agaram 1c372b817e 284 2014-11-21 19:31:30 -08:00
Kartik K. Agaram 4b1be76c4c 283 2014-11-21 19:29:37 -08:00
Kartik K. Agaram 58ad6023b5 282 - scheduler skips ahead when all routines are asleep 2014-11-21 18:45:46 -08:00
Kartik K. Agaram 95b57986d0 281 2014-11-21 18:21:15 -08:00
Kartik K. Agaram 913c4b5f15 280 - waking up sleeping routines
Tests still hanging at some point.
2014-11-21 15:07:33 -08:00
Kartik K. Agaram a384ea314c 279 - one new test passing, but sleep now hangs 2014-11-21 14:56:10 -08:00
Kartik K. Agaram e39b41c3c2 278 2014-11-21 14:40:30 -08:00
Kartik K. Agaram e9e28f5c00 277 - back up, start refactoring the scheduler
In trying to share pipes between routines, I realized my scheduler was
actually quite brittle. Changing scheduling-interval* shouldn't be
required in most tests, and shouldn't change the outcome most of the
time.

Current state: all scheduler tests fail, but everything else passes.
2014-11-21 14:38:11 -08:00
Kartik K. Agaram c2c0d3a1e8 276 - now fork can take any args
No oargs, though. Hopefully we don't need them. Use channels for
passing data back.

Drawback: channels must all be passed in by value, and their direction
isn't obvious. Hard to tell when multiple threads read/write the same
channel. Hopefully it's amenable to static analysis.
2014-11-19 00:32:49 -08:00
Kartik K. Agaram e0bf118825 275 - pass args to fork
Only literals for starters.
2014-11-19 00:23:48 -08:00
Kartik K. Agaram 38e51bc617 274 - long overdue test for 'fork' 2014-11-19 00:11:05 -08:00
Kartik K. Agaram 6bb304ca02 273 2014-11-18 11:02:22 -08:00
Kartik K. Agaram 9a9898b61e 272 2014-11-18 11:01:26 -08:00
Kartik K. Agaram c7dbf2b134 271 2014-11-18 10:53:33 -08:00
Kartik K. Agaram 67feef8318 270 2014-11-18 04:39:24 -08:00
Kartik K. Agaram 4c97ba914e 269
Minor cleanup and code comments.
I'm starting to feel the need for formatting primitives, so I don't
use comments just to provide section headings.
2014-11-18 04:39:15 -08:00
Kartik K. Agaram 08b48a8d56 268 - recursive function: factorial
Is this really harder to reason about by being somehow 'operational' and
'abstraction free'? http://cacm.acm.org/magazines/2010/8/96632-an-interview-with-edsger-w-dijkstra/fulltext
2014-11-17 01:19:21 -08:00
Kartik K. Agaram ea36397b50 267 - more intuitive channel capacity 2014-11-15 14:58:58 -08:00
Kartik K. Agaram 44de0079e5 266 - update html 2014-11-09 18:23:05 -08:00
Kartik K. Agaram edc1514fa3 265 2014-11-09 12:13:50 -08:00
Kartik K. Agaram fc46ebddf0 263
I'm trying to think about how to write a test for the race condition,
and how to fix it. One thing that's been hard is even remembering where
it lies. It's not between wiping the watch and sleeping on it; that's
innocuous because the sleep would just immediately wake up. No, the race
condition lies between the empty check and the wipe.

For the innocuous race we could just create an atomic wipe-and-sleep.
But the more serious race requires a lock.

If we need a lock anyway, is there any reason to have two watch
variables?

I'm going to preserve these alternative functions in the code.
Alternatives will only ever be called from other alteratives or tests.
2014-11-08 10:35:25 -08:00
Kartik K. Agaram 3bec25ce26 262 2014-11-08 10:26:42 -08:00
Kartik K. Agaram f182752578 261 - render matchadd() to html as well 2014-11-08 09:42:24 -08:00
Kartik K. Agaram cd9fd50952 260 2014-11-08 09:26:18 -08:00
Kartik K. Agaram 643f35e5c5 259 - finally channel read/write can cause routine to sleep 2014-11-07 21:39:00 -08:00
Kartik K. Agaram 66741bc8ef 258 - new channel helpers: empty? and full? 2014-11-07 14:09:59 -08:00
Kartik K. Agaram 0a52288c41 257 - cleanup the narrative in mu.arc.t 2014-11-07 13:02:27 -08:00
Kartik K. Agaram c8965db98b 256 - channel pointers can now wrap 2014-11-07 12:33:12 -08:00
Kartik K. Agaram dd2c774407 255
As per 248, ignoring output values can reduce some of the pressure of
dealing with raw locations.
2014-11-07 12:04:52 -08:00
Kartik K. Agaram 203347464f 254 2014-11-07 12:01:20 -08:00
Kartik K. Agaram ee3a90b1bb 253 2014-11-07 11:59:22 -08:00
Kartik K. Agaram a1a9d145df 252
Single idiom for setting oargs.
2014-11-07 11:57:45 -08:00
Kartik K. Agaram 57b367448a 251 2014-11-07 11:56:34 -08:00
Kartik K. Agaram 0ecba1bcb1 250 - experimental support for _ oarg
This radically overhauls our assumption that args must always be lists,
so we're probably missing things. Where we do, more tests are required.

Only important trace change: .traces/dummy-oarg
2014-11-07 11:50:41 -08:00
Kartik K. Agaram 55cf3fb58a 249
I've been meaning to fix that misleading label for some time now..
2014-11-07 11:31:46 -08:00
Kartik K. Agaram d08f480fde 248
I've been using raw locations to make tests easy to read (test checks
the same locations that code modifies). But this means I have to manage
them myself, and I've been shoving variables into the storage for
compounds like tagged-value. Doesn't matter in this case since we don't
look at the contents of the tagged-value, but still unhygienic.

Maybe we need syntax for ignoring some output values?
2014-11-07 11:06:57 -08:00
Kartik K. Agaram d430ce7c3d 247 2014-11-07 00:59:23 -08:00
Kartik K. Agaram 0c62881a6f 246 2014-11-07 00:56:42 -08:00
Kartik K. Agaram e4821af3f8 245 - sanity check for type table 2014-11-06 21:45:07 -08:00
Kartik K. Agaram 6a16a4e007 244 2014-11-06 21:44:16 -08:00
Kartik K. Agaram 45fda26aa1 243 - robustify channel tests 2014-11-06 21:09:53 -08:00
Kartik K. Agaram 437de8d577 242 2014-11-06 19:14:55 -08:00
Kartik K. Agaram 84224cadcd 241 - 'sleep' on a memory location
I thought we could be oblivious of channels, but that requires more work.
2014-11-06 19:13:05 -08:00
Kartik K. Agaram 9d4694088d 240 2014-11-06 19:06:32 -08:00
Kartik K. Agaram c370c7d849 239 2014-11-06 19:01:14 -08:00
Kartik K. Agaram 40544ff87c 238 - avoid deadlock if all jobs are sleeping 2014-11-06 16:08:16 -08:00
Kartik K. Agaram 64579cf7c8 237 - rudimentary 'sleep' 2014-11-06 16:05:57 -08:00
Kartik K. Agaram f462b986b1 235 2014-11-06 15:24:16 -08:00
Kartik K. Agaram 6f8b711881 234 2014-11-06 15:24:00 -08:00
Kartik K. Agaram fac6a170ed 233 - start tracking global cycle count
We're gonna need this to implement 'sleep'.
2014-11-06 11:36:16 -08:00