![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
|
|
#1 |
|
Newbie
Join Date: Apr 2006
Posts: 1
Rep Power: 0
![]() |
How Can a Prog Do Nothing?
I recently tried to use DVDShrink to copy a DVD which it wouldn't do.
The DVDShrink experts told me that it was because the DVD I was using was old and scratched. (I know, that's why I wanted to copy it) But DVDShrink didn't just give up. What it did was take dozens of hours. It went all night and still wasn't there. When I looked at the Task Manager the Idle process was using 98% of cpu cycles. When I looked closer I couldn't find any process that had anything to do with DVDShrink. Now how can a program spend so much time doing nothing? What is it doing? Is this acceptable behaviour or is this a programming mistake and if it is, what is the mistake? regards, ab ![]() |
|
|
|
|
|
#2 |
|
Professional Programmer
Join Date: Jun 2005
Location: India, The great.
Posts: 435
Rep Power: 4
![]() |
May be the program is trying to do something over and over again and failing every time.
__________________
PFO - My daily dose of technology. |
|
|
|
|
|
#3 | |
|
Programming Guru
![]() Join Date: Jun 2005
Location: elemental plane
Posts: 1,429
Rep Power: 5
![]() |
Quote:
__________________
"Employ your time in improving yourself by other men's writings, so that you shall gain easily what others have labored hard for." -- Socrates |
|
|
|
|
|
|
#4 |
|
Resident Grouch
![]() ![]() ![]() ![]() ![]() ![]() Join Date: Jun 2005
Posts: 6,453
Rep Power: 10
![]() |
Despite the code posted on the forum, there is error checking in the world. Typically, for a disk read, there will be a number of retries. If the read is critical, the number of retries may be high. If the read is absolutely essential, a large number of retries will be followed by giving up. You may even have seen this phenomenon if you've tried to install an OS with a flakey medium. I am not into the characteristics of CDs, but I can tell you that there are many reasons for magnetic media to fail at first, then eventually succeed. There are also ways to jink with the media reader at a low level, but they aren't commonly employed.
One thing that can be done with flakey media (such as a bar-code on a fiche) is to make many reads and derive some composite result. One may do this a few times and accept the most likely candidate by 'vote'. Sometimes one deals with probabilities of success rather than absolute tolerancing.
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code. Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers |
|
|
|
|
|
#5 |
|
Programmer
Join Date: Mar 2006
Location: Tennessee
Posts: 41
Rep Power: 0
![]() |
Some copy-protection actually defeats copying a disk. From what I've heard, they purposely put broken sectors or something on the disk, and without such and such a key, you don't get a clean copy.
|
|
|
|
|
|
#6 | |
|
SEXY SHOELESS GOD OF WAR!
![]() Join Date: Jun 2005
Location: Wet west coast of Canada
Posts: 1,193
Rep Power: 5
![]() |
Quote:
Of course, it wouldn't immediately reject the disk. The programmers were sneaky, and would have the game continue for some time, and mysteriously fail at some later point. Intermittent crashes with the game were a common result of a pirated disk.
__________________
And once again, Probability proves itself willing to sneak into a back alley and service Drama as would a copper-piece harlot. - Vaarsuvius, Order of the Stick |
|
|
|
|
|
|
#7 | |
|
Programming Guru
![]() Join Date: Jun 2005
Location: elemental plane
Posts: 1,429
Rep Power: 5
![]() |
Quote:
__________________
"Employ your time in improving yourself by other men's writings, so that you shall gain easily what others have labored hard for." -- Socrates |
|
|
|
|
|
|
#8 | |
|
SEXY SHOELESS GOD OF WAR!
![]() Join Date: Jun 2005
Location: Wet west coast of Canada
Posts: 1,193
Rep Power: 5
![]() |
Quote:
__________________
And once again, Probability proves itself willing to sneak into a back alley and service Drama as would a copper-piece harlot. - Vaarsuvius, Order of the Stick |
|
|
|
|
|
|
#9 | |
|
Programming Guru
![]() Join Date: Jun 2005
Location: elemental plane
Posts: 1,429
Rep Power: 5
![]() |
Quote:
__________________
"Employ your time in improving yourself by other men's writings, so that you shall gain easily what others have labored hard for." -- Socrates |
|
|
|
|
|
|
#10 |
|
Resident Grouch
![]() ![]() ![]() ![]() ![]() ![]() Join Date: Jun 2005
Posts: 6,453
Rep Power: 10
![]() |
I guess programs are like programmers, too. Turn your back, some of 'em do nothing.
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code. Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|