Distributed Computer System (Final Exam)
Distributed Computer System (Final Exam)
Distributed Computer System (Final Exam)
2.a.
Class APIIT extends Thread
{
Public void run()
{
For (int i=0; i<10; i++)
{
System.out.println(“Thread”
+
Thread.currentThread().getId() + “ is
running”);
}
}
}
Class APU extends Thread
{
Public void run()
{
For (int j=0; j<10; j++)
{
System.out.println(“Thread”
+
Thread.currentThread().getId() + “ is
running”);
}
}
}
public static void main(String args[ ])
{
APIIT a1=new APIIT( );
APU a2=new APU( );
a1.start( );
a2.start( );
}
2.b.
Synchronous
Asynchronous DS
DS
1. Data is sent 1. Data is sent
in form of blocks in form of bytes
or frames. or characters.
2. fast 2. slow
3. There is no 3. There is a gap
gap between present between
data. data.
4. Synchronous 4. Asynchronous
DS needs DS does not need
precisely synchronized clocks
synchronized as parity bit is used
clocks for the in this DS for
information of information of new
new bytes. bytes.
5. Costly 5. Economical
3.a. The four-security mechanism in
distributed system.
Access Control :
This mechanism is used to stop
unattended access to data which you
are sending. It can be achieved by
various techniques such as applying
passwords, using firewall, or just by
adding PIN to data.
Authentication exchange :
This security mechanism deals with
identity to be known in
communication. This is achieved at the
TCP/IP layer where two-way
handshaking mechanism is used to
ensure data is sent or not
Data Integrity :
This security mechanism is used by
appending value to data to which is
created by data itself. It is similar to
sending packet of information known
to both sending and receiving parties
and checked before and after data is
received. When this packet or data
which is appended is checked and is
the same while sending and receiving
data integrity is maintained.
Encipherment :
This security mechanism deals with
hiding and covering of data which
helps data to become confidential. It is
achieved by applying mathematical
calculations or algorithms which
reconstruct information into not
readable form. It is achieved by two
famous techniques named
Cryptography and Encipherment.
Level of data encryption is dependent
on the algorithm used for
encipherment.