Holy crap!

Dec. 9th, 2005 12:28 am
bethlakshmi: (Default)
[personal profile] bethlakshmi
It worked. Still have much to do - I am still farther behind than I wanted to be last Sunday, but a major chunk of the work is done, and I'm back to a place where I feel like I might be able to fix the rest on my own.


The final problem was the way calls for virtual pages happened. He used a global switch for handling page fault/not handling page fault. When I did a call (inside a page fault) to memory, to get the frame data in order to send it off to disk for frame reuse, my call to the same function flipped the switch off. Then, when the disk I/O was done, the program didn't resume inside the request to write to the newly mapped page, it hopped to the next logical instruction.

I think mostly this is tap dancing for the fact that this isn't actually a peice of hardware, it's a C construct imitating a peice of hardware. I was right - in the end it was having multiple executions of the same function, essentially nested in each other, but manipulating global variables independantly that gave the whole thing massive heart burn.

Instead, I now reach my grimy little 'fingers' into the frame memory storage structure directly, bypassing the evil function. No evil function - no goofy switch. No goofy switch... all is happy.

Date: 2005-12-09 02:37 pm (UTC)
From: [identity profile] learnedax.livejournal.com
Wow, global variables to signal the state of a reentrant function. Professors write the worst code ever.

February 2021

S M T W T F S
 123456
78910111213
14151617181920
212223 24252627
28      

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Apr. 28th, 2026 04:19 pm
Powered by Dreamwidth Studios