qbasic taking up 100% of cpu!
qbasic taking up 100% of cpu!
Hey folks! Hope you can help me with a minor, but irritating problem I'm having with quickbasic 4.5 running in Windows XP (sp2)
As soon as qbasic is running in its dos window I notice it's taking up 100% of the cpu resources. Looking in Windows Task Manager I see that it is the process ntvdm.exe that's hogging up all the %. If I close qbasic, cpu usage goes back to normal (0%)
Anyone know how I can solve this? From the looks of things around this board, there are quite a number of you out there using qbasic under Winxp with no problems at all, and frankly I'm envious!
As soon as qbasic is running in its dos window I notice it's taking up 100% of the cpu resources. Looking in Windows Task Manager I see that it is the process ntvdm.exe that's hogging up all the %. If I close qbasic, cpu usage goes back to normal (0%)
Anyone know how I can solve this? From the looks of things around this board, there are quite a number of you out there using qbasic under Winxp with no problems at all, and frankly I'm envious!
-
- Veteran
- Posts: 703
- Joined: Sun Nov 14, 2004 7:36 am
- Contact:
I would say the first question I need to ask you is.
1. Do you have all service packs?
2. What does your system have (CPU Speed, RAM, HD capacity, Video Card etc etc...)
I got XP and running QB fine....I never checked if it took all the CPU though lol. but I don't think so because I usually have it opened with an average of 7 other applications lol....so let's start with your system configuration and take it from there.
1. Do you have all service packs?
2. What does your system have (CPU Speed, RAM, HD capacity, Video Card etc etc...)
I got XP and running QB fine....I never checked if it took all the CPU though lol. but I don't think so because I usually have it opened with an average of 7 other applications lol....so let's start with your system configuration and take it from there.
When God created light, so too was born, the first Shadow!
MystikShadows
Need hosting? http://www.jc-hosting.net
Interested in Text & ASCII development? Look no further!
http://www.ascii-world.com
MystikShadows
Need hosting? http://www.jc-hosting.net
Interested in Text & ASCII development? Look no further!
http://www.ascii-world.com
- ShadowWolf
- Veteran
- Posts: 56
- Joined: Thu Mar 04, 2004 1:32 pm
- Contact:
cdcuase is right any dos app will kill the cpu resource's most likely since dos is running though a piss poor VM. you could always try a another Dos emulator.
or simple give up QB and start using FB (www.freebasic.net)
or simple give up QB and start using FB (www.freebasic.net)
That's exactly it. WinXP doesn't natively support DOS, so when you run DOS apps through the "Command Prompt," you're actually emulating the DOS environment. Emulation is processor intensive, plus the XP DOS VM is absolute garbage.
I have noticed that a lot of Freebasic apps take up 100% of the CPU too, though...
I have noticed that a lot of Freebasic apps take up 100% of the CPU too, though...
Pete, yah
Poorly coded FB crap takes 100%
Namely, ones that rely on SLEEP for delay... or ones that use SDL and SDL_Flip inproperly.
Both sleep and sdl_flip have a bug that makes them suck up 100% CPU if called too often..
though, only on low end computers, so the people with 3ghz computers wont notice.
C Bug:
"It works for me, stfu!"
"It runs smoothly on my 15GHz computer with 128gb ram, n00b!"
Poorly coded FB crap takes 100%
Namely, ones that rely on SLEEP for delay... or ones that use SDL and SDL_Flip inproperly.
Both sleep and sdl_flip have a bug that makes them suck up 100% CPU if called too often..
though, only on low end computers, so the people with 3ghz computers wont notice.
C Bug:
"It works for me, stfu!"
"It runs smoothly on my 15GHz computer with 128gb ram, n00b!"
I have left this dump.
That is exactly right.. I did a bit more searching (ala google) and discovered that my Dos/XP problem was shared by a lot more people. Has something to do with the way Dos was designed a hundred years ago...
Found a site that helped fix the 100% cpu usage. Tamedos.com offeres a neat little program that basically "tames" dos. I installed it and now my cpu gets a much needed break whenever a dos app is loaded up. The program is shareware, however, so in 30 days I may have to look for another means of solving this little prob.
Found a site that helped fix the 100% cpu usage. Tamedos.com offeres a neat little program that basically "tames" dos. I installed it and now my cpu gets a much needed break whenever a dos app is loaded up. The program is shareware, however, so in 30 days I may have to look for another means of solving this little prob.
- Mitth'raw'nuruodo
- Veteran
- Posts: 839
- Joined: Sat Jan 22, 2005 11:04 am
- Location: Eastern Coast of US
- Contact:
i also have a problem with this. i like to program with music going on in the background, but media player is always so slow and it sometimes skips. it also screws with qbasic. and dont even mention the internet...
And you will come to find that we are all one mind, capable of all that's imagined and all conceivable - Maynard
Halifax, slow computer?
In any case, try changing to Winamp, you can set the priority of winamp so it wont hog the system, like WMP does. WMP is the biggest resource hog ever.
Mitth, not sure, I don't use WinXP. Probably as easy as righclicking on the exe or something (the DOS VM exe that is)
In any case, try changing to Winamp, you can set the priority of winamp so it wont hog the system, like WMP does. WMP is the biggest resource hog ever.
Mitth, not sure, I don't use WinXP. Probably as easy as righclicking on the exe or something (the DOS VM exe that is)
I have left this dump.
- Mitth'raw'nuruodo
- Veteran
- Posts: 839
- Joined: Sat Jan 22, 2005 11:04 am
- Location: Eastern Coast of US
- Contact:
-
- Veteran
- Posts: 1055
- Joined: Sun Jan 02, 2005 2:11 pm
- Location: At my computer
- Contact:
Why is FB's SLEEP like that? You know, the bug and all, makes little since......
Heh, I do know with QB1.1 or something that music wont play while running it.. but 4.5 and 7.1 seem to do it fine, course I was on my spare comp with a diff sound using those 2... I tried QB1.1 along time b4 I fried my audio on this one.
Wheter diff sound systems made a diff, dunno... can't check, that cpu is unusable since I had to swap monitors from it...
Heh, I do know with QB1.1 or something that music wont play while running it.. but 4.5 and 7.1 seem to do it fine, course I was on my spare comp with a diff sound using those 2... I tried QB1.1 along time b4 I fried my audio on this one.
Wheter diff sound systems made a diff, dunno... can't check, that cpu is unusable since I had to swap monitors from it...
-Kevin (aka:Rattra)
(x.t.r.GRAPHICS)
(x.t.r.GRAPHICS)
well i have a 900mhz computer with like 712 ram. i also have qb4.5. so im gonna download winamp (free?) and see how its different. thanks for the advice. too bad i cant run kazaa or whatever in the background.
And you will come to find that we are all one mind, capable of all that's imagined and all conceivable - Maynard
I dont know exactly how FB's sleep is coded.
It has the same kind of bug as SDL_Flip
SDL_Flip's bug comes from the flip not happening on extremely high end machines, running at high herz rates for the monitor/gfx card. So they "improved" the formula, so it wouldnt skip frames (single herzes, sort of) making it a bit faster on those high end 100hz+ machines, but slow as hell on normal machines with 60hz.
It's a documented "bug" and it seems the SDL teams arent going to improve it, not too big of a problem though, easy to code around.
FB's sleep could do something simmillar, use a CPU intensive loop to check for the sleep-end value, but i dont know.
Best advice, DONT ever use SLEEP for delays, bad:
Instead use timer, or simillar.
Ofcourse, using a single sleep to wait for a keypress is ok.
Yes, winamp is free.
It has the same kind of bug as SDL_Flip
SDL_Flip's bug comes from the flip not happening on extremely high end machines, running at high herz rates for the monitor/gfx card. So they "improved" the formula, so it wouldnt skip frames (single herzes, sort of) making it a bit faster on those high end 100hz+ machines, but slow as hell on normal machines with 60hz.
It's a documented "bug" and it seems the SDL teams arent going to improve it, not too big of a problem though, easy to code around.
FB's sleep could do something simmillar, use a CPU intensive loop to check for the sleep-end value, but i dont know.
Best advice, DONT ever use SLEEP for delays, bad:
Code: Select all
do
sleep 5
loop
Ofcourse, using a single sleep to wait for a keypress is ok.
Yes, winamp is free.
I have left this dump.
- Mitth'raw'nuruodo
- Veteran
- Posts: 839
- Joined: Sat Jan 22, 2005 11:04 am
- Location: Eastern Coast of US
- Contact:
-
- Veteran
- Posts: 1055
- Joined: Sun Jan 02, 2005 2:11 pm
- Location: At my computer
- Contact:
What a delay if it want work?
You mean a timer delay, like this?:
Oh well,....
You mean a timer delay, like this?:
Code: Select all
T! = TIMER: DO: LOOP UNTIL (TIMER - T!) = 0.1
-Kevin (aka:Rattra)
(x.t.r.GRAPHICS)
(x.t.r.GRAPHICS)
- Mitth'raw'nuruodo
- Veteran
- Posts: 839
- Joined: Sat Jan 22, 2005 11:04 am
- Location: Eastern Coast of US
- Contact:
-
- Veteran
- Posts: 1055
- Joined: Sun Jan 02, 2005 2:11 pm
- Location: At my computer
- Contact: