I started my computer this morning, and quite automatically wanted to do my flashcards for operating systems, as I have always done first thing in the morning for the past three months or so. It really took me a moment to realize that I no longer had to do them, because the exam was yesterday. In fact, I likely won’t have to concern myself with operating systems for the rest of my life. Yesterday morning the subject was all-important. Today it’s about as interesting as the instruction manual for our old vacuum cleaner.
It’s always striking, it is. With this system of end-of-term exams, the stress level constantly increases throughout the term, goes through the roof in the last 48 hours before the exam–and then instantly evaporates. Except the human brain can’t really cope with this pattern. It’s running on hyperdrive the last hours before the exam, and in fact in the exam itself. You are juggling a hundred balls simultaneously, having 50 drawers open at the same time, thinking on a dozen different levels all at once. It’s only the adrenaline that makes it bearable, at least during the exam. And a minute after the exam all that is supposed to just go poof. It doesn’t. For the rest of the day and in fact half of the night you keep thinking about the exam that you can no longer change–how hard it was, or how easy; which questions you answered well and where you goofed, or think you did; how the professor is going to grade it, and how soon; how everybody else did, and where you stand in comparison. It’s completely futile, of course, but at the same time entirely understandable and human. Going into an exam you are like one of those super tankers that weigh half a million tons. Once under way, you can’t just call “all back full” and expect the thing to stop instantly. It takes about three miles. And going back to a normal state of mind after an exam needs about a day. Except with our system, at that point you are normally closer to the next exam than to the last one. So you go to “all ahead full” again, except in a radically different direction.
Yesterday morning in the cafeteria, after I had written my blog post, I still had three hours before the exam and was reasonably calm. At least on the surface. But then one by one my co-students starting coming in, and the level of tension began to increase. Some people hadn’t finished their crib yet, and soon nervous questions and remarks were flying across the table, discussing whether this or that detail would be important in the exam, and thus warrant being included in the crib. My programming partner and I reviewed previous exams from operating systems yet again, and I realized there were still several things I still had no good grasp of, such as the fork() and execve() commands in C and the synchronized keyword in Java.
Around an hour before the exam, we started conjuring up gloomy predictions for the exam setup. Remember, operating systems was the course where we had a new professor and thus no real idea how the exam might look like. My worst case was that he would pick all the nasty assignments from his predecessor’s earlier exams, then add a couple of “interesting” problems of his own, for a completely undoable exam that would then be graded with a scheme that left no buffer between total points and points needed for an A+. Not out of spite, mind you–just because the professor could not possibly have any idea, yet, what could be expected of students in terms of difficulty and number of assignments per time. And maybe because he might consider the exams of his predecessor predictable and boring–which they of course were.
I was horribly nervous in the last 30 minutes. Just to do something, I started copying complete solutions from earlier exams into the remaining white space on my crib. When I no longer could think of anything useful, I drew a large smiley on the square inch still left on the backside of the paper.
The dreaded moment of thruth in any exam is when you are handed the question sheet. Then speculation gives way to certainty, and that certainty can be anything ranging from shock to relief. In the infamous programming, part II, exam it was shock and disbelief–six full pages of assignments that nobody could possibly hope to complete within three hours, or three days for that matter. In automata theory it was delayed disbelief–I skimmed through the pages and saw nothing really problematic, except that the skimming didn’t end. 18 pages??
In operating systems yesterday, it was relief–and then disbelief as well. Eight assignments, seven of which were taken right out of the Altklausuren of our professor’s predecessor. And not the nasty ones, but the most simple, basic stuff: List three hardware-based protection mechanism for operating systems. Name a few characteristics of threads, what are threads good for, and what is the difference between kernel-level and user-level threads. A tiny C program that should create four child processes and have them print their ID to the screen, does it work correctly? What is “busy waiting”, and why is it bad? Pseudo-code with semaphors for a consumer that takes data packages out of a buffer. The semaphores and the producer code were even given; all you had to do was write down the correct number of P (acquire) and V (release) commands. A memory layout with the unassigned blocks indicated by size in MB; place an 18 MB process using three different algorithms, and then explain which one is the fastest and/or most effective in terms of memory usage. A FAT table, please list the blocks for each file in consecutive order; take two blocks away from one file and add one to another, how does the table change. It was all perfectly simple, and since we even had a crib, practically no-brainers throughout. Only one assignment was not taken from an Altklausur, namely what is the problem with implementing a page table and what are possible solutions? One (inverted page tables) was even given, and all we had to do is say how it solved the problem, which was also a major hint as to the problem itself.
That was the dreaded operating systems exam? I could hardly believe it. Then I took all the time in the world to solve all the problems thoroughly, and was done after 40 minutes. The allotted time was 90 minutes. I took another 20 minutes to make double sure I had read the questions properly, not forgotten anything, nor mixed up my algorithms, then handed in about 30 minutes early, together with more than half of those in the room. I had answered all the questions, and am sure about at least 90% of my answers. So depending on how generous the professor grades, my feeling is an A-, maybe better. A good start for the exam period!
And now for forgetting operating systems and concentrating on algorithms–the next exam tomorrow at 11 a.m.
Of course, the whole thing is still a prime example of what they call “bulimic learning”. I am quite certain in 48 hours I will have forgotten 90% of the things I had so painstakingly memorized for this exam (before we were allowed a crib in the last minute, that is). And rightly so, because operating systems is one of the subjects that warrant a full lecture plus practicum in our curriculum only because you can’t well lump them in with anything else. It’s certainly good for a student of CS to have heard of most of the things that figured in the lecture, but that’s no real excuse for studying stuff in depth that is best left to operating system designers. And I am quite certain we will never again need even a tiny fraction of the masses of material presented in this lecture–not for the rest of the study programm, nor for our professional carreer.
Mind you, that’s not always so. About math, for instance, I was quite wrong. In our first term, I considered it a nuisance–nothing more than an artificial barrier before the sacred halls of computer science, intended to keep out those not perfectly serious about wanting to enter and thus prepared to suffer for it. Even in the second term, when I realized that automata theory and logic built seamlessly on Math 101, I still suspected both courses to be, in turn, l’art pour l’art. Boy, was I wrong! For in this third term, the hitherto isolated strands of our study program have really come together. In graph theory as well as algorithms, we went to the core of solving real-world problems with the proper computer science methods, and both subjects built not just on programming–which goes without saying–but also on all the math we had done in the previous two terms. Suddenly it all made sense! And Math 101, which I had back then considered a huge random collection of more or less useless math gadgets, in retrospect turns out to have conveyed to us just the mere basics necessary to survive in this program. Today, off the cuff, I can think of any number of other fundamental math concepts we should really have done in the first term–for instance calculating the limits of sequences, which is crucial for determining the complexity class of an algorithm–except there was no time.
No, there are a lot of things in our study program that make a lot of sense. Operating systems, however, I at least doubt is one of them.