Pete's Log: excursions into whackiness
Entry #814, (Coding, Hacking, & CS stuff)(posted when I was 22 years old.)
Perk is my official hero of the day: he's providing me with caffeine I can't afford myself.
More progress is being made in the arena of proving that I am a sick fuck. So for CSE 521, I am supposed to write programs that implement two search algorithms (I chose quicksort and bubblesort so I can get a wider spectrum of results). Then I am supposed to do various things, including instruction counts on x86 and sparc. Well, sparc is easy. Cuz shade rocks. x86/Linux lacks such a tool, to the best of my knowledge. So after some thinking I realized I'm running a pentium system (woo! non-portable assembly!) so I can use the rdtsc register the pentiums feature to get an instruction count. The only problem: these programs run for non-trivial (greater than 1 quantum) so they'll be preempted and thus the instruction counts will be skewed. So how does one avoid preemption? One runs inside the kernel. Hahahahaha! So, what better way to get my instruction count than to compile my sorting programs as kernel modules and count instructions within the kernel? This is sick. Sick, I say! I love it. We'll see how this goes.