View Single Post
  #57  
Old October 19th 18, 12:31 AM posted to alt.comp.os.windows-10
Jimmy Wilkinson Knife[_2_]
external usenet poster
 
Posts: 269
Default Why isn't closing a program or game instantaneous?

On Wed, 17 Oct 2018 22:00:13 +0100, Paul wrote:

Jimmy Wilkinson Knife wrote:


How can "taking down resources" take anything longer than 0 seconds?


Why do I have to convince you of anything ?

You can believe what you want.

Maybe the computer is magic.

Maybe the computer is sentient and only works slowly
because it knows you hate when that happens.

*******

Let's take Jimmy to the bank.

Jimmy "I'd like 9 dollars please"
Teller "But your account only has 6 dollars sir"

That's resource management. We keep track of
who has what. And the tracking (bookkeeping) takes
time. We cannot give out, what we don't have.
"Out of memory".

Jimmy "I have these 4 dollars left over.
Can you keep them in my savings for later?"
Teller "Yes, sir, here, let me write this down
in the big book. I own Jimmy 4 dollars."
Jimmy "Why are you so slow? Can't you write faster?
Can't you write in zero time?"
Teller "I cannot violate the laws of physics"

That's resource management too.

Can Jimmy roll down his car window and throw
the four dollar bills on the ground ? Yes, he
can. But once the bills are lost, they aren't
in the bank, and we don't know what happened to
them. If we're not careful, we would run out of
currency. Nobody could buy anything. The bills
are rotting in a ditch somewhere. Consequently,
users of the bills realize their importance.

In this case, the situation is "special", in that
the program can return the bills a dollar at a
time as a manual operation (that takes time).
Or, the program can just exit(), just like that.
If exit() happens, the computer "goes through the
books" and it realizes Jimmy used to have 4 dollar
bills. It notes the serial numbers of the bills,
and puts evidence of the bills back into the
accounting system. And that takes time. It's
as if Jimmy never made a withdrawal.

If the bills were allowed to just blow around
the street, Jimmys world would need to be
rebooted once in a while, to put all the bills
back in the bank and start the game all over again.

The details of Jimmys adventures at the bank are
not important here. I'm not trying to make a
realistic lifelike example for you. I'm trying
to point out, that "Jimmy" is not the only
player in the story. It's not "Jimmy Jimmy Jimmy".
There is a "Teller", there is a "Bank". There
is a "Big Book". These things matter, even if
you don't care about them.


You really aren't that bright are you. Managing resources does not count when you're ****stopping**** using them.
Ads