briefly explain process management in windows


Briefly explain process management in Windows 2000.

The Windows 2000 process manager provides for deleting, creating and using threads and processes. It has no knowledge about process hierarchies or parent-child relationships those refinements are left to the particular environmental subsystem that owns the process.

In Windows 2000 a process is an implementing instance of an application and a thread is a unit of code that is able to be scheduled by the operating system. Therefore a process contains one or more threads.

A process is started when several other process calls the CreateProcess routine. This routine loads several dynamic link libraries that are used by the process and creates a primary thread. An additional thread is able to be created by the CreateThread function.

An instance of process creation in the win32 environment is as follows. When a Win32 application calls CreateProcess a message is mail to the Win32 subsystem which calls the process manager to create a process. The process manger calls the object (entity) manager to create a process object, and afterward returns the object handle to Win32. Win32 calls the process manager once more to create a thread for the process and finally Win32 return handles to the new process and thread.       

Every dynamic executable file or link library that is loaded into the address space of a process is identified by an instance handle. The value of the instance handle is essentially the virtual address where the file is loaded. An application is able to get the handle to a module by passing the name of the module to GetModuleHandle.

Win32 uses 4 priority classes:

IDLE_PRIORITY_CLASS (priority level 4)

NORMAL_PRIORITY_CLASS (priority level 8)

HIGH_PRIORITY_CLASS (priority level 13)

REALTIME_PRIORITY_CLASS (priority level 24)

Processes are usually members of NORMAL_PRIORITY_CLASS. The priority class of a process be able to be changed with the SetPriorityClass function or by an argument being passed to the START command.

A thread starts with an initial priority determined by its class, but the priority is able to be changed by the SetThreadPriority function. This function acquires an argument that specifies a priority relative to the base priority of its class:

  • THREAD_PRIORITY_LOWEST: base-2
  • THREAD_PRIORITY_BELOW_NORMAL: base-1
  • THREAD_PRIORITY_NORMAL: base+0
  • THREAD_PRIORITY_ABOVE_NORMAL: base+1
  • THREAD_PRIORITY_HIGHEST: base+2

 

Again, the kernel has got 2 priority classes: 16-31 for the real-time class also 0-15 for the variable-priority class.

THREAD_PRIORITY_IDLE place the priority to 16 for real-time threads and to 1 for variable-priority threads.

THREAD_PRIORITY_TIME_CRITCAL sets the priority to 31 for real-time threads as well as 15 for variable-priority threads.

The Win32 API provides a process to disable this adjustment, via SetThreadPriorityBoost and SetProcessPiorityBoost functions.

To coordinate the current access to shared objects by threads the kernel supplies synchronization objects such as semaphores and mutexes. Additionally, synchronization of threads is able to be achieved by using the WaitForMultipleObjects functions.

Request for Solution File

Ask an Expert for Answer!!
Operating System: briefly explain process management in windows
Reference No:- TGS0307522

Expected delivery within 24 Hours