Scattering theory: Difference between revisions

From formulasearchengine
Jump to navigation Jump to search
 
en>Vswitchs
extended Elastic vs. inelastic section
Line 1: Line 1:
<br><br>It is very common to have a dental emergency -- a fractured tooth, an abscess, or severe pain when chewing. Over-the-counter pain medication is just masking the problem. Seeing an emergency dentist is critical to getting the source of the problem diagnosed and corrected as soon as possible.<br><br>Here are some common dental emergencies:<br>Toothache: The most common dental emergency. This generally means a badly decayed tooth. As the pain affects the tooth's nerve, treatment involves gently removing any debris lodged in the cavity being careful not to poke deep as this will cause severe pain if the nerve is touched. Next rinse vigorously with warm water. Then soak a small piece of cotton in oil of cloves and insert it in the cavity. This will give temporary relief until a dentist can be reached.<br><br>At times the pain may have a more obscure location such as decay under an old filling. As this can be only corrected by a dentist there are two things you can do to help the pain. Administer a pain pill (aspirin or some other analgesic) internally or dissolve a tablet in a half glass (4 oz) of warm water holding it in the mouth for several minutes before spitting it out. DO NOT PLACE A WHOLE TABLET OR ANY PART OF IT IN THE TOOTH OR AGAINST THE SOFT GUM TISSUE AS IT WILL RESULT IN A NASTY BURN.<br><br>Swollen Jaw: This may be caused by several conditions the most probable being an abscessed tooth. In any case the treatment should be to reduce pain and swelling. An ice pack held on the outside of the jaw, (ten minutes on and ten minutes off) will take care of both. If this does not control the pain, an analgesic tablet can be given every four hours.<br><br>Other Oral Injuries: Broken teeth, cut lips, bitten tongue or lips if severe means a trip to a dentist as soon as possible. In the mean time rinse the mouth with warm water and place cold compression the face opposite the injury. If there is a lot of bleeding, apply direct pressure to the bleeding area. If bleeding does not stop get patient to the emergency room of a hospital as stitches may be necessary.<br><br>Prolonged Bleeding Following Extraction: Place a gauze pad or better still a moistened tea bag over the socket and have the patient bite down gently on it for 30 to 45 minutes. The tannic acid in the tea seeps into the tissues and often helps stop the bleeding. If bleeding continues after two hours, call the dentist or take patient to the emergency room of the nearest hospital.<br><br>Broken Jaw: If you suspect the patient's jaw is broken, bring the upper and lower teeth together. Put a necktie, handkerchief or towel under the chin, tying it over the head to immobilize the jaw until you can get the patient to a dentist or the emergency room of a hospital.<br><br>Painful Erupting Tooth: In young children teething pain can come from a loose baby tooth or from an erupting permanent tooth. Some relief can be given by crushing a little ice and wrapping it in gauze or a clean piece of cloth and putting it directly on the tooth or gum tissue where it hurts. The numbing effect of the cold, along with an appropriate dose of aspirin, usually provides temporary relief.<br><br>In young adults, an erupting 3rd molar (Wisdom tooth), especially if it is impacted, can cause the jaw to swell and be quite painful. Often the gum around the tooth will show signs of infection. Temporary relief can be had by giving aspirin or some other painkiller and by dissolving an aspirin in half a glass of warm water and holding this solution in the mouth over the sore gum. AGAIN DO NOT PLACE A TABLET DIRECTLY OVER THE GUM OR CHEEK OR USE THE ASPIRIN SOLUTION ANY STRONGER THAN RECOMMENDED TO PREVENT BURNING THE TISSUE. The swelling of the jaw can be reduced by using an ice pack on the outside of the face at intervals of ten minutes on and ten minutes off.<br><br>If you beloved this short article and you would like to receive more facts relating to [http://www.youtube.com/watch?v=90z1mmiwNS8 dentist DC] kindly pay a visit to our webpage.
The algorithm of '''Lamport timestamps''' is a simple algorithm used to determine the order of events in a [[distributed computer system]]. As different nodes or processes will typically not be perfectly synchronized, this algorithm is used to provide a [[Partially ordered set|partial ordering]] of events with minimal overhead, and conceptually provide a starting point for the more advanced [[vector clock]] method. They are named after their creator, [[Leslie Lamport]].
 
Distributed algorithms such as resource synchronization often depend on some method of ordering events to function. For example, consider a system with two processes and a disk. The processes send messages to each other, and also send messages to the disk requesting access. The disk grants access in the order the messages were sent. Now, imagine process 1 sends a message to the disk asking for access to write, and then sends a message to process 2 asking it to read. Process 2 receives the message, and as a result sends its own message to the disk. Now, due to some timing delay, the disk receives both messages at the same time: how does it determine which message [[happened-before]] the other? (<math>A</math> happens-before <math>B</math> if one can get from <math>A</math> to <math>B</math> by a sequence of moves of two types: moving forward while remaining in the same process, and following a message from its sending to its reception.) A logical clock algorithm provides a mechanism to determine facts about the order of such events.
 
Lamport invented a simple mechanism by which the [[happened-before]] ordering can be captured numerically. A Lamport logical clock is an incrementing software counter maintained in each process.
 
It follows some simple rules:
 
# A process increments its counter before each event in that process;
# When a process sends a message, it includes its counter value with the message;
# On receiving a message, the receiver process sets its counter to be greater than the maximum of its own value and the received value before it considers the message received.
 
Conceptually, this logical clock can be thought of as a clock that only has meaning in relation to messages moving between processes. When a process receives a message, it resynchronizes its logical clock with that sender.
 
==Considerations==
For every two different events <math>a</math> and <math>b</math> occurring in the same process, and <math>C(x)</math> being the timestamp for a certain event <math>x</math>, it is necessary that <math>C(a)</math> never equals <math>C(b)</math>.
 
Therefore it is necessary that:
 
# The logical clock be set so that there is minimum of one clock "tick" (increment of the counter) between events <math>a</math> and <math>b</math>;
# In a multiprocess or multithreaded environment, it might be necessary to attach the process ID (PID) or any other unique ID to the timestamp so that it is possible to differentiate between events <math>a</math> and <math>b</math> which may occur simultaneously in different processes.
 
== Implications ==
A Lamport clock may be used to create a [[Partial order|partial]] causal ordering of events between processes. Given a logical clock following these rules, the following relation is true: if <math>a \rightarrow b</math> then <math>C(a) < C(b)</math>, where <math>\rightarrow\,</math> means [[happened-before]].
 
This relation only goes one way, and is called ''clock consistency condition'': if one event comes before another, then that event's logical clock comes before the other's. The ''strong clock consistency condition'', which is two way (if <math>C(a) < C(b)</math> then <math>a \rightarrow b</math>), can be obtained by other techniques such as [[vector clock]]s. Using only a simple Lamport clock, only a partial causal ordering can be inferred from the clock.
 
However, via the contrapositive, it's true that <math>C(a) \nless C(b)</math> implies <math>a \nrightarrow b</math>. So, for example, if <math>C(a) \geq C(b)</math> then <math>a</math> cannot have happened-before <math>b</math>.
 
Another way of putting this is that <math>C(a) < C(b)</math> means that <math>a</math> may have happened-before <math>b</math>, or be incomparable with <math>b</math> in the happened-before ordering, but <math>a</math> did not happen after <math>b</math>.
 
Nevertheless, Lamport timestamps can be used to create a [[total ordering]] of events in a distributed system by using some arbitrary mechanism to break ties (e.g. the ID of the process). The caveat is that this ordering is artifactual and cannot be depended on to imply a causal relationship.
 
==Lamport's logical clock in distributed systems==
* In a distributed system, it is not possible in practice to [[Clock synchronization|synchronize time]] across entities (typically thought of as processes) within the system; hence, the entities can use the concept of a logical clock based on the events through which they communicate.
* If two entities do not exchange any messages, then they probably do not need to share a common clock; events occurring on those entities are termed as concurrent events.
* Among the processes on the same local machine we can order the events based on the local clock of the system.
* When two entities communicate by message passing, then the send event is said to 'happen before' the receive event, and the logical order can be established among the events.
* A distributed system is said to have partial order if we can have a partial order relationship among the events in the system. If 'totality', i.e., causal relationship among all events in the system can be established, then the system is said to have total order.
* A single entity cannot have two events occur simultaneously. If the system has total order we can determine the order among all events in the system. If the system has partial order between processes, which is the type of order Lamport's logical clock provides, then we can only tell the ordering between entities that interact. Lamport addressed ordering two events with the same timestamp (or counter): "To break ties, we use any arbitrary total ordering < of the processes."<ref>{{cite doi|10.1145/359545.359563}}</ref> Thus two timestamps or counters may be the same within a distributed system, but in applying the logical clocks algorithm events that occur will always maintain at least a strict partial ordering..
 
==See also==
*[[Happened-before]]
*[[Vector clocks]]
 
==References==
<references />
 
<!--Interwikies-->
 
<!--Categories-->
[[Category:Distributed algorithms]]

Revision as of 23:03, 11 January 2014

The algorithm of Lamport timestamps is a simple algorithm used to determine the order of events in a distributed computer system. As different nodes or processes will typically not be perfectly synchronized, this algorithm is used to provide a partial ordering of events with minimal overhead, and conceptually provide a starting point for the more advanced vector clock method. They are named after their creator, Leslie Lamport.

Distributed algorithms such as resource synchronization often depend on some method of ordering events to function. For example, consider a system with two processes and a disk. The processes send messages to each other, and also send messages to the disk requesting access. The disk grants access in the order the messages were sent. Now, imagine process 1 sends a message to the disk asking for access to write, and then sends a message to process 2 asking it to read. Process 2 receives the message, and as a result sends its own message to the disk. Now, due to some timing delay, the disk receives both messages at the same time: how does it determine which message happened-before the other? (A happens-before B if one can get from A to B by a sequence of moves of two types: moving forward while remaining in the same process, and following a message from its sending to its reception.) A logical clock algorithm provides a mechanism to determine facts about the order of such events.

Lamport invented a simple mechanism by which the happened-before ordering can be captured numerically. A Lamport logical clock is an incrementing software counter maintained in each process.

It follows some simple rules:

  1. A process increments its counter before each event in that process;
  2. When a process sends a message, it includes its counter value with the message;
  3. On receiving a message, the receiver process sets its counter to be greater than the maximum of its own value and the received value before it considers the message received.

Conceptually, this logical clock can be thought of as a clock that only has meaning in relation to messages moving between processes. When a process receives a message, it resynchronizes its logical clock with that sender.

Considerations

For every two different events a and b occurring in the same process, and C(x) being the timestamp for a certain event x, it is necessary that C(a) never equals C(b).

Therefore it is necessary that:

  1. The logical clock be set so that there is minimum of one clock "tick" (increment of the counter) between events a and b;
  2. In a multiprocess or multithreaded environment, it might be necessary to attach the process ID (PID) or any other unique ID to the timestamp so that it is possible to differentiate between events a and b which may occur simultaneously in different processes.

Implications

A Lamport clock may be used to create a partial causal ordering of events between processes. Given a logical clock following these rules, the following relation is true: if ab then C(a)<C(b), where means happened-before.

This relation only goes one way, and is called clock consistency condition: if one event comes before another, then that event's logical clock comes before the other's. The strong clock consistency condition, which is two way (if C(a)<C(b) then ab), can be obtained by other techniques such as vector clocks. Using only a simple Lamport clock, only a partial causal ordering can be inferred from the clock.

However, via the contrapositive, it's true that C(a)C(b) implies ab. So, for example, if C(a)C(b) then a cannot have happened-before b.

Another way of putting this is that C(a)<C(b) means that a may have happened-before b, or be incomparable with b in the happened-before ordering, but a did not happen after b.

Nevertheless, Lamport timestamps can be used to create a total ordering of events in a distributed system by using some arbitrary mechanism to break ties (e.g. the ID of the process). The caveat is that this ordering is artifactual and cannot be depended on to imply a causal relationship.

Lamport's logical clock in distributed systems

  • In a distributed system, it is not possible in practice to synchronize time across entities (typically thought of as processes) within the system; hence, the entities can use the concept of a logical clock based on the events through which they communicate.
  • If two entities do not exchange any messages, then they probably do not need to share a common clock; events occurring on those entities are termed as concurrent events.
  • Among the processes on the same local machine we can order the events based on the local clock of the system.
  • When two entities communicate by message passing, then the send event is said to 'happen before' the receive event, and the logical order can be established among the events.
  • A distributed system is said to have partial order if we can have a partial order relationship among the events in the system. If 'totality', i.e., causal relationship among all events in the system can be established, then the system is said to have total order.
  • A single entity cannot have two events occur simultaneously. If the system has total order we can determine the order among all events in the system. If the system has partial order between processes, which is the type of order Lamport's logical clock provides, then we can only tell the ordering between entities that interact. Lamport addressed ordering two events with the same timestamp (or counter): "To break ties, we use any arbitrary total ordering < of the processes."[1] Thus two timestamps or counters may be the same within a distributed system, but in applying the logical clocks algorithm events that occur will always maintain at least a strict partial ordering..

See also

References