Ask Experts Questions for FREE Help!
  Advanced
Register  |  Log in  
   Ask    
 Answer  
  Help  

Ask QuestionsprogressAnswer QuestionsprogressBuild ReputationprogressBecome an Expert
 
Free Answers in 3 Easy Steps

Register Now
3 Steps

At Ask Me Help Desk you can ask questions in any topic and have them answered for free by our experts. To ask questions or participate in answering them you must register for a free account. By registering you will be able to:
  • Get free answers from experts in any of our 300+ topics.
  • Accept money for answers that you provide.
  • Communicate privately with other members (PM).
  • See fewer ads.

Home > Computers & Technology > Operating Systems > Windows   »   Processes

 
Thread Tools Display Modes
Question
 
 
#1  
Old Apr 18, 2006, 06:55 AM
kp42484's Avatar
kp42484
Junior Member
kp42484 is offline
 
Join Date: Jan 2006
Location: Southwestern OH
Posts: 40
kp42484 See this member's comment history on his/her Profile page.
Send a message via MSN to kp42484 Send a message via Yahoo to kp42484
Processes

Can anyone explain why a single processor system can only have one process in the running state at a time? I've tried to find the answer in my textbooks, but they just state the obvious and don't answer why this is so. Does it have to do with scheduling? Resources?

Thanks in advance to anyone who can reply!

Reply With Quote
 
     

Answers
 
 
Old Apr 18, 2006, 07:35 AM   #2  
Ultra Member
NeedKarma is online now
 
NeedKarma's Avatar
 
Join Date: Dec 2004
Location: Online
Posts: 6,276
NeedKarma See this member's comment history on his/her Profile page.NeedKarma See this member's comment history on his/her Profile page.NeedKarma See this member's comment history on his/her Profile page.NeedKarma See this member's comment history on his/her Profile page.NeedKarma See this member's comment history on his/her Profile page.NeedKarma See this member's comment history on his/her Profile page.NeedKarma See this member's comment history on his/her Profile page.NeedKarma See this member's comment history on his/her Profile page.
Correct me if I am worng but most of us have single processor systems and, if we do a ctl-alt-del to see the Task Manager, we can always see several processes running at once on our machines.
  Reply With Quote
 
     
 
 
Old Apr 18, 2006, 08:21 AM   #3  
Computer Expert
ScottGem is offline
 
ScottGem's Avatar
 
Join Date: Jan 2003
Location: LI, NY - USA
Posts: 25,462
ScottGem See this member's comment history on his/her Profile page.ScottGem See this member's comment history on his/her Profile page.ScottGem See this member's comment history on his/her Profile page.ScottGem See this member's comment history on his/her Profile page.ScottGem See this member's comment history on his/her Profile page.ScottGem See this member's comment history on his/her Profile page.ScottGem See this member's comment history on his/her Profile page.ScottGem See this member's comment history on his/her Profile page.ScottGem See this member's comment history on his/her Profile page.ScottGem See this member's comment history on his/her Profile page.ScottGem See this member's comment history on his/her Profile page.
Pay to call ScottGem for advice ($.75/min)
Call ScottGem via Skype™
A processor can only do one thing at a time. Multi-tasking is handled by rapidly switching between processes so it appears to be doing multiple things.
  Reply With Quote
 
     
 
 
Old Apr 18, 2006, 09:05 AM   #4  
Full Member
cajalat is offline
 
Join Date: Jan 2006
Location: Boston, MA - USA
Posts: 426
cajalat See this member's comment history on his/her Profile page.
That was true for a long time that only one process can be in the running state at any given time. Other processes that needed CPU cycles would be in the READY state and waiting for the Scheduled to give it attention as Scott correctly stated. However, with the advent of Hyper-Threading, and dual/multi-code CPU's you can indeed have multiple processes running at the same time. In Hyper-threading systems you can have two processes run at the same time. In Dual-Core systems you can have two processes run at the same time and if the dual-core system was also hyper-threading then you can have 4 processes run at the same time. And a process could potentially utilize two or more cores or Hyper-threads combination if the process was multi-threaded.

Casey

Comments on this post
ScottGem agrees: Right, I was referring to processors before HT or dual core. I guess they HT could be considered single processors, but I wouldn't describe dual core that way.
  Reply With Quote
 
     
 
 
Old Apr 18, 2006, 01:31 PM   #5  
Junior Member
kp42484 is offline
 
kp42484's Avatar
 
Join Date: Jan 2006
Location: Southwestern OH
Posts: 40
kp42484 See this member's comment history on his/her Profile page.
Send a message via MSN to kp42484 Send a message via Yahoo to kp42484
These are all good answers, and they clarified what I have learned about processes. BUT, the question is WHY?? Why doesn't the operating system let processes run concurrently? Why does the CPU have to switch between processes instead of just letting them run all at once, creating havoc (what would happen if it did)?

My textbook says: "Potentially, all these processes can execute concurrently, with the CPU multiplexed among them." Why potentially?

Not bashing any answers, it's just that my original question was why does it work like that? And as for hyperthreading, we're not allowed to consider that yet

Thanks
  Reply With Quote
 
     
 
 
Old Apr 18, 2006, 03:54 PM   #6  
Computer Expert
ScottGem is offline
 
ScottGem's Avatar
 
Join Date: Jan 2003
Location: LI, NY - USA
Posts: 25,462
ScottGem See this member's comment history on his/her Profile page.ScottGem See this member's comment history on his/her Profile page.ScottGem See this member's comment history on his/her Profile page.ScottGem See this member's comment history on his/her Profile page.ScottGem See this member's comment history on his/her Profile page.ScottGem See this member's comment history on his/her Profile page.ScottGem See this member's comment history on his/her Profile page.ScottGem See this member's comment history on his/her Profile page.ScottGem See this member's comment history on his/her Profile page.ScottGem See this member's comment history on his/her Profile page.ScottGem See this member's comment history on his/her Profile page.
Pay to call ScottGem for advice ($.75/min)
Call ScottGem via Skype™
It not a matter of letting, its a matter of the limitations of the chip. Your textbook is discussing a technique (multiplexing) that is similar to Hyper threading and not available in chips until recently.
  Reply With Quote
 
     
 
 
Old Apr 18, 2006, 04:57 PM   #7  
Full Member
cajalat is offline
 
Join Date: Jan 2006
Location: Boston, MA - USA
Posts: 426
cajalat See this member's comment history on his/her Profile page.
Well in theory processes can run at the same time but the Operating System schedules so much CPU time/cycles per process. At a basic level, the CPU executes what's called Microcode instructions. These instructions can take less than 1 clock cycle to multiple clock cycles to execute depending on the CPU architecture and what the instruction does. But in a given second the CPU could run many micro instruction. The OS sits on top of that and sort of controls what process gets what attention. It (the OS) can schedule two processes to share some of the CPU cycles by giving a quantum of time for each process. So a process gets a fraction of a microsecond (quantum) to do what it pleases with the CPU and then the next quantum is given to the next process and so forth. This gives the effect of sharing the CPU but not exactly at the same time though it seems that way. Now suppose a program is multithreaded where portions of the program and go off running doing something in the background while the rest of the program does something else (e.g. saving a copy of a document in the background while letting you continue to edit a document). If you have two CPU's (or dual core, or HT), the program can fork a child process to run on another CPU which goes off and saves a copy of a document while the main process runs on the first CPU allowing you say to edit a document. This still one process per CPU. However, a CPU architecture can be such that a process that forks (a multi-threaded process) can use different portions of the same CPU at the same time.

So to answer your question (I think/hope) the CPU doesn't really make the decision to let all process run at the same time, it is the OS that does that. And the OS needs to schedule not just the CPU cycles but also access to the memory and if each process tried to access the same memory space and use the CPU at the same time then we'd have a mess on our hands. The OS thus schedules each process to run.

Is this sort of what you were getting at? Let us know and maybe we can hone in better on your question.
  Reply With Quote
 
     
 
 
Old Apr 19, 2006, 07:27 AM   #8  
Junior Member
kp42484 is offline
 
kp42484's Avatar
 
Join Date: Jan 2006
Location: Southwestern OH
Posts: 40
kp42484 See this member's comment history on his/her Profile page.
Send a message via MSN to kp42484 Send a message via Yahoo to kp42484
Cajalat, you said "And the OS needs to schedule not just the CPU cycles but also access to the memory and if each process tried to access the same memory space and use the CPU at the same time then we'd have a mess on our hands. The OS thus schedules each process to run."

Thank you! Now it makes sense! So you're saying that the OS acts this way (I understood that, just not WHY) because the processes can't be allowed to access the same memory space at the same time? That is what I wanted to know--WHY does the OS do this, and what would happen if it just let all the processes be in the running state at the same time.

Thank you too, ScottGem, for your insights--they helped me better understand what I learned in class!

Thanks again
  Reply With Quote
 
     
 
 
Old May 2, 2006, 07:24 AM   #9  
Junior Member
jc105 is offline
 
Join Date: Feb 2006
Posts: 164
jc105 See this member's comment history on his/her Profile page.
Its very simple WHY...

Imagine that the CPU is a calculator, how many addition problems can you do at a time? One...

How many individual calculations you can do per second is way more important that concurrent. Dual core is literally TWO processors running individual transactions millions of times a second. Multiple processors act identical to dual core.

You'll note the XBOX 360 has 3 cores in their RISC chip and the PS3 will be sporting an 8-f******* core RISC based chip. RISC is the architecture based on supercomputers, created by IBM formerly used in the Mac G5.

So simple answer is that a processor can do one thing at a time, it just so happens that time can be .00000000000001 seconds to do mathematic calculations that humans would choke on.
  Reply With Quote
 
     

Bookmarks


Thread Tools
Display Modes

 
Similar Sponsors

Similar Threads
Question Asker Forum Answers Last Post
Processes Jesushelper76 Other Computers 2 Jul 4, 2006 09:07 PM




Copyright ©2003 - 2007, Ask Me Help Desk.
All times are GMT -8. The time now is 08:02 AM.