Diagram of Process and Thread

This is one of some processes state:



  • Running: The process that is currently being executed. For this chapter, we will assume a computer with a single processor, so at most one process at a time can be in this state.
  • Ready: A process that is prepared to execute when given the opportunity.
  • Blocked/Waiting: A process that cannot execute until some event occurs, such as the completion of an I/O operation.
  • New: A process that has just been created but has not yet been admitted to the pool of executable processes by the OS. Typically, a new process has not yet been loaded into main memory, although its process control block has been created.
  • Exit: A process that has been released from the pool of executable processes by the OS, either because it halted or because it aborted for some reason.  

And this is Thread States of Windows from several threads state :

An existing Windows thread is in one of six states (Figure 4.14):

  • Ready: May be scheduled for execution. The Kernel dispatcher keeps track of all ready threads and schedules them in priority order.
  • Standby: A standby thread has been selected to run next on a particular processor. The thread waits in this state until that processor is made available. If the standby thread’s priority is high enough, the running thread on that processor may be preempted in favor of the standby thread. Otherwise, the standby thread waits until the running thread blocks or exhausts its time slice.
  • Running: Once the Kernel dispatcher performs a thread switch, the standby thread enters the Running state and begins execution and continues execution until it is preempted by a higher priority thread, exhausts its time slice, blocks, or terminates. In the first two cases, it goes back to the ready state.
  • Waiting: A thread enters the Waiting state when (1) it is blocked on an event (e.g., I/O), (2) it voluntarily waits for synchronization purposes, or (3) an environment subsystem directs the thread to suspend itself. When the waiting condition is satisfied, the thread moves to the Ready state if all of its resources are available.
  • Transition: A thread enters this state after waiting if it is ready to run but the resources are not available. For example, the thread’s stack may be paged out of memory. When the resources are available, the thread goes to the Ready state.
  • Terminated: A thread can be terminated by itself, by another thread, or when its parent process terminates. Once housekeeping chores are completed, the thread is removed from the system, or it may be retained by the executive9 for future reinitialization.

Resume By :

Fenny R.


Book –> Operating Systems, William Stalling 6th-Edition

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s