The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com



UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
child process state smreddy UNIX for Dummies Questions & Answers 8 12-24-2007 12:51 AM
state mach{ne... parasa High Level Programming 2 10-20-2005 06:52 AM
Display Mirror State AIX fenomen UNIX for Dummies Questions & Answers 2 07-08-2003 12:21 PM
Function in a blocked state. vjsony High Level Programming 2 08-08-2002 02:15 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 09-06-2006
ianlow ianlow is offline
Registered User
  
 

Join Date: Sep 2006
Posts: 5
Process State

If your process makes a system call, then while the system call code is being run in the kernel, is your process READY, RUNNING or BLOCKED?
  #2 (permalink)  
Old 09-06-2006
jim mcnamara jim mcnamara is offline Forum Staff  
...@...
  
 

Join Date: Feb 2004
Location: NM
Posts: 5,763
Think of scheduling like this:

There is one copy of the kernel. When a process is the current one, the kernel "attaches" itself (called a context switch) to the process memory. So when the kernel runs a system call on behalf of the process, it is "attached", and runs in the context of the process. It's not two separate entities running.

Process states (in UNIX) are:

R - runnable which means the process has done a context switch and has the kernel.
S - sleeping which means the process is waiting on I/O completion (blocked), a pipe, memory, etc.
T - process has been stopped - sent a SIGSTOP usually with ctrl/z
Z - zombie - a process that has a process image in memory but no context, ie., not swappable.

You can see this in the ps output. If you are not on Linux an have SVR4 flavor of ps,
then you will see another "state"
O - means the process is the one that currenlty has the cpu.

What you ask has to do with system calls like read which block. I don't know what you meant by process state, since I/O blocked=one of the sleep categories
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 10:15 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0