Creation
and Deletion of Use & System Processes
In the operating system, the process creation & termination is
utilized for creating and deleting the processes. The process creation in the operating
system is performed due to various reasons. Some of the key reasons are
explained below:
·
The request of User for Process Creation System initialization
Process in the operating system can be formed with the help of a process
known as fork (). The process which is being created is described as child
process whereas the creating process is described as the parent process. The
child process will have only one parent, but the parent process may have
several child processes. The child processes & the parent processes both
have the same type of memory, environment strings, and open files. Nevertheless,
the address spaces of both parent process & child process will be
distinctive. In order to understand how the user & system process is
created a diagram is presented below which explains how to process in the
operating system is created.
Source: https://www.tutorialspoint.com/assets/questions/media/12684/Process%20Creation%20using%20fork().PNG
The above diagram is depicting the creation of the process
by utilizing fork (). As discussed earlier the process is created when it is
requested by the user or due to the system initialization. However, the created
process can be terminated by following the process termination process.
For terminating the process, the exit system call is
utilized in the operating system. Through this, the process in the operating
system is terminated. The process in the operating system is terminated due to
various reasons. Some of the main reasons for terminating the process are explained
below.
The process in the operating system is
terminated when the process is completed naturally in the system. After
termination, the process exit from the processor and issue the resources that
it has (Comer, 2011).
·
The child process can be terminated when the
parent process gives the request for its termination in the operating system.
·
Usually, such a process is terminated who
starts using the resources which are not allowed for the process. For instance,
a process starts writing into those files which are read-only.
·
The process is also terminated when I/O
failure immerges in the system. For instance, the process needs a scanner, and
the scanner is not working; therefore the process will be deleted.
·
If the parent process is deleted, then the child
process will also be deleted as of a result because the child process does not
have the ability to exist without the parent process.
·
If the memory of the system is low and the
process requires more memory than the process will also come to an end.
Suspension and Resumption of Processes Activities in
Operating Systems
In the operating system, there are several reasons for which the
processes are paused or suspended. Some of the key reasons include a request by
the user to suspend the particular process or by the operating system itself to
wait for the required resources. The OS usually change their process state to
waiting when they need some specific resources. When the resources get
available than the OS again change their state to resume state to execute the
process. Through suspension & resumption, the process gets completed and
then terminated in the computer system.
The availability of resources is not the only reason for the suspension
& resumption of processes. The user can also request for suspending the
process in the operating system and resuming it later when they think that all
the other important tasks have come to an end. Usually, users suspend the
process of the program when several other programs are in the line. The users
than suspend the process so that other important tasks can be performed first
and then resume the process when other tasks are completed. Through this not
only the tasks can be finished on time but also the process can be finished
without any issue or further interruption (Study Tonight, 2019).
The suspension of processes proves quite beneficial when the computer
system has low RAM and processor capability. With low Ram & Processor the
multi-tasking in the computer becomes difficult but with suspending the running
process multi-tasking in the system is possible. Another major benefit of the suspension
& resumption of processes is that the process will not have to start again
from the beginning it will resume from where it has been stopped. The suspend/resume
mechanism, however, consumes a huge amount of energy of the computer systems.
In short, it can be said that suspension & resumption of processes
is the way how various processes executed and finish their tasks. If the
processes are not suspended or resumed efficiently than their completion is not
possible. Today the researchers are finding new ways to improve the
suspension/resumption of processes so that they can take less energy and can be
completed efficiently in the systems.
Source: https://cs.nyu.edu/courses/spring01/V22.0202-002/chapters/figs/process-states.png
In order to understand the suspension & resumption of processes the
above diagram is presenting which is providing deep insights regarding this
process (Study Tonight, 2019).
The mechanism for process Synchronization of Activities
in Operating Systems
The process synchronization can be described as the procedure through
which processes share system resources in such a way that shared data can be
handled efficiently. The process synchronization helps to avoid the chance of
data inconsistency. Process synchronization helps the system to maintain data
consistency and synchronized execution of the process. The process
synchronization was established because due to different multi-tasking problems
arises which include critical section problem and other such problems. Below is
the diagram which shows critical section problem in detail:
Source: https://www.studytonight.com/operating-system/images/critical-section-problem.png
Critical section problem can be explained as the segment which is
accessing variables that are shared and will be executed as minute action. In a
group of processes at some time the only a single process will be executing the
critical section. It means that if any other process has to execute the
critical section, it will have to wait. The other process will get the critical
section when the first process is finished. In the above diagram, the critical
section can be seen along with the whole process. However, there is a solution to
this problem which will resolve the issue of the critical section (Comer, 2011).
The synchronization hardware can be used for supporting the section
code. The problem can be easily solved if interrupts are disallowed during
sharing of variables. Through this, the execution can be done in order. The
disallowing of interrupts is possible in the single microprocessor environment;
however, in the multi-processor environment, it is quite a difficult task. In a
multi-processor environment disallowing multiprocessor is very time-consuming.
Another major solution to the critical section problem is a mutual exclusion.
Overall if all the above facts are discussed than it can be said that the
process synchronization is highly important to execute the processes
efficiently. If the process were not synchronized than various issues might
arise (G.S.SRIDHAR, 2016).
When various problems arise in the system than it becomes important to
find new ways to improve synchronization, today the scientists are looking for
ways to improve the processes so that the efficiency of the computer systems
can be enhanced. The process synchronization helps to avoid the chance of data
inconsistency. Process synchronization helps the system to maintain data
consistency and synchronized execution of the process. In the future it can be
said that.
References of Activities in Operating Systems
Comer, D. (2011). Operating
System Design: The Xinu Approach, Linksys Version. CRC Press.
G.S.SRIDHAR. (2016). Operating System. G.S.SRIDHAR.
Study Tonight. (2019). Process Synchronization.
Retrieved from
https://www.studytonight.com/operating-system/process-synchronization