A Windows XP help forum. PCbanter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » PCbanter forum » Windows 10 » Windows 10 Help Forum
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Why isn't closing a program or game instantaneous?



 
 
Thread Tools Rate Thread Display Modes
  #16  
Old October 16th 18, 04:35 PM 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 Tue, 16 Oct 2018 16:24:51 +0100, Jonathan N. Little wrote:

Jimmy Wilkinson Knife wrote:
On Tue, 16 Oct 2018 01:17:48 +0100, Wolf K wrote:

On 2018-10-15 19:53, Jimmy Wilkinson Knife wrote:
When you close a program or game, provided you're not saving a file, why
doesn't it happen immediately? What on earth has it to do?

Unload and release RAM -- update indices


Marking something as empty should be bloody fast. If I delete 5GB of
files from my disk, it doesn't actually write 5GB of blanks.

Unload and release disk space used for temp files -- update indices


As above.

Many games also write state data so that you start where you left off.
That usually means rewriting temp files in a different location.


Nope, I already saved the game. When I exited, it asked "do you want to
save", so I said no.

And that's just the obvious stuff.


Pull the power cord, that'll exit the game faster ;-)


And the other things I was running.....
Ads
  #17  
Old October 16th 18, 04:36 PM 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 Tue, 16 Oct 2018 16:26:19 +0100, Paul wrote:

Jimmy Wilkinson Knife wrote:
On Tue, 16 Oct 2018 01:47:33 +0100, Ant wrote:

Jimmy Wilkinson Knife wrote:
When you close a program or game, provided you're not saving a file,
why doesn't it happen immediately? What on earth has it to do?

Probably using a lot of resources like memories, storage, etc.


But stopping using those should be instant. Just mark them as empty.


It's not the resources that matter.

It's how the resources are managed, and what side
effects the management of the resources have, that
causes the delayed response.


But I can ALT-TAB between the game and another application instantly.

I don't think Windows 10 is anywhere near as bad as
WinXP for that. But on the other hand, Windows 10 isn't
good from an architecture perspective, and when testing
edge cases, there's a good chance you'll break something.
Previous OSes seemed to handle resource exhaustion
more elegantly than Windows 10 does. In a typical
Windows 10 meltdown, the Task Manager can't be started
or made to stop the problem, then the system locks up,
black screens, or plays fiddle music using tiny violins.

You have to be *really awake* to spot resource exhaustion
in time. For example, if Storage Spaces is running,
and warns you that C: is running out of disk, you
might only have a matter of *seconds* to do something
about it. Don't go out in the kitchen and make
another cup of coffee, if you get a low space warning.
You need your ninja control-alt-delete response instead.


Odd, as I've found successive Windows versions are BETTER at handling problems, including running low on resources.
  #18  
Old October 17th 18, 03:49 AM posted to alt.comp.os.windows-10
Carlos E.R.[_3_]
external usenet poster
 
Posts: 1,356
Default Why isn't closing a program or game instantaneous?

On 16/10/2018 15.38, Jimmy Wilkinson Knife wrote:
On Tue, 16 Oct 2018 01:47:33 +0100, Ant wrote:

Jimmy Wilkinson Knife wrote:
When you close a program or game, provided you're not saving a file,
why doesn't it happen immediately?* What on earth has it to do?


Probably using a lot of resources like memories, storage, etc.


But stopping using those should be instant.* Just mark them as empty.


Maybe it has to go through a long list and marking each one as free or
whatever, in the correct order. Or worse, it has to load each resource
from disk for some reason before clearing it. Maybe it fills them with
zeroes before releasing them.

Maybe it has to do something online, like log off, if it is one of those
games.

Maybe it checks for some thing, or writes some data to some file.
Status, scores... maybe it has to calculate those first.

Maybe it was running some thread in background doing something, like
calculating an strategy, or indexing, and it has to finish it first
(wait for the task to reach an exit or control point).

Thousand reasons you need to look at the code to know which :-)

--
Cheers, Carlos.
  #19  
Old October 17th 18, 04:29 AM posted to alt.comp.os.windows-10
John Doe[_8_]
external usenet poster
 
Posts: 2,378
Default Why isn't closing a program or game instantaneous?

"Jimmy Wilkinson Knife" wrote:

When you close a program or game, provided you're not saving a
file, why doesn't it happen immediately? What on earth has it to
do?


