Chapter-3 Process Management - Chapter 3: Process...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
Chapter 3 : Process Management Processes are one of the fundamental abstractions in unix operating system. A process is a program in execution which includes executing code, a set of resources such as open files, kernel data, processor state, an address space and one or more threads of execution. Threads are objects of activity in processes. Each thread has a program counter, process stack, a set of processor registers. Kernel schedules threads not processes. Linux threats threads and processes same. To Linux a thread is a process which can share some of its resources with other processes. On modern operating systems there are two types of virtualization. Processor and memory. With these virtualizations each process thinks that it is using all the cpu power and utilizing all memory available on the system. A process begins it is life with the fork() system call which creates a clone of current process. With exec*() family commands another program can be loaded for execution. When job is done exit() system call is used to kill a process. This function terminates the process and frees all resources. A parent process can get the state of termination status of child process by wait() system call. The terminated process gets into a special zombie state and waits for wait() command to inform its parent and then terminate.
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Process Descriptor and the Task Structure The kernel stores a list of processes in a doubly linked list called task list. Each element on the list is a process descriptor. Process descriptor contains all the information about a specific process. Like open files, address space, pending signals, process state. .. The task_struct structure is allocated by slab allocator. Prior to kernel 2.6 series struct task_struct wa s stored at the end of the kernel stack of each process.
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 5

Chapter-3 Process Management - Chapter 3: Process...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online