Bagus' OS202 Page!

Logo

Join my adventure in exploring Operating Systems!

View the Project on GitHub baguspr/os202

HOME


TOP 10 LIST WEEK 06

1. Process
A process is basically a program in execution. The execution of a process must progress in a sequential fashion.To put it in simple terms, we write our computer programs in a text file and when we execute this program, it becomes a process which performs all the tasks mentioned in the program.

2. Main Seven States of A Process

3. Process Control Block
Process Control Block is a data structure that contains information of the process related to it. The process control block is also known as a task control block, entry of the process table, etc

4. Process identifier
Process identifier (PID) is a number used by some operating system kernels (such as that of UNIX, Mac OS X or Windows NT) to uniquely identify a process.

5. fork()
System call fork() is used to create processes. It takes no arguments and returns a process ID. The purpose of fork() is to create a new process, which becomes the child process of the caller. After a new child process is created, both processes will execute the next instruction following the fork() system call.

We can differentiate the parent from the child by testing the returned value of fork():

6. Sleep
Sleep() is implemented at the OS level. The processor doesn’t spin when a task/thread/process is sleeping. That particular thread is put on a pending queue (the thread isn’t ready to run) until the time has expired at which point the thread will be placed on the ready to run queue.

7. execlp
The execlp system call duplicates the actions of the shell in searching for an executable file if the specified file name does not contain a slash (/) character. The search path is the path specified in the environment by the PATH variable. If this variable isn’t specified, the default path “:/bin:/usr/bin” is used.

8. Thread
A thread is a flow of execution through the process code, with its own program counter that keeps track of which instruction to execute next, system registers which hold its current working variables, and a stack which contains the execution history.

9. Pthread
Pthreads are defined as a set of C language programming types and procedure calls, implemented with a pthread.h header/include file and a thread library - though this library may be part of another library, such as libc, in some implementations.

10. Concurrency
Concurrency is the execution of the multiple instruction sequences at the same time. It happens in the operating system when there are several process threads running in parallel.