The document discusses three RPC communication protocols:
1. The R protocol uses asynchronous communication with only request messages and no reply. This improves performance.
2. The RR protocol fits requests and replies into a single packet and caches replies to reduce overhead.
3. The RRA protocol adds acknowledgements to replies to make communication more reliable as it ensures replies are received.
File Replication : High availability is a desirable feature of a good distributed file system and file replication is the primary mechanism for improving file availability. Replication is a key strategy for improving reliability, fault tolerance and availability. Therefore duplicating files on multiple machines improves availability and performance.
Replicated file : A replicated file is a file that has multiple copies, with each copy located on a separate file server. Each copy of the set of copies that comprises a replicated file is referred to as replica of the replicated file.
Replication is often confused with caching, probably because they both deal with multiple copies of data. The two concepts has the following basic differences:
A replica is associated with server, whereas a cached copy is associated with a client.
The existence of cached copy is primarily dependent on the locality in file access patterns, whereas the existence of a replica normally depends on availability and performance requirements.
Satynarayanana [1992] distinguishes a replicated copy from a cached copy by calling the first-class replicas and second-class replicas respectively
File Replication : High availability is a desirable feature of a good distributed file system and file replication is the primary mechanism for improving file availability. Replication is a key strategy for improving reliability, fault tolerance and availability. Therefore duplicating files on multiple machines improves availability and performance.
Replicated file : A replicated file is a file that has multiple copies, with each copy located on a separate file server. Each copy of the set of copies that comprises a replicated file is referred to as replica of the replicated file.
Replication is often confused with caching, probably because they both deal with multiple copies of data. The two concepts has the following basic differences:
A replica is associated with server, whereas a cached copy is associated with a client.
The existence of cached copy is primarily dependent on the locality in file access patterns, whereas the existence of a replica normally depends on availability and performance requirements.
Satynarayanana [1992] distinguishes a replicated copy from a cached copy by calling the first-class replicas and second-class replicas respectively
Threads,
system model,
processor allocation,
scheduling in distributed systems
Load balancing and
sharing approach,
fault tolerance,
Real time distributed systems,
Process migration and related issues
INTRODUCTIONTO OPERATING SYSTEM
What is an Operating System?
Mainframe Systems
Desktop Systems
Multiprocessor Systems
Distributed Systems
Clustered System
Real -Time Systems
Handheld Systems
Computing Environments
Overview of Network Programming, Remote Procedure Calls, Remote Method Invocation, Message Oriented Communication, and web services in distributed systems
About Naming Concepts in Distributed systems.
More about its services, its types & the approaches of implementation for Name Space & Name Resolution and Locating Entities Approaches with example diagrams.
Remote Procedure Call in Distributed SystemPoojaBele1
Presentation to give description about the remote procedure call in distributed systems
Presentation covers some points on remote procedure call in distributed systems
Synchronization Pradeep K Sinha
Introduction
Issues in Synchronization
Clock synchronization
Event Ordering
Mutual Exclusion
Deadlock
Election algorithms
Clock Synchronization
How Computer Clocks are Implemented
Drifting of Clocks
Types of Clock Synchronization and issues in them
Clock Synchronization Algorithms
Distributed and Centralized Algorithms
Case Study
Event Ordering
Happened Before Relation
Logical Clocks Concept and Implementation
Mutual Exclusion
Centralized Approach, Distributed Approach, Token Passing Approach
Deadlocks
Election algorithms
4.1Introduction
- Potential Threats and Attacks on Computer System
- Confinement Problems
- Design Issues in Building Secure Distributed Systems
4.2 Cryptography
- Symmetric Cryptosystem Algorithm: DES
- Asymmetric Cryptosystem
4.3 Secure Channels
- Authentication
- Message Integrity and Confidentiality
- Secure Group Communication
4.4 Access Control
- General Issues
- Firewalls
- Secure Mobile Code
4.5 Security Management
- Key Management
- Issues in Key Distribution
- Secure Group Management
- Authorization Management
Threads,
system model,
processor allocation,
scheduling in distributed systems
Load balancing and
sharing approach,
fault tolerance,
Real time distributed systems,
Process migration and related issues
INTRODUCTIONTO OPERATING SYSTEM
What is an Operating System?
Mainframe Systems
Desktop Systems
Multiprocessor Systems
Distributed Systems
Clustered System
Real -Time Systems
Handheld Systems
Computing Environments
Overview of Network Programming, Remote Procedure Calls, Remote Method Invocation, Message Oriented Communication, and web services in distributed systems
About Naming Concepts in Distributed systems.
More about its services, its types & the approaches of implementation for Name Space & Name Resolution and Locating Entities Approaches with example diagrams.
Remote Procedure Call in Distributed SystemPoojaBele1
Presentation to give description about the remote procedure call in distributed systems
Presentation covers some points on remote procedure call in distributed systems
Synchronization Pradeep K Sinha
Introduction
Issues in Synchronization
Clock synchronization
Event Ordering
Mutual Exclusion
Deadlock
Election algorithms
Clock Synchronization
How Computer Clocks are Implemented
Drifting of Clocks
Types of Clock Synchronization and issues in them
Clock Synchronization Algorithms
Distributed and Centralized Algorithms
Case Study
Event Ordering
Happened Before Relation
Logical Clocks Concept and Implementation
Mutual Exclusion
Centralized Approach, Distributed Approach, Token Passing Approach
Deadlocks
Election algorithms
4.1Introduction
- Potential Threats and Attacks on Computer System
- Confinement Problems
- Design Issues in Building Secure Distributed Systems
4.2 Cryptography
- Symmetric Cryptosystem Algorithm: DES
- Asymmetric Cryptosystem
4.3 Secure Channels
- Authentication
- Message Integrity and Confidentiality
- Secure Group Communication
4.4 Access Control
- General Issues
- Firewalls
- Secure Mobile Code
4.5 Security Management
- Key Management
- Issues in Key Distribution
- Secure Group Management
- Authorization Management
Most modern applications are multithreaded
Threads run within application
Multiple tasks with the application can be implemented by separate threads
Update display
Fetch data
Spell checking
Answer a network request
Process creation is heavy-weight while thread creation is light-weight
Can simplify code, increase efficiency
Kernels are generally multithreaded
Scheduler Activations - Effective Kernel Support for the User-Level Managemen...Kasun Gajasinghe
Presentation slides presented by Kasun Gajasinghe and Nisansa de Silva at Dept. of Computer Science & Engineering, University of Moratuwa. Slides are for the paper titled “Scheduler Activations - Effective Kernel Support for the User-Level Management of Parallelism” by Thomas E. Anderson et.al.
Operating system (OS) itself is a process, what approaches are there.pdfJUSTSTYLISH3B2MOHALI
Operating system (OS) itself is a process, what approaches are there to distinguish an OS process
from other user processes. Briefly describe each approach and compare their relative
merits.Operating system (OS) itself is a process, what approaches are there to distinguish an OS
process from other user processes. Briefly describe each approach and compare their relative
merits.
Solution
A process is a program in execution, whereas a thread is a path of execution within a process.
Processes are generally used to execute large, ‘heavyweight’ jobs such as running different
applications, while threads are used to carry out much smaller or ‘lightweight’ jobs such as auto
saving a document in a program, downloading files, etc. Whenever we double-click an
executable file such as Paint, for instance, the CPU starts a process and the process starts its
primary thread.
From the kernel\'s perpective, each process has its own address space, file descriptors, etc and
one thread of execution. To support multiple threads at user-level, the process contains code to
create, destroy, schedule and synchronise user-level threads - which can be thought of as
mulitplexing many user-level threads onto the single kernel thread, all managed within the
process. The scheduler can run any arbitrary scheduling algorithms, and is independent of the
kernel\'s scheduler.
User-level threads can also satisfy a huge number of threads if necessary, as it can take
advantage of virtual memory to store user-level thread control blocks and stacks.
These are often cooperative schedulers, as there is usually only rudimentary support (if any) for
delivering timer ticks to the user-level scheduler. However the application must be specifically
written for cooperative scheduling, containg yields such that other threads have an opportunity to
run; a single badly written thread without enough yields can monopolise cpu time. Alternatively,
these can also be preemptive multitaskers, where the user level thread package receives regular
signals from the operating system, which may initiate the context switch. These have high
granularity though and aren\'t really practical.
Another important consideration is making system calls non blocking, so that the user-level
thread scheduler can schedule (overlap) execution of another thread with I/O latency rather than
blocking the whole process. This is not alway possible (either because of lack of async I/O
system calls), or because events such as page faults (which are always synchronous) will block
the process and all the user-level threads in side.
Advantages: User level threads are more configurable, as they may use any scheduling
algorithm, and they can also run on any OS (probably even DOS) since they do not require
kernel support for multiple threads. User level threading is also much faster, as they don\'t need
to trap to kernel space and back again.
User level threads packages are generally cooperatively scheduled as is usually only rudimentar.
A brief report on Client Server Model and Distributed Computing. Problems and Applications are also discussed and Client Server Model in Distributed Systems is also discussed.
project human resource management, project inteface,conflict management,steps in conflict management,sources of conflict and conflict resolution techniques,managing change
Road traffic issues, moreover, has become the backbone for major injuries ,deaths in recent times.The problem lies between negligence and the false approach towards the better analysis of traffic events.
To avoid road mishaps, it is not enough to just improve the road conditions, but also needs to control the traffic accidents happening by analyzing the cause-and-effect regulations.
Distribution transparency and Distributed transactionshraddha mane
Distribution transparency and Distributed transaction.deadlock detection .Distributed transaction and their types and threads and processes and their difference.
Overview of the fundamental roles in Hydropower generation and the components involved in wider Electrical Engineering.
This paper presents the design and construction of hydroelectric dams from the hydrologist’s survey of the valley before construction, all aspects and involved disciplines, fluid dynamics, structural engineering, generation and mains frequency regulation to the very transmission of power through the network in the United Kingdom.
Author: Robbie Edward Sayers
Collaborators and co editors: Charlie Sims and Connor Healey.
(C) 2024 Robbie E. Sayers
Saudi Arabia stands as a titan in the global energy landscape, renowned for its abundant oil and gas resources. It's the largest exporter of petroleum and holds some of the world's most significant reserves. Let's delve into the top 10 oil and gas projects shaping Saudi Arabia's energy future in 2024.
COLLEGE BUS MANAGEMENT SYSTEM PROJECT REPORT.pdfKamal Acharya
The College Bus Management system is completely developed by Visual Basic .NET Version. The application is connect with most secured database language MS SQL Server. The application is develop by using best combination of front-end and back-end languages. The application is totally design like flat user interface. This flat user interface is more attractive user interface in 2017. The application is gives more important to the system functionality. The application is to manage the student’s details, driver’s details, bus details, bus route details, bus fees details and more. The application has only one unit for admin. The admin can manage the entire application. The admin can login into the application by using username and password of the admin. The application is develop for big and small colleges. It is more user friendly for non-computer person. Even they can easily learn how to manage the application within hours. The application is more secure by the admin. The system will give an effective output for the VB.Net and SQL Server given as input to the system. The compiled java program given as input to the system, after scanning the program will generate different reports. The application generates the report for users. The admin can view and download the report of the data. The application deliver the excel format reports. Because, excel formatted reports is very easy to understand the income and expense of the college bus. This application is mainly develop for windows operating system users. In 2017, 73% of people enterprises are using windows operating system. So the application will easily install for all the windows operating system users. The application-developed size is very low. The application consumes very low space in disk. Therefore, the user can allocate very minimum local disk space for this application.
Final project report on grocery store management system..pdfKamal Acharya
In today’s fast-changing business environment, it’s extremely important to be able to respond to client needs in the most effective and timely manner. If your customers wish to see your business online and have instant access to your products or services.
Online Grocery Store is an e-commerce website, which retails various grocery products. This project allows viewing various products available enables registered users to purchase desired products instantly using Paytm, UPI payment processor (Instant Pay) and also can place order by using Cash on Delivery (Pay Later) option. This project provides an easy access to Administrators and Managers to view orders placed using Pay Later and Instant Pay options.
In order to develop an e-commerce website, a number of Technologies must be studied and understood. These include multi-tiered architecture, server and client-side scripting techniques, implementation technologies, programming language (such as PHP, HTML, CSS, JavaScript) and MySQL relational databases. This is a project with the objective to develop a basic website where a consumer is provided with a shopping cart website and also to know about the technologies used to develop such a website.
This document will discuss each of the underlying technologies to create and implement an e- commerce website.
TECHNICAL TRAINING MANUAL GENERAL FAMILIARIZATION COURSEDuvanRamosGarzon1
AIRCRAFT GENERAL
The Single Aisle is the most advanced family aircraft in service today, with fly-by-wire flight controls.
The A318, A319, A320 and A321 are twin-engine subsonic medium range aircraft.
The family offers a choice of engines
Courier management system project report.pdfKamal Acharya
It is now-a-days very important for the people to send or receive articles like imported furniture, electronic items, gifts, business goods and the like. People depend vastly on different transport systems which mostly use the manual way of receiving and delivering the articles. There is no way to track the articles till they are received and there is no way to let the customer know what happened in transit, once he booked some articles. In such a situation, we need a system which completely computerizes the cargo activities including time to time tracking of the articles sent. This need is fulfilled by Courier Management System software which is online software for the cargo management people that enables them to receive the goods from a source and send them to a required destination and track their status from time to time.
Welcome to WIPAC Monthly the magazine brought to you by the LinkedIn Group Water Industry Process Automation & Control.
In this month's edition, along with this month's industry news to celebrate the 13 years since the group was created we have articles including
A case study of the used of Advanced Process Control at the Wastewater Treatment works at Lleida in Spain
A look back on an article on smart wastewater networks in order to see how the industry has measured up in the interim around the adoption of Digital Transformation in the Water Industry.
About
Indigenized remote control interface card suitable for MAFI system CCR equipment. Compatible for IDM8000 CCR. Backplane mounted serial and TCP/Ethernet communication module for CCR remote access. IDM 8000 CCR remote control on serial and TCP protocol.
• Remote control: Parallel or serial interface.
• Compatible with MAFI CCR system.
• Compatible with IDM8000 CCR.
• Compatible with Backplane mount serial communication.
• Compatible with commercial and Defence aviation CCR system.
• Remote control system for accessing CCR and allied system over serial or TCP.
• Indigenized local Support/presence in India.
• Easy in configuration using DIP switches.
Technical Specifications
Indigenized remote control interface card suitable for MAFI system CCR equipment. Compatible for IDM8000 CCR. Backplane mounted serial and TCP/Ethernet communication module for CCR remote access. IDM 8000 CCR remote control on serial and TCP protocol.
Key Features
Indigenized remote control interface card suitable for MAFI system CCR equipment. Compatible for IDM8000 CCR. Backplane mounted serial and TCP/Ethernet communication module for CCR remote access. IDM 8000 CCR remote control on serial and TCP protocol.
• Remote control: Parallel or serial interface
• Compatible with MAFI CCR system
• Copatiable with IDM8000 CCR
• Compatible with Backplane mount serial communication.
• Compatible with commercial and Defence aviation CCR system.
• Remote control system for accessing CCR and allied system over serial or TCP.
• Indigenized local Support/presence in India.
Application
• Remote control: Parallel or serial interface.
• Compatible with MAFI CCR system.
• Compatible with IDM8000 CCR.
• Compatible with Backplane mount serial communication.
• Compatible with commercial and Defence aviation CCR system.
• Remote control system for accessing CCR and allied system over serial or TCP.
• Indigenized local Support/presence in India.
• Easy in configuration using DIP switches.
Immunizing Image Classifiers Against Localized Adversary Attacksgerogepatton
This paper addresses the vulnerability of deep learning models, particularly convolutional neural networks
(CNN)s, to adversarial attacks and presents a proactive training technique designed to counter them. We
introduce a novel volumization algorithm, which transforms 2D images into 3D volumetric representations.
When combined with 3D convolution and deep curriculum learning optimization (CLO), itsignificantly improves
the immunity of models against localized universal attacks by up to 40%. We evaluate our proposed approach
using contemporary CNN architectures and the modified Canadian Institute for Advanced Research (CIFAR-10
and CIFAR-100) and ImageNet Large Scale Visual Recognition Challenge (ILSVRC12) datasets, showcasing
accuracy improvements over previous techniques. The results indicate that the combination of the volumetric
input and curriculum learning holds significant promise for mitigating adversarial attacks without necessitating
adversary training.
Water scarcity is the lack of fresh water resources to meet the standard water demand. There are two type of water scarcity. One is physical. The other is economic water scarcity.
Explore the innovative world of trenchless pipe repair with our comprehensive guide, "The Benefits and Techniques of Trenchless Pipe Repair." This document delves into the modern methods of repairing underground pipes without the need for extensive excavation, highlighting the numerous advantages and the latest techniques used in the industry.
Learn about the cost savings, reduced environmental impact, and minimal disruption associated with trenchless technology. Discover detailed explanations of popular techniques such as pipe bursting, cured-in-place pipe (CIPP) lining, and directional drilling. Understand how these methods can be applied to various types of infrastructure, from residential plumbing to large-scale municipal systems.
Ideal for homeowners, contractors, engineers, and anyone interested in modern plumbing solutions, this guide provides valuable insights into why trenchless pipe repair is becoming the preferred choice for pipe rehabilitation. Stay informed about the latest advancements and best practices in the field.
Vaccine management system project report documentation..pdfKamal Acharya
The Division of Vaccine and Immunization is facing increasing difficulty monitoring vaccines and other commodities distribution once they have been distributed from the national stores. With the introduction of new vaccines, more challenges have been anticipated with this additions posing serious threat to the already over strained vaccine supply chain system in Kenya.
Vaccine management system project report documentation..pdf
RPC communication,thread and processes
1.
2. RPC communication protocol
Following are different communication protocols used in
RPC communication:
1. The request protocol (R protocol)
2. The request/reply protocol(RR protocol)
3. The request/reply/acknowledge(RRA protocol)
3. The R protocol:
In request protocol, the server has nothing to return to the client
process. In this protocol, there is no reply or acknowledgement; hence
in each call only one message is there, called request message.
The client doesn’t wait after sending the request message as there is no
reply expected. It proceeds to its next execution immediately.
The RPC R protocol is also referred as asynchronous RPC.IT helps in
improving the performance since client doesn’t need any reply form
server, thus reducing network communication overheads.
The working of R protocol is illustrated :
As R protocol is an asynchronous RPC, it is mostly use in the case
where periodic updates like clock synchronisation are required.
4. The RR protocol
In request/reply protocol, the RPC has the arguments
and the result as well fitted into a single packet buffer
and interval between two calls and its duration is very
short.
The server keeps the history of reply messages, so that
if client request the same procedure, he server need
not to reexecute it, but simply it retransmits the reply
and thus reducing execution overhead.
5. The RRA protocol
To overcome the limitation of RR protocol, the concept of
request/reply/acknowledge-reply protocol has been
implemented .
The server needs an acknowledge in response to its reply
message has been delivered to the client process successfully.
The RRA protocol consists of these messages in each RPC call .
The RRA approach is supposed to be the fully reliable because in
RR protocol sometimes the reply messages sent from server may
not reach to client and server do not know about this message
failure, since client don’t send any acknowledgement.
In RRA protocol client the client sends an acknowledgement in
response to the reply message sent by server and thus making it
more reliable .
6. Client-server Binding
In a RPC communication between a client and a server
, the client stub should know well in advance the
location of server to make a remote procedure call.
The process in which client becomes associated with
the location of server to make a remote procedure call.
The process in which client becomes associated with
server to establish a remote call is referred for the as
“client-server binding” .
The server first registers itself with a binding agent to
announce its availability .
7. Before a remote call can be made , the client requests
the binding agent for the address of server location .
Since binding agent mechanism has drawbacks , since
it involves huge overhead. Also the binding agent must
be robust against failures since it can become a single
point of failure.
The binding agent should not become a bottleneck
problem due to large number of requests and replies.
8. Other issues related to RPC
mechanism
In addition to various issues discussed so far, the RPC
mechanism has following two important issues:
Security
Exception handling
Some of the RPC implementation include client and server
authentication and also provide encrypted message to
handle security issues.
The RPC mechanism must have a strong exception-
handling mechanism to handle errors and failures occurred
during message transmission and report failures to client as
well as server.
10. THREADS PROCESSES
1. Threads are the unit of execution in a
process: A virtualized processor, a stack,
and program state. Processes are running
binaries and threads are the smallest unit of
execution schedulable by an operating
system's process scheduler.
1. Processes are the abstraction of
running programs: A binary image,
virtualized memory, various kernel
resources, an associated security
context, and so on.
2. A thread is an entity within a process
that can be scheduled for execution. All
threads of a process share its virtual address
space and system resources. In addition,
each thread maintains exception handlers,
a scheduling priority, thread local storage, a
unique thread identifier, and a set of
structures the system will use to save the
thread context until it is scheduled.
2. Each process provides the resources
needed to execute a program. A process
has a virtual address space, executable
code, open handles to system objects, a
security context, a unique process
identifier, environment variables, a
priority class, minimum and maximum
working set sizes, and at least one
thread of execution.
11. THREADS PROCESSES
3. Threads, since they share the same
address space are interdependent, so
caution must be taken so that different
threads don't step on each other.
3. Processes are independent of each
other.
4. Threads exist within a process and
every process has at least one thread.
4. A process has a self contained
execution environment that means it
has a complete, private set of basic run
time resources purticularly each process
has its own memory space.
5. Threads are considered lightweight
because they use far less resources than
processes.
5. A process can consist of multiple
threads.
12. Kernel level threads
Kernel-Level Threads
To make concurrency cheaper, the execution aspect of process is
separated out into threads. As such, the OS now manages threads and
processes. All thread operations are implemented in the kernel and the
OS schedules all threads in the system. OS managed threads are called
kernel-level threads or light weight processes.
NT: Threads
Solaris: Lightweight processes(LWP).
In this method, the kernel knows about and manages the threads. No
runtime system is needed in this case. Instead of thread table in each
process, the kernel has a thread table that keeps track of all threads in
the system. In addition, the kernel also maintains the traditional
process table to keep track of processes. Operating Systems kernel
provides system call to create and manage threads.
13. ADVANTAGES AND
DISADAVNTAGES
Advantages:
Because kernel has full knowledge of all threads, Scheduler may decide to give more time
to a process having large number of threads than process having small number of
threads.
Kernel-level threads are especially good for applications that frequently block.
Disadvantages:
The kernel-level threads are slow and inefficient. For instance, threads operations are
hundreds of times slower than that of user-level threads.
Since kernel must manage and schedule threads as well as processes. It require a full
thread control block (TCB) for each thread to maintain information about threads. As a
result there is significant overhead and increased in kernel complexity.
14. USER-LEVEL THREADS
User-Level Threads
Kernel-Level threads make concurrency much cheaper than process because,
much less state to allocate and initialize. However, for fine-grained
concurrency, kernel-level threads still suffer from too much overhead. Thread
operations still require system calls. Ideally, we require thread operations to be
as fast as a procedure call. Kernel-Level threads have to be general to support
the needs of all programmers, languages, runtimes, etc. For such fine grained
concurrency we need still "cheaper" threads.
To make threads cheap and fast, they need to be implemented at user level.
User-Level threads are managed entirely by the run-time system (user-level
library).The kernel knows nothing about user-level threads and manages them
as if they were single-threaded processes . User-Level threads are small and
fast, each thread is represented by a PC , register , stack, and small thread
control block. Creating a new thread, switching between threads, and
synchronizing threads are done via procedure call. i.e. no kernel involvement.
User-Level threads are hundred times faster than Kernel-Level threads.
15. ADVANTAGES AND
DISADVANTAGES
Advantages:
The most obvious advantage of this technique is that a user-level threads
package can be implemented on an Operating System that does not support
threads.
User-level threads does not require modification to operating systems.
Simple Representation: Each thread is represented simply by a PC, registers,
stack and a small control block, all stored in the user process address space.
Simple Management: This simply means that creating a thread, switching
between threads and synchronization between threads can all be done without
intervention of the kernel.
Fast and Efficient: Thread switching is not much more expensive than a
procedure call.
16. DISADVANTAGES:
Disadvantages:
User-Level threads are not a perfect solution as with everything else, they are a
trade off. Since, User-Level threads are invisible to the OS they are not well
integrated with the OS. As a result, Os can make poor decisions like scheduling
a process with idle threads, blocking a process whose thread initiated an I/O
even though the process has other threads that can run and unscheduling a
process with a thread holding a lock. Solving this requires communication
between kernel and user-level thread manager.
There is a lack of coordination between threads and operating system kernel.
Therefore, process as whole gets one time slice irrespect of whether process has
one thread or 1000 threads within. It is up to each thread to relinquish control
to other threads.
User-level threads requires non-blocking systems call i.e., a multithreaded
kernel. Otherwise, entire process will blocked in the kernel, even if there are
runnable threads left in the processes. For example, if one thread causes a page
fault, the process blocks.
17. Happened Before Relationship
In case of ordering events according to time, Lamport proposed a
scheme using logical clocks.
Since there is no perfect synchronisation in local time b/w the 2
processes , due to unavailability of a global clock, events cant be
ordered based on time. What Lamport proposed that is possible to
order events b/w the processes based on the behaviour of that specific
computation.
He used the notion of “happened before ” relation.
It captures the casual dependencies b/w events i.e. 2 relations are
related or not . The relation ->is defined as:
1. a->b i.e. a occurred before b 2. a->b
Here a is sending message to b. Both a and b are from different
processes.
3. If a->b and b->c then a->c
i.e. -> relation is transitive.
18. In a distributed system, the ordering of the events
occurring in the processes involved has impact on the
outcome of events yields different outcomes. Hence
designing and understanding the sequence of execution for
a computation is very important.
So event that are ordered by -> relation are called as
casually related events and this effect is called as casual
effects.
Therefore, event ‘a’ casually affects event ‘b’, if a->b. Both
the events a and b are said to be casually related events .
2 distinct events a and b are called as concurrent events and
are denoted by a||b.
19. Logical clocks:
Lamport introduced logical clocks to realize the relation “->”. The clock say Ci a each process P(i)
works on the concept of timestamp.
Let Ci(a) is the clock value for event a. The value cia is called timestamp of event a at pi.
The values assigned to the clocks don’t have any relation to the actual time.
The logical clocks have increasing values and thy can be implemented with the help of counters .i.e.
1,2,3,4 and so on.
Conditions satisfied by logical
For any events a and b,
If a->b
Then C(a)<C(b)
The relation -> can be realized by using logical clock if following 2 conditions are met.
Condition 1
For any events a and b in a process pi, if a occurs before b,
Then ci (a) <cib
Condition 2
If event a is sending , event a message m in process pi to the event b in process pj,
Then cia <cjb
20. IMPLEMENTATION:
Following two implementation rules guarantee that the clocks satisfy
condition 1 and condition 2:
Implementation rule 1
The clock ci is incremented b/w 2 successive events in a process pi:
Ci = ci +d(d>0)
If a and b are two successive events in pi and a -> b, then it becomes:
Ci(b)=ci(a )+d
Implementation rule 2
If event a is sending a message m by a process pi to event b by a process
pj and the timestamp for the message m is tm them :
Tm = ci (a) -> timestamp of event a in clock ciOn receiving the message
the clock cj is set to a value greater than or equal or equal to its present
value and greater than tm.
Cj=max(cj,tm+d)
Where d>0
21. Effects of RMI execution
In java ,the difference b/w a local method invocation
and remote method invocation is kept hidden from
the user.
After marshalling (i.e. convert the object into required
format for presentation ) the object is passed as a
parameter to RMI in Java.
A java remote object is built from two main classes :
1. Server class 2. Client class
The server-class contains the implementation of
server-side code that runs on server and client-class
contains the implementation of client-side code.
22. In computing, the Java Remote Method Invocation (Java
RMI) is a Java APIthat performs remote method
invocation, the object-oriented equivalent of remote
procedure calls (RPC), with support for direct transfer
of serialized Java classes and distributed garbage-
collection.
The original implementation depends on Java Virtual
Machine (JVM) class-representation mechanisms and it
thus only supports making calls from one JVM to another.
The protocol underlying this Java-only implementation is
known as Java Remote Method Protocol (JRMP). In order
to support code running in a non-JVM context,
programmers later developed a CORBA version.
23.
24. Usage of the term RMI may denote solely the
programming interface or may signify both the API
and JRMP , IIOP , or another implementation, whereas the
term RMI-IIOP (read: RMI over IIOP) specifically denotes
the RMI interface delegating most of the functionality to
the supporting CORBA implementation.
The basic idea of Java RMI, the distributed garbage-
collection (DGC) protocol, and much of the architecture
underlying the original Sun implementation, come from
the "network objects" feature of Modula-3.