Escolar Documentos
Profissional Documentos
Cultura Documentos
ABSTRACT
Orphans in the distributed system waste system resources by holding these for completing the unwanted
computations. Many ways are put forward to detect and kill orphans in the distributed system. The algorithm which is
proposed in this paper will detect and kill the orphan process after regressive connection testing between server and client.
To detect and kill orphan process IP address of the particular client which is disconnected due to some unavoidable
circumstances and the PIN (Process Identification Number) of the process which was requested by the client which is no
longer connected to the server are used. Server will send kill command to particular process which was requested by the
client which is no more connected to the server and hence orphan process is detected and killed.
KEYWORDS: Orphan Process, Client Process, Server Process, Test Connection, Kill Command, PIN
INTRODUCTION
Orphan Process
An orphan process is nearly the same thing we see in the real world. Orphan means someone whose parents are
dead. The same way orphan process is a child process whose parent process is dead, that means the parent is either
terminated, killed or aborted but the child process is still alive. A process can be orphaned unintentionally, such as when
the parent process terminates or crashes. A process may also be intentionally orphaned so that it becomes detached from
the user's session and left running in the background; usually to allow a long-running job to complete without further user
attention, or to start an indefinitely running service.
Disadvantages of Orphan Process in a Distributed System
Orphan process is harmful for the system because they utilize resources while they are in the system and can
potentially leave a server starved for resources. Having too many orphan processes can hang up a system. So, orphan
processes are unwanted computations executing either on behalf of aborted and crashed processes or even the
communication link between the client and server may fail. Apart from these failures, there may be hardware and software
failures, database corruption, memory mismanagement etc. and they need to be dealt with. They are undesirable because
they squander system resources, increasing computational costs, wastage of CPU time, memory, databases, creates
deadlock by holding locks/resources needed by non-orphans, and produces inconsistent data etc.
Orphan process also creates havoc in a persons daily life [1]. Consider a scenario where we are visiting an ATM
to withdraw money. So we insert the card and enter the PIN, then press Enter followed by the selection of transaction etc.
But due to some communication failures or any technical/mechanical/power failures, the ATM fails to dispense the money.
www.tjprc.org
editor@tjprc.org
16
Limi Kalita
And the worst part of this situation is that the intended cash has been deducted from the account without dispensing the
intended withdrawal at the user end. This situation has been created due to orphans. So orphan process should be detected
and killed followed by their birth.
RELATED WORKS
Nelsons Approaches
Nelson proposed four approaches for termination of orphans. They are Extermination, Reincarnation, Gentle
reincarnation, Expiration.
Extermination: In the extermination [4], before a client sends an RPC message, it makes a log entry telling what
it is about to do. The log is kept on disk or some other medium that survives crashes. After reboot, the log is
checked and the orphan is explicitly killed off. Here, the killing of orphan is done only after the rebooting of the
parent process that made the remote call. Until then, the orphan is active at the server site, just because the fact
that the server processes do not know the current status of the parent process that made the RPC to get some
services from the server process. Here the client sends the same request twice and gets the results back. Both
replies come back while resuming the client after crash. This type of scenario is not a promising one and it makes
data in an inconsistent state and the system an unreliable one.
Reincarnation: In the case of reincarnation [4], the RPCs do not record in the log; instead divide time up into
sequentially numbered epochs. When a client reboots, it broadcasts a message to all machines declaring the start
of a new epoch. When such broadcast comes in, all remote computations on behalf of that client are killed. When
they report back, their replies will contain an obsolete epoch number making them easy to detect. Here the client
sends epoch broadcast throughout the system and the server receives it regardless of the fact that it is meant for it
or not. The reply to the client is transmitted by the server if any RPC is there on behalf of the client.
Gentle Reincarnation: Another method put forward by Nelson called gentle reincarnation [4] which is slightly
different from the above method. The protocol works as follows, when epoch broadcast comes in, each machine
checks to see if it has any remote computations, and if so, tries to locate their owner. The computation is killed
only if the owner of a particular computation cannot be found.
Expiration: In this scheme [3], each process is assigned a time limit. If a process is still running when its time
limits arrives, it is simply destroyed. This scheme sets a time bound an orphan can exist before being destroyed.
Unfortunately, the expiration can lead to the destruction of non-orphaned processes.
17
killed immediately after the node crash. No waiting until the crash node gets rebooted.
PROPOSED SYSTEM
Design
Network Setup: It is a computer environment where many computers are connected directly or indirectly to
single computer. That single computer is known as server and rest of the computers are known as clients; basically this
type of computer layout is known computer network or setting up computer network. In this kind of scenario clients used
to send request to the server and server takes their request and processes it and then sends the output to the respective
clients.
Methodology
Connect the server with the clients with the help of wired or wireless medium.
Test Connection: To check whether the server is connected properly with the client we can use a simple
technique that is by sending hello messages from server to all clients. Meanwhile if the server receive
acknowledgement from all the clients then we can say that the clients and the server are connected. Make sure that
the clients and the server are connected properly otherwise the proposed algorithm will fail.
Client process: After the successful connection between server and clients, now the clients can request some
service from the server.
Server process: Server is a centralized device which is centrally connected to all the clients in a given network.
Servers main task is to fulfill the requests sent by the clients. Server will process the request and send it back to
the clients. After processing the request server will be waiting for the acknowledgement by the clients.
If acknowledgement is received then there is no orphan process and everything is fine in the given network. And
if the server does not receive acknowledgement within the given period of time then check the connection
between server and client. If connection is successful then server will wait for acknowledgement, and if
connection failed then it is due to orphan process.
www.tjprc.org
editor@tjprc.org
18
Limi Kalita
Since the client is not connected with server anymore and the process which is serving that particular clients
request will become orphan. Now using PIN, server will send the kill command to that particular orphan process which
was created upon the disconnected clients request and hence the orphan process is killed.
Flowchart to Detect and Terminate Orphan Process in a Distributed System
Figure 1
Server Flowchart
Figure 2
19
www.tjprc.org
editor@tjprc.org
20
Limi Kalita
CONCLUSIONS
A distributed system can consist of any number of possible configurations, such as mainframes, personal
computers, workstations, minicomputers, and so on. The goal of distributed computing is to make such a network work as
a single computer. In distributed computing all the computing devices are independent and can operate individually, there
is no problem even if a single system/computing device break down. Distributed computing has many advantages as well
as it has some drawbacks such as node failure, false computation and many more. One of the major drawbacks of
distributed computing is Orphan Process, the algorithm presented in this paper works on principle of connection testing. In
this algorithm before the start of any transaction there is a connection testing phase to check whether the clients are
connected or not if not then no transaction will take place. Only after successful connection transaction will start and
before dispatching the result to the various clients there is again connection testing phase if connection is successful only
then results will be dispatched. If connection testing fails then the server finds out the process which is now orphan
requested by the inactive client from the process table and terminates it by sending kill command. This algorithm
guarantees successful detection and termination of orphan process because each transaction has to go through two
connection testing phase, so there are maximum chances for detection of orphan process.
21
REFERENCES
1.
2.
3.
Shamsudeen. E and Dr. V. Sundaram, A Protocol to Detect and Kill Orphan Processes in Distributed Computer
Systems, IOSR Journal of Computer Engineering (IOSRJCE), Volume 5, Issue 1 (Sep-Oct. 2012).
4.
Shamsudeen.E and Dr. V. Sundaram, Comparison of Global Log and Monitor Approach with Various Orphan
Detection Algorithms, International Journal of Engineering Science Invention, Volume 2 Issue 7, July 2013
5.
Shamsudeen. E, V. Sundaram, Time Stamp Based Global log and monitor approach to handle orphans in
distributed systems, International journal of computer science and network security, Vol 11 No.8, August 2011,
123-125.
6.
http://docs.kde.org/stable/en/kde-workspace/ksysguard/process-controller.html
7.
http://www.cs.unc.edu/~dewan/242/s06/notes/pm/node3.html
8.
http://www.technologyuk.net/computing/operating_systems/process_management.shtml
9.
P. Balakrishna Prasad, Operating systems and systems programming, Second Edition, Scitech, October 2012.
www.tjprc.org
editor@tjprc.org