Today’s rather fun moment…
The tripod I ordered on Tuesday night arrived this morning from Amazon, despite me picking the free shipping option.
Also, the interview I had Tuesday afternoon resulted in a package in the mail this morning containing a job offer.
Yay for quick shipping foo.

So yeah, that makes 5 offers, with 2 interviews to go.

OS is being death and making me sad. Why can’t we get exit and wait working? :(

Posted in OS

OS death x 2

if((argv = loader_copy_argv(filename, page)) == NULL)
lprintf_kern("argv is null %p", argv);
return ERROR;

argv is null 0x1ffe00

Don’t you love it when you override your program’s execution code and cause weird things like this?

Also, you get funness like getting odd addresses like 0xacfffffe because something does a INC %esp assembly instruction.

It is 2:30 AM, and we’re almost back to the point where we were logical yesterday morning before this horribleness with VM began.

Tonight is likely going to be another all-nighter (after which, with luck, we will be back at the point where we were at the beginning of the week). Tomorrow is more OS followed by a flight to Connecticut in the evening (yay sleeping on the plane). Death.

Edit: 8 is amazing… as I sat around uselessly throughout the night, he fixed our VM/PM bugs and got us back to a working state. Then, as I sat there and zoned out and then dozed off, he wrote the vanish() syscall and most of wait(). Bleh, why am I so useless?
My throat hurts…. I should go find some cough drops or something.

OS death

I’m feeling worse than I have in a while… stressed about Pen-based computing (we have to have a demo-able project by Thursday…), stressed about interviews (I have 3 next week, including one that requires me to fly out), but mostly stressed about OS… we worked for like 8 hours yesterday and managed to get negative work done… as in, our kernel isn’t to the point where it was yesterday morning anymore.
I just want to drop the class and curl up somewhere and die… meh.

Massive photo dump

More OS

Don’t you love that sense of satisfaction you get after you fix a rather annoying bug?

8 finished the VM rewrite for our kernel (and it looks *much* nicer now, and the PM can also magically keep track of free physical pages without needing an internal data structure [and hence, won’t use more memory if we ever happen to get more than 256MB of ram]) and we had a remarkably easy time integrating it into our main branch (although I’m still of the opinion that Subversion merging is horrific and painful).

Then the fun started. Things started out ok and init and idle started and the shell started and readline worked.
Then, when we tried to execute a task from the shell, things exploded.
After about an hour, I tracked down the problem to fork’s page-directory-and-table copying function… odd though, since that hadn’t changed since before the VM rewrite, and it was working fine before.
After poking at it some more, I determined that, for some unknown reason, one of the page tables in the newly-forked task contained garbage data. Garbage data that happened to look a lot like a kernel stack. Hmmm…
A bunch of breakpoints and plenty of x%cr3 4096 and psym "pcb->esp0" later, I discovered that, somehow, the same physical page was being mapped as both a kernel stack page and as a page table page. Very odd.
Poked at it for another couple hours until I managed to isolate the problem to one function… a function that destroys the current mappings in the page directory/tables to prepare a task for exec. Turns out it was a mistake with freeing pages… for some reason, the code was freeing a page *after* the desired page (PTR_ADD(page_loc, PAGE_SIZE)). Oops. Fixing that fixed the immediate bug but tripped an assertion.
That one turned out to be simpler… the wrong virtual address was being passed into the freeing function (*entry instead of entry). Whee.

So yeah, it appears that we are back in the same state that we were yesterday as far as runnability and such goes, except we have a shiny new VM that appears to be much happier (and much cleaner) than before.

I should probably go sleep, as it is 7:30… but it might make more sense to just stay up until class and then sleep afterward. Meh.

All we have left to do is finish vanish and write wait and we will be kernel code-complete (at least, theoretically… we’ll probably end up doing more rewrites and such). Awesomeness.

There has been much ITG lately. I need to get back into 11s… maybe I’ll manage to pass a 12 before I leave CMU. Wheee.

Recent life

Life has been odd lately.

Monday night was coding until 7 AM. Tuesday night was another all-nighter, coding until the checkpoint on Wednesday morning. Then was more coding until Wednesday night, when I tried to get a decent amount of sleep. Still, it wasn’t enough, since I had to get up for work at 7 and ended up leaving early because I was starting to have trouble reading lines of code like “x = 5;”

Also, in the past 2 days, I have received two job offers. One is with a company I really, really like (in California), and will likely take unless something better comes up, or unless I decide to remain in Pittsburgh. I dunno.

Wheee things have been so surreal lately… likely due to the recent lack of sleep.
Here’s looking forward to late November, when I can start getting back to a normal sleep schedule.

Edit: Continuing the trend of not getting enough sleep, it is now almost 2:30 AM and I’m coding. Wheee.

Posted in OS