On TechRepublic: Why Android beats iPhone
BNET Business Network:
BNET
TechRepublic
ZDNet
TalkBack 32 of 116:
Next »
« Previous
It's a bit more complex than that . . .
"What hes saying is software doesn't ask the cpu to run an operation. It tells the os hey, I need this done, the os does it, and then gets back to software. There is a layer between the hardware and the software called the os or Operating system."

Well, there are two extremes, and Windows is somewhere in the middle.

DOS was one extreme, and software usually ran nearly 100% on the CPU with the OS doing almost nothing (other than a few simplistic mouse and video things)

Emulators are the other extreme, with every instruction being run by the emulator and the program has no access to the CPU at all (even though it is fooled into thinking so).

Windows is somewhere in the middle. If you're doing something like a math operation or a for loop, then as long as you don't exceed your time slice you're allowed to do the computations pretty much directly.

On the other hand, the user interface and I/O stuff is passed off to the OS and it handles them.

So Windows is sorta a hybrid of the two, but as processors become more powerful, it's moving towards being a virtualizer.

"Straighter to the point, yes software developers have to write code designed to be processed in parallel, "aka parallel processing", but the os has to be able to handle such a request. Currently both vista and xp takes a process assigns the least taxed core to its requests, and thats the end of it. There is no functionally for the software to tell the os, 'hey you can do both of these things at the same time if you want'."

Actually, there is: They're called threads. A developer can say "I want to do this set of operations in one thread, and that set of operations in another." The OS can then take each thread and place it in a different processor/core.

"I am unaware of any way to compile a single program in an x86 environment in such a way to accomplish this task."

Multiprocessing has nothing to do with compiling - it has to do with designing the program to be multithreaded.

"Currently both vista and xp takes a process assigns the least taxed core to its requests, and thats the end of it."

Hardly. Even before computers had multiple cores, they've been able to do many tasks at once on a single core.

DOS was what you're imagining: A process starts, everything goes into the background, and nothing else happens until the process finishes. This model has been dead for years.

Windows 3 allowed the ability to switch between several processes, and each process could hand control over to the OS, which would then pass control to the next program. The OS divided time into "slices" and tried to keep the distribution of the time spent by each program fairly equal. However, the OS was sill at the mercy of the program if the program didn't give up control of the CPU.

Windows 95 made the process switching mandatory - if a process didn't hand over control before the time slice was over, the OS forcibly yanked control from the process and handed it to the next program. There is no such thing as a true "background" process (except the OS's time slicer) in this model: A background process is simply one with a smaller time slice.

Of course, this time slicing is done thousands of times a second so you have the impression that they are all running simultaneously.

Now with true multiprocessing, processes can actually run simultaneously in a true parallel fashion - but the time slicing stuff is still in place: Control over the processor the code is running on is still taken away when the time slice is over.

Now enter threads: A thread is similar to a process in that it can have its own time slice and can be placed on a different processor than other threads, but it's owned and managed by a single process, and as such the developer can create a program that uses several processors.

You are right about one thing: Several processes trying to share memory is a problem, and that can cause programs to lockup. Usually it's left to the developer to determine how the program should bes communicate with other programs in a way to avoid deadlocks and race conditions.

Usually when that happens the user has to tell the OS to forcibly shut down the program(s) that are causing problems. The OS itself is largely unaffected by program lockups because the time slicer will eventually force the program to give up control and give control back to the OS.
Posted by: CobraA1   Posted on: 12/19/07 You are currently: a Guest | Members login | Terms of Use

Alert moderator to an offensive message

Subscribe to this discussion via Email or RSS

