Process management in Windows 8

Process management in Windows 8

v   Windows 8 operating system services allows creation of new processes in response to a system call.
v  It allows users to create multiple numbers of processes with default attributes and identifiers
v  the creation of a new process , process control block is taken from the main memory that provides the parameter about the running process like process name, process priority, process state, CPU registers etc.
v  You can also destroy and remove the specified process from the computer system by responding to a system call.
v  Windows 8 operating system services allows creation of new processes in response to a system call. It allows users to create multiple numbers of processes with default attributes and identifiers. Any process cannot be started by its own but require system calling. With the creation of a new process , process control block is taken from the main memory that provides the parameter about the running process like process name, process priority, process state, CPU registers etc
v  Any newly created process can be removed from Windows 8 environment by using deleting system call from operating system. When any delete command is executed then the operating system de-allocate all resources allocated to the specified process and finally return the process control block back to the free main memory from which it is accessed.
v  Sometimes, due to lack of resources the situation might occurs in which forceful termination of currently running processes are required which is fulfilled by abort command which is as same as delete command. When abort command is called then the memory registers and dump memory information is transferred to the main memory and then all processes with dump memory locations are terminated.
v  Some processes are suspended from main memory because of less memory space. These all suspended processes are put under the suspended list and later operating system resume command provides resuming of suspended processes. Even we can also delay the execution of processes by changing the priority state of currently running processes.

Process management in Linux

Process management in Linux

There are generally two types of processes that run on Linux. Interactive processes are those processes that are invoked by a user and can interact with the user. Interactive processes can be classified into foreground and background processes. The foreground process is the process that you are currently interacting with, and is using the terminal as its stdin (standard input) and stdout (standard output).
There are two kinds of execution contexts in Linux. Process and lightweight processes. However, Linux makes no distinction among these forms from scheduling point of view. Linux uses lightweight processes to provide the features of a multithreaded application. The Linux kernel use to store information about each process in the process descriptor.
v Linux Processes
Linux can manage the processes in the system, each process is represented by a task_struct data structure (task and process are terms that Linux uses interchangeably).
This means that the maximum number of processes in the system is limited by the size of the task vector, by default it has 512 entries. As processes are created, a new task_struct is allocated from system memory and added into the task vector. To make it easy to find, the current, running, process is pointed to by the current pointer.
Linux supports real time processes. These processes have to react very quickly to external events (hence the term ``real time'') and they are treated differently from normal user processes by the scheduler. Although the task_struct data structure is quite large and complex, but its fields can be divided into a number of functional areas
v State
As a process executes it changes state according to its circumstances. Linux processes have the following states.
v Running
The process is either running (it is the current process in the system) or it is ready to run (it is waiting to be assigned to one the system CPU.
v Waiting
The process is waiting for an event or for a resource. Linux differentiates between two types of waiting process; interruptible and uninterruptible. Interruptible waiting processes can be interrupted by signals whereas uninterruptible waiting processes are waiting directly on hardware conditions and cannot be interrupted under any circumstances.
v Stopped
The process has been stopped, usually by receiving a signal. A process that is being debugged can be in a stopped state.
v Scheduling Information
The scheduler needs this information in order to fairly decide which process in the system most deserves to run,
v Identifiers
Every process in the system has a process identifier. The process identifier is not an index into the task vector, it is simply a number.
v Times and Timers
The kernel keeps track of a processes creation time as well as the CPU time that it consumes during its lifetime. Each clock tick, the kernel updates the amount of time in jiffies that the current process has spent in system and in user mode.
v Processor Specific Context

A process could be thought of as the sum total of the system's current state. Whenever a process is running it is using the processor's registers, stacks and so on. This is the processes context and, when a process is suspended, all of that CPU specific context must be saved in the task_struct for the process. When a process is restarted by the scheduler its context is restored from here.