It is instantaneous for some programs. Just depends on the program.
Dragon NaturallySpeaking takes a while to close, because it is a complex
program.

If you have Windows system sounds, like I have for ages, you can hear
programs closing stuff in the background. Some programs might take
longer than you think, if the time you think it takes is based only on
the window disappearing.

You might have a problem if a program does not signal that it is closing
by closing the active window. At least while someone from the old guard
was at Microsoft's helm, there were visual indications of activity.
Nowadays it's getting a little iffy, like all of the weird stuff in the
file manager, like the window focus changing after deleting a file (that
one is outrageous IMO). To be clear, I am not complaining about Windows,
generally.
  #20  
Old October 17th 18, 05:28 AM posted to alt.comp.os.windows-10
Paul[_32_]
external usenet poster
 
Posts: 11,873
Default Why isn't closing a program or game instantaneous?

Carlos E.R. wrote:
On 16/10/2018 15.38, Jimmy Wilkinson Knife wrote:
On Tue, 16 Oct 2018 01:47:33 +0100, Ant wrote:

Jimmy Wilkinson Knife wrote:
When you close a program or game, provided you're not saving a file,
why doesn't it happen immediately? What on earth has it to do?
Probably using a lot of resources like memories, storage, etc.

But stopping using those should be instant. Just mark them as empty.


Maybe it has to go through a long list and marking each one as free or
whatever, in the correct order. Or worse, it has to load each resource
from disk for some reason before clearing it. Maybe it fills them with
zeroes before releasing them.

Maybe it has to do something online, like log off, if it is one of those
games.

Maybe it checks for some thing, or writes some data to some file.
Status, scores... maybe it has to calculate those first.

Maybe it was running some thread in background doing something, like
calculating an strategy, or indexing, and it has to finish it first
(wait for the task to reach an exit or control point).

Thousand reasons you need to look at the code to know which :-)


You can run a trace.

ETW captures a lot of stuff. Registry access.
File I/O. All programs and services are visible
(at the SVCHOST level).

No need for source code for a quick check.

And multiple ETW sinks can be running at the same time,
because while you're running ProcMon, there are system
processes recording specific ETW traffic as well. At least
one logging system does it that way (doesn't capture a
conventional log - captures ETW instead, and converts
it on demand). I'm not a particular fan of them
doing that, because most of the time that feature
is broken (the log is then garbage).

But the ETW feature is a good idea. You can do boot traces
with it. You can do runtime tracing as well (what's needed
in this case).

ProcMon can do both a shutdown trace and a boot trace
in the same run. The shutdown is stored in a closed file
when the OS shuts down (you leave a trace running and the
program saves the results for you). The startup trace is collected
continuously (you can wait a couple minutes after boot
before opening Procmon.exe and the trace will be waiting
for you to save). And between the two saved files, you'll
have a picture of a shutdown and a startup sequence.

On the minus side, it leaves a lot to be desired, but on
the plus side, it's easy to use.

If you wrote a program like this:

1: GOTO 1

then that doesn't generate any ETW. Looking at a trace
later, you'd have no clue what the program was doing. And
I've had things that looked like that happen. I have a slow
Win10 boot here, and one of the trace sections has 20 seconds
of... no ETW events, and one core railed :-) And then we have
to guess at what that could be.

Paul
  #21  
Old October 17th 18, 12:37 PM posted to alt.comp.os.windows-10
Keith Nuttle
external usenet poster
 
Posts: 1,844
Default Why isn't closing a program or game instantaneous?

On 10/16/2018 10:49 PM, Carlos E.R. wrote:
On 16/10/2018 15.38, Jimmy Wilkinson Knife wrote:
On Tue, 16 Oct 2018 01:47:33 +0100, Ant wrote:

Jimmy Wilkinson Knife wrote:
When you close a program or game, provided you're not saving a file,
why doesn't it happen immediately?Â* What on earth has it to do?

Probably using a lot of resources like memories, storage, etc.


But stopping using those should be instant.Â* Just mark them as empty.


Maybe it has to go through a long list and marking each one as free or
whatever, in the correct order. Or worse, it has to load each resource
from disk for some reason before clearing it. Maybe it fills them with
zeroes before releasing them.

Maybe it has to do something online, like log off, if it is one of those
games.

Maybe it checks for some thing, or writes some data to some file.
Status, scores... maybe it has to calculate those first.