As my rep says, 2008 will be great!!!!  Mike Cox | 12/18/07
Heh...  techboy_z | 12/18/07
9.95 -  Wolfie2K3 | 12/19/07
Bell  professordnm | 12/19/07
10!!!  JLHenry | 12/19/07
When will Bill's big fear come true?  FlatAffect | 12/20/07
Say again Commi?  waldens1 | 08/13/09
way off  itchy8me | 07/31/09
Microsoft Will Hail The Launch Of Its Most Successful OS To Date  itanalyst | 12/18/07
They also pointed out that the iPhone  GuidingLight | 12/18/07
I don't know if I could  Michael Kelly | 12/18/07
I am in agreement with you there  GuidingLight | 12/18/07
I don't know if Ubuntu Fiesty Fawn came out in 2007, but OLPC did (just)  stevey_d | 12/31/07
Jesus  usmcdvldg@... | 12/18/07
Wish I could talk  Blogsworth | 12/18/07
ReactOS is coming along well  stevey_d | 12/31/07
Right on the mark!  ba943@... | 12/19/07
My predictions.  No_Ax_to_Grind | 12/18/07
Re: #8 & #9  Michael Kelly | 12/18/07
Further thoughts...  No_Ax_to_Grind | 12/18/07
Those who don't want to be "evangelists"  Confused by religion | 12/18/07
Is that true?  No_Ax_to_Grind | 12/18/07
I agree that a number of overseas MVPs were not re-awarded this year  Confused by religion | 12/18/07
Not too accurate  dfolk | 12/18/07
Shows how little you know about the MVPs  Confused by religion | 12/19/07
Word is the Head of the MVP program gave his notice  No_Ax_to_Grind | 12/20/07
MVP defined  devlin_X | 12/31/07
Agree some, disagree some.  CobraA1 | 12/18/07
Yes and no...  No_Ax_to_Grind | 12/18/07
Ah yes, that's the applications . . .  CobraA1 | 12/18/07
No  usmcdvldg@... | 12/19/07
It's a bit more complex than that . . .  CobraA1 | 12/19/07
YES YES  usmcdvldg@... | 12/19/07
hmmm . . ..  CobraA1 | 12/19/07
hmm  usmcdvldg@... | 12/20/07
more about threads . . .  CobraA1 | 12/20/07
WOW!  lag1980 | 12/19/07
Okay, smart guy: How does Vista NOT take advantage of multiple cores? (nt)  CobraA1 | 12/19/07
Ok, so here is my point...  lag1980 | 12/19/07
In other words, nothing revolutionary  CobraA1 | 12/19/07
OMG  usmcdvldg@... | 12/19/07
A fact of life  usmcdvldg@... | 12/19/07
Re: Number 9  Confused by religion | 12/18/07
You misunderstand Milly  No_Ax_to_Grind | 12/18/07
I understand perfectly  Confused by religion | 12/18/07
Care to publish said code of conduct  No_Ax_to_Grind | 12/18/07
re: Care to publish said code of conduct  MowGreen | 12/19/07
Re: Re: Number 9  none none | 12/18/07
Hmmm  HypnoToad72 | 12/18/07
Yikes  DarkPhoenixFF4 | 12/18/07
Huh?  El Tonto con Suerte | 12/19/07
Half and half  usmcdvldg@... | 12/19/07
language standard  stevey_d | 12/31/07
Wrong!  Ole Man | 12/19/07
Gawd help us ALL if Hilary wins!  jbaviera@... | 12/20/07
Well thought out  stevey_d | 12/31/07
What's with ZDNet and wanting the iPhone to enter the Enterprise?  CobraA1 | 12/18/07
Because it has potential  Michael Kelly | 12/18/07
LONG Laundry List...  Wolfie2K3 | 12/19/07
Edit Office docs on an iPhone? Who cares!  Fred Fredrickson | 12/24/07
good point  stevey_d | 12/31/07
Why do you need that?  Bruizer | 01/06/08
What's with ZDNet?  grail@... | 12/19/07
windows 7: 2008  Raiker | 12/18/07
here is my prediction  Linux Geek | 12/18/07
In that spirit  Michael Kelly | 12/18/07
ROTFL! (nt)  GuidingLight | 12/18/07
On the contrary...  techboy_z | 12/18/07
Well, No evil per say  usmcdvldg@... | 12/18/07
Or better yet  usmcdvldg@... | 12/18/07
There speaks the man  Blogsworth | 12/18/07
Poor baby  usmcdvldg@... | 12/19/07
naturally occuring doesn't mean good  voska1 | 12/19/07
Actaully he is about dead on  Linux User 147560 | 12/19/07
using *any* oil is the problem  stevey_d | 12/31/07
Raise you  stevey_d | 12/31/07
Here is a better prediction  GuidingLight | 12/18/07
...  DarkPhoenixFF4 | 12/18/07
Well now, if you bothered to poke around a bit  GuidingLight | 12/18/07
'nuff said  lag1980 | 12/19/07
And my follow up...  No_Ax_to_Grind | 12/18/07
owch  usmcdvldg@... | 12/18/07
How about this prediction  usmcdvldg@... | 12/18/07
Haven't you got  Blogsworth | 12/18/07
LOL  usmcdvldg@... | 12/19/07
If it theirs, then its theirs.  No_Ax_to_Grind | 12/19/07
I say its not  usmcdvldg@... | 12/19/07
And listen  usmcdvldg@... | 12/19/07
You aren't a judge...  No_Ax_to_Grind | 12/20/07
Ok  usmcdvldg@... | 12/20/07
Cute  Michael Kelly | 12/18/07
RE: Cute  bfilipiak@... | 12/19/07
One IMPORTANT thing missing ....  kd5auq | 12/18/07
Can't happen unless.....  jeffdickey | 12/24/07
Look for Vista Lite!  TripleII | 12/18/07
windows xp second edition?  aesirloke@... | 12/18/07
Why tarnish the XP name...  mrOSX | 12/19/07
RE: Windows XP second edition  bfilipiak@... | 12/19/07
The difference is  Michael Kelly | 12/19/07
I dunno . . .  JLHenry | 12/19/07
Message has been deleted.  i8thecat | 12/19/07
RE: The real predictions (#5)  bfilipiak@... | 12/19/07
BE carefull  usmcdvldg@... | 12/19/07
Microsoft release Longhorn in 2010  Randalllind | 12/19/07
RE: Microsoft Predictions for 2008: Games group housecleaning continues (Microsoft in 2008: 10 Predictions)  zeusx64@... | 12/19/07
RE: Microsoft Predictions for 2008: Games group housecleaning continues (Microsoft in 2008: 10 Predictions)  zeusx64@... | 12/19/07
RE: Microsoft Predictions for 2008: Games group housecleaning continues (Microsoft in 2008: 10 Predictions)  zeusx64@... | 12/19/07
iPhone & ActtiveSync  Ethical_Loner | 12/19/07
Yawn  Bearcat_z | 12/19/07
I Predict Not ONE No_Ax Prediction Will Come True  itanalyst | 12/19/07
Except  usmcdvldg@... | 12/19/07
My rep sais...  sykandtyed | 12/19/07
Vista Home Premium v Fiji  ben.rattigan | 12/20/07
I'll Give It A 6.5 = IPhone Home E.T.  michaelleo@... | 12/20/07
Head of the MVP program  Bitzie | 01/02/08
RE: Microsoft Predictions for 2008: Games group housecleaning continues (Microsoft in 2008: 10 Predictions)  soooosweeet | 04/14/08

What do you think?

SponsoredWhite Papers, Webcasts, and Downloads

advertisement
advertisement

SmartPlanet

Click Here