Skip to main content
GameDev.net gamedev.net
🔒 Locked

I was working on my operating system...

Started by Telamon Oct 10, 2005 at 1:46 AM 35 replies 4.3k views
Original Post
Telamon
Telamon
I'm writing an x86 operating system for a class that I'm taking this quarter (I call it the Convolution Kernel). I often get kind of punchy after writing code for long periods of time, especially in emacs. So I was staring off into space when I began to ponder a deep question. Q: Could Jesus write an operating system that was so stable that not even He Himself could crash it? I was talking about this with a friend and he seemed to think it was possible. I, on the other hand don't. My argument was that to detect all the potential buffer overruns in the code is tantamount to solving the halting problem (there's a clever proof to this that I had on an exam once, but don't recall at the moment). Since mathematics are outside the realm of creation*, I don't believe that even He could come up with a general solution for the halting problem. Therefore any hypothetical divine operating system would be plagued by the same security holes which we experience every day. I don't view this argument as air-tight, so it's still somewhat of an open question. * - I will argue that it is not possible to create a universe where pi is anything but 3.14, for example.
joanusdmentia
joanusdmentia
Quote:
Original post by Telamon
* - I will argue that it is not possible to create a universe where pi is anything but 3.14, for example.


So, we don't exist!? I always thought something fishy was going on.....

More seriously though, buffer overruns aren't that hard to detect. VC7.1 for example has an option to detect them (see 'Buffer Security Check' option in the Options\C++\Code Generation). Detecting this isn't like the halting problem, no paradox results from the program itself having buffer overruns.
"Voilà! In view, a humble vaudevillian veteran, cast vicariously as both victim and villain by the vicissitudes of Fate. This visage, no mere veneer of vanity, is a vestige of the vox populi, now vacant, vanished. However, this valorous visitation of a bygone vexation stands vivified, and has vowed to vanquish these venal and virulent vermin vanguarding vice and vouchsafing the violently vicious and voracious violation of volition. The nly verdict is vengeance; a vendett o
ZQJ
ZQJ
I think he means detecting the possibility of buffer overruns, not actually telling if one's happened at runtime, which is easy.
joanusdmentia
joanusdmentia
Quote:
Original post by ZQJ
I think he means detecting the possibility of buffer overruns, not actually telling if one's happened at runtime, which is easy.


True, but it still doesn't to any paradoxes (that I can think of anyway) the way the halting problem does. So even if it was *practically* impossible (which I don't think it is, at least in languages where array limits are well defined), it isn't provably impossible.
"Voilà! In view, a humble vaudevillian veteran, cast vicariously as both victim and villain by the vicissitudes of Fate. This visage, no mere veneer of vanity, is a vestige of the vox populi, now vacant, vanished. However, this valorous visitation of a bygone vexation stands vivified, and has vowed to vanquish these venal and virulent vermin vanguarding vice and vouchsafing the violently vicious and voracious violation of volition. The nly verdict is vengeance; a vendett o
Nitage
Nitage
The buffer overrun problem is not analogous to the halting problem. One can't be solved whilst maintaining turing power, one can be.
Name_Unknown
Name_Unknown
Quote:
Original post by Telamon
I'm writing an x86 operating system for a class that I'm taking this quarter (I call it the Convolution Kernel). I often get kind of punchy after writing code for long periods of time, especially in emacs. So I was staring off into space when I began to ponder a deep question.

Q: Could Jesus write an operating system that was so stable that not even He Himself could crash it?

I was talking about this with a friend and he seemed to think it was possible. I, on the other hand don't. My argument was that to detect all the potential buffer overruns in the code is tantamount to solving the halting problem (there's a clever proof to this that I had on an exam once, but don't recall at the moment). Since mathematics are outside the realm of creation*, I don't believe that even He could come up with a general solution for the halting problem. Therefore any hypothetical divine operating system would be plagued by the same security holes which we experience every day.

I don't view this argument as air-tight, so it's still somewhat of an open question.



* - I will argue that it is not possible to create a universe where pi is anything but 3.14, for example.


Yep, but you see, it's chroots all the way up.. so you are never really sure if *this* particular system you are on is the one *true* system. You know, test of faith sort of thing.

It's all chroots my friend, it's an illusion.

"It's such a useful tool for living in the city!"
kapru
kapru
if you make it so all programs runn on a virtual layer and that layer cant run into buffer overflows then the main os would never crash
Daggett
Daggett
Having true omnipotence means even the hard rules of logic that we hold dear (1+1=2) can be broken (1+1=4). [wink]
Spoonbender
Spoonbender
Does it? The definition of omnipotence I've seen didn't mention that [lol]
Dave Hunt
Dave Hunt
Quote:
Original post by Daggett
Having true omnipotence means even the hard rules of logic that we hold dear (1+1=2) can be broken (1+1=4). [wink]


But, even in our logical universe, 1+1=3 for large values of 1.
Alpha_ProgDes
Alpha_ProgDes
Quote:
Original post by Dave Hunt
Quote:
Original post by Daggett
Having true omnipotence means even the hard rules of logic that we hold dear (1+1=2) can be broken (1+1=4). [wink]


But, even in our logical universe, 1+1=3 for large values of 1.

Only if you didn't wear a rubber....

Beginner in Game Development?  Read here. And read here.  
Telamon
Telamon
Roboguy: Those are interesting links, thanks for point them out. rating++;
markr
markr
Well, it's quite simple. Jesus would not use the C string library, because it sucks. He would simply use something that was not vulnerable to buffer overflows in the first place.

I don't want to enter into any theological point however :)

Mark
dbzprogrammer
dbzprogrammer
1. Why would Jesus program a computer, doesn't he have better things to do?
2. Jesus would make a optical RAM storage that never overflowed
3. Jesus is the answer.
We should do this the Microsoft way: "WAHOOOO!!! IT COMPILES! SHIP IT!"
LessBread
LessBread
Jesus was way cool...

Quote:

Jesus was way cool
Everybody liked Jesus
Everybody wanted to hang out with him
Anything he wanted to do, he did
He turned water into wine
And if he wanted to
He could have turned wheat into marijuana
Or sugar into cocaine
Or vitamin pills into amphetamines
He walked on the water
And swam on the land
He would tell these stories
And people would listen
He was really cool
If you were blind or lame
You just went to Jesus
And he would put his hands on you
And you would be healed
That's so cool
He could've played guitar better than Hendrix
He could've told the future
He could've baked the most delicious cake in the world
He could've scored more goals than Wayne Gretzky
He could've danced better than Barishnikov
Jesus could have been funnier than any comedian you can think of
Jesus was way cool
He told people to eat his body and drink his blood
That's so cool
Jesus was so cool
But then some people got jealous of how cool he was
So they killed him
But then he rose from the dead
He rose from the dead, danced around
Then went up to heaven
I mean, that's so cool
Jesus was way cool
No wonder there are so many Christians


Jesus could do anything [dead]
"I thought what I'd do was, I'd pretend I was one of those deaf-mutes." - the Laughing Man
Name_Unknown
Name_Unknown
Quote:
Original post by Telamon
* - I will argue that it is not possible to create a universe where pi is anything but 3.14, for example.


Well here is a question for the mathematically minded:

is there a universe where if you look exactly up it is not a NaN?

"It's such a useful tool for living in the city!"
gosper
gosper
Quote:
Well, it's quite simple. Jesus would not use the C string library, because it sucks. He would simply use something that was not vulnerable to buffer overflows in the first place.

I don't want to enter into any theological point however :)

Mark



You dont need to be using the C string library to write vulnerable code. Integer overflows and signed/unsigned comparisons for example. Also most bugs in code these days are not your cookie cutter strcpy() their far more compelx than that.

Just my 2 cents. :)
Andrew Russell
Andrew Russell
Quote:
Q: Could Jesus write an operating system that was so stable that not even He Himself could crash it?

Given Jesus as a can-do (anything) kinda guy, then yes, he could write an operating system that he could not crash (and, yes, the crashability of a system dosn't have much to do with the halting problem).

The reason for this is that the question implies that he can only attempt to crash it through normal operation of the program.

If you allow him to use "The Force™" to crash it, say by hardware fault or spontanious combustion, then it becomes the regular "could Jesus make an X so Y that even he could not Z" question.
krikkit
krikkit
Kiflom, brother brothers.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.