Maybe it was running some thread in background doing something, like
calculating an strategy, or indexing, and it has to finish it first
(wait for the task to reach an exit or control point).

Thousand reasons you need to look at the c'ode to know which :-)

When you close a program, and then using file explorer, go to the both
the program folder and the its data folder in the folder Users. Then
sort the folder by the date and see which files have been written to the
disk when the program closes. The time should be the time you closed
the program.

With both Firefox and Thunderbird, there are about a dozen files that
get written to disk when the program closes. I suspect these files
contain any thing you changed while using the program. tool bar setting,
etc.; things that changed as the program runs, file history, etc.




--
2018: The year we learn to play the great game of Euchre
  #22  
Old October 17th 18, 04:34 PM 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 04:29:36 +0100, John Doe wrote:

"Jimmy Wilkinson Knife" wrote:

When you close a program or game, provided you're not saving a
file, why doesn't it happen immediately? What on earth has it to
do?


It is instantaneous for some programs. Just depends on the program.
Dragon NaturallySpeaking takes a while to close, because it is a complex
program.


I fail to see why even a very complex program takes a long time to stop doing things. Stopping something takes no time at all.

If you have Windows system sounds, like I have for ages, you can hear
programs closing stuff in the background. Some programs might take
longer than you think, if the time you think it takes is based only on
the window disappearing.

You might have a problem if a program does not signal that it is closing
by closing the active window. At least while someone from the old guard
was at Microsoft's helm, there were visual indications of activity.
Nowadays it's getting a little iffy, like all of the weird stuff in the
file manager, like the window focus changing after deleting a file (that
one is outrageous IMO). To be clear, I am not complaining about Windows,
generally.

  #23  
Old October 17th 18, 04:38 PM 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 03:49:37 +0100, Carlos E.R. wrote:

On 16/10/2018 15.38, Jimmy Wilkinson Knife wrote:
On Tue, 16 Oct 2018 01:47:33 +0100, Ant wrote:

Jimmy Wilkinson Knife wrote:
When you close a program or game, provided you're not saving a file,
why doesn't it happen immediately? What on earth has it to do?

Probably using a lot of resources like memories, storage, etc.


But stopping using those should be instant. Just mark them as empty.


Maybe it has to go through a long list and marking each one as free or
whatever, in the correct order. Or worse, it has to load each resource
from disk for some reason before clearing it. Maybe it fills them with
zeroes before releasing them.


I can't see the need for that, it should just say to Windows "this area of memory is now available for use" then close.

Maybe it has to do something online, like log off, if it is one of those
games.


No, that's disabled.

Maybe it checks for some thing, or writes some data to some file.
Status, scores... maybe it has to calculate those first.


No, this still happens if I save the game first, then when exiting I say "don't save".

Maybe it was running some thread in background doing something, like
calculating an strategy, or indexing, and it has to finish it first
(wait for the task to reach an exit or control point).

Thousand reasons you need to look at the code to know which :-)

  #24  
Old October 17th 18, 06:57 PM 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 18:27:24 +0100, Wolf K wrote:

On 2018-10-17 11:34, Jimmy Wilkinson Knife wrote:
[...]

I fail to see why even a very complex program takes a long time to stop
doing things. Stopping something takes no time at all.

[...]

HDD activity.


Doing what exactly? I've already said the game was saved. Nothing needs to be recorded to disk AT ALL.
  #25  
Old October 17th 18, 07:05 PM posted to alt.comp.os.windows-10
Frank Slootweg
external usenet poster
 
Posts: 1,226
Default Why isn't closing a program or game instantaneous?

Jimmy Wilkinson Knife wrote:
On Wed, 17 Oct 2018 18:27:24 +0100, Wolf K wrote:

On 2018-10-17 11:34, Jimmy Wilkinson Knife wrote:
[...]

I fail to see why even a very complex program takes a long time to stop
doing things. Stopping something takes no time at all.

[...]

HDD activity.


Doing what exactly? I've already said the game was saved. Nothing
needs to be recorded to disk AT ALL.


Sigh! As has been said umpteen times: *Freeing* resources, whose
content or/and accounting is - fully or partially - on disk.

Give it a rest, will you!? This - operating system design - is yet
another area you obviously know little to nothing about.
  #26  
Old October 17th 18, 07:19 PM 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 19:05:52 +0100, Frank Slootweg wrote:

Jimmy Wilkinson Knife wrote:
On Wed, 17 Oct 2018 18:27:24 +0100, Wolf K wrote:

On 2018-10-17 11:34, Jimmy Wilkinson Knife wrote:
[...]

I fail to see why even a very complex program takes a long time to stop
doing things. Stopping something takes no time at all.
[...]

HDD activity.


Doing what exactly? I've already said the game was saved. Nothing
needs to be recorded to disk AT ALL.


Sigh! As has been said umpteen times: *Freeing* resources, whose
content or/and accounting is - fully or partially - on disk.

Give it a rest, will you!? This - operating system design - is yet
another area you obviously know little to nothing about.


You're talking absolute ****ing bull****. Freeing a resource takes absolutely ZERO time. The memory my game was in is now empty. It doesn't have to be filled to exit the game. It only has to be filled when I start using another program which was previously paged. Are you one of the 50% of the population with a 2 digit IQ? You lot really should be thrown off a cliff.
  #27  
Old October 17th 18, 07:56 PM 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 19:28:41 +0100, Wolf K wrote:

On 2018-10-17 14:19, Jimmy Wilkinson Knife wrote:
On Wed, 17 Oct 2018 19:05:52 +0100, Frank Slootweg
wrote:

Jimmy Wilkinson Knife wrote:
On Wed, 17 Oct 2018 18:27:24 +0100, Wolf K wrote:

On 2018-10-17 11:34, Jimmy Wilkinson Knife wrote:
[...]

I fail to see why even a very complex program takes a long time to
stop
doing things. Stopping something takes no time at all.
[...]

HDD activity.

Doing what exactly? I've already said the game was saved. Nothing
needs to be recorded to disk AT ALL.


Page file management.

Sigh! As has been said umpteen times: *Freeing* resources, whose
content or/and accounting is - fully or partially - on disk.

Give it a rest, will you!? This - operating system design - is yet
another area you obviously know little to nothing about.


You're talking absolute ****ing bull****. Freeing a resource takes
absolutely ZERO time. The memory my game was in is now empty. It
doesn't have to be filled to exit the game. It only has to be filled
when I start using another program which was previously paged. Are you
one of the 50% of the population with a 2 digit IQ? You lot really
should be thrown off a cliff.


What part of "HDD activity" don't you understand?

Oops, my mistake: you've already shown you don't understand what a page
file is.


I certainly do. It's OTHER programs which were paged out of memory so my game could be in memory. Those do not need to be unpaged until they are required to be used.
  #28  
Old October 17th 18, 08:03 PM posted to alt.comp.os.windows-10
Paul[_32_]
external usenet poster
 
Posts: 11,873
Default Why isn't closing a program or game instantaneous?

Jimmy Wilkinson Knife wrote:
On Wed, 17 Oct 2018 04:29:36 +0100, John Doe
wrote:

"Jimmy Wilkinson Knife" wrote:

When you close a program or game, provided you're not saving a
file, why doesn't it happen immediately? What on earth has it to
do?


It is instantaneous for some programs. Just depends on the program.
Dragon NaturallySpeaking takes a while to close, because it is a complex
program.


I fail to see why even a very complex program takes a long time to stop
doing things. Stopping something takes no time at all.


The power switch works well.

But a power switch doesn't do resource management.

Or, take down resources in an orderly manner (typically
single threaded).

An eight core processor, only manages resources using the
services of one core. Even if the scheduler makes that
thread float from core to core, only one core works on
it at any one time.

If a resource is managed with a linked-list, then you
need to traverse that linked list. Non-optimal memory
traversal happens at 300MB/sec. More optimal traversal
for more ordered things, is 1500-2000MB/sec. (Even though
Intel would tell you your computer has a "bandwidth" of
57600MB/sec.)

If you have a 16GB machine, what does that tell you in terms of
"raw dimensions" ? It might take eight seconds under some
set of optimal conditions, if all the resources are being
used. The bigger the machines get, the slower they are at
management of resource intensive stuff.

In fact, a 16GB machine is just about optimal for the
state of processors today. If you were to own a server
motherboard with AMD Epyc and 2TB of RAM... you would
be a very sad panda indeed. You would be royally ****ed
at "how slow it is". But that's to be expected. Nobody
would imagine a 2TB machine would behave well, and they would
not be disappointed in that regard. You only own a 2TB machine,
for working on 2TB problems. For example, if you were
using Microsoft ICE and working on a huge panorama,
your job would finish *a lot faster* on that Epyc
machine. It takes me a solid week, flat out, to work
on that panorama on my puny machine (image processing
happens at 1MB/sec average when it's paged out to a
disk drive). But, how often do you process
a large panorama ? Not that often.

The good thing is, you can set the RAM the OS uses, in
boot.ini or in the BCD, so you don't actually have to
commission all the RAM at boot time. You can tell the
OS to not use all of it. You can change the dimensions
of the machine at will, without pulling DIMMs from
the machine.

Paul
  #29  
Old October 17th 18, 08:40 PM posted to alt.comp.os.windows-10
Mike
external usenet poster
 
Posts: 185
Default Why isn't closing a program or game instantaneous?

On 10/17/2018 8:34 AM, Jimmy Wilkinson Knife wrote:
On Wed, 17 Oct 2018 04:29:36 +0100, John Doe
wrote:

"Jimmy Wilkinson Knife" wrote:

When you close a program or game, provided you're not saving a
file, why doesn't it happen immediately?* What on earth has it to
do?


It is instantaneous for some programs. Just depends on the program.
Dragon NaturallySpeaking takes a while to close, because it is a complex
program.


I fail to see why even a very complex program takes a long time to stop
doing things.* Stopping something takes no time at all.


This happens with most everything.
Drive your car down the road at 100 MPH.
Turn off the ignition. You'd be very disappointed if the car halted
immediately...as would the people driving behind you.
You might not realize that the power brakes and power steering don't
work so well no more. Orderly shutdown IN CONTEXT is a good thing.

Chill and let the OS people worry about it...or go down to the patent
office and get help protecting your solution.


If you have Windows system sounds, like I have for ages, you can hear
programs closing stuff in the background. Some programs might take
longer than you think, if the time you think it takes is based only on
the window disappearing.

You might have a problem if a program does not signal that it is closing
by closing the active window. At least while someone from the old guard
was at Microsoft's helm, there were visual indications of activity.
Nowadays it's getting a little iffy, like all of the weird stuff in the
file manager, like the window focus changing after deleting a file (that
one is outrageous IMO). To be clear, I am not complaining about Windows,
generally.


  #30  
Old October 17th 18, 08:40 PM posted to alt.comp.os.windows-10
Frank Slootweg
external usenet poster
 
Posts: 1,226
Default Why isn't closing a program or game instantaneous?

Jimmy Wilkinson Knife wrote:
On Wed, 17 Oct 2018 19:05:52 +0100, Frank Slootweg wrote:

Jimmy Wilkinson Knife wrote:
On Wed, 17 Oct 2018 18:27:24 +0100, Wolf K wrote:

On 2018-10-17 11:34, Jimmy Wilkinson Knife wrote:
[...]

I fail to see why even a very complex program takes a long time to stop
doing things. Stopping something takes no time at all.
[...]

HDD activity.

Doing what exactly? I've already said the game was saved. Nothing
needs to be recorded to disk AT ALL.


Sigh! As has been said umpteen times: *Freeing* resources, whose
content or/and accounting is - fully or partially - on disk.

Give it a rest, will you!? This - operating system design - is yet
another area you obviously know little to nothing about.


You're talking absolute ****ing bull****.


Sure we do! BTW, exactly how much OS code, including memory management
code, did *you* write!? And for how many decades?

Freeing a resource takes
absolutely ZERO time. The memory my game was in is now empty.


Did you look up virtual memory management? Did you understand it,
*any* of it!?

The memory my game was in is now empty. It
doesn't have to be filled to exit the game.


Exactly *which* part of "on disk" didn't you understand? Exactly
*which* part of "accounting" didn't you understand?

It only has to be filled
when I start using another program which was previously paged.


Well, you got one bit right. Not that it's *relevant*, but still.

Are
you one of the 50% of the population with a 2 digit IQ?


Typical response of a pathetic, ignorant, clueless, stupid, obnoxious,
pompous, chest-thumping, delusional, ****!

You lot
really should be thrown off a cliff.


Nah, no need, you lot are already doing that to yourselves.
 




Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off






All times are GMT +1. The time now is 07:37 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 PCbanter.
The comments are property of their posters.