1 / 4

Thread Processing Problem

What happens when OP1's deposit precedes OP2's Withdrawal?. Thread Processing Problem. First Operator OP1: CA of Mr/Mrs Jones: Second Operator OP2:. (Request is Deposit). (Request is Withdrawal). OPS1: Get Next Request. CAS3: Good Standing.

josie
Download Presentation

Thread Processing Problem

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. What happens when OP1's deposit precedes OP2's Withdrawal? Thread Processing Problem First Operator OP1: CA of Mr/Mrs Jones: Second Operator OP2: (Request is Deposit) (Request is Withdrawal) OPS1: Get Next Request CAS3: Good Standing OPS1: Get Next Request OPS1: Get Next Requestx CAS3: Good Standing OPS1: Get Next Request

  2. (For the case where the deposit precedes the Withdrawal) Thread Processing Solution First Operator OP1: CA of Mr/Mrs Jones: Second Operator OP2: (Request is Deposit) (Request is Withdrawal) OPS1: Get Next Request CAS3: Good Standing OPS1: Get Next Request OPE2 OPS2: Process Request CAdep OPE2 CAS2: Taking Deposit OPE3 CAok CAS3: Good Standing OPS2: Process Request OPS3: Request Succeeded CAwdw OPE5 OPE3 CAS4: Considering Withdrawal CAok OPS3: Request Succeeded OPE5 OPS1: Get Next Request CAS3: Good Standing OPS1: Get Next Request

  3. (Two OPerators access the same account; OP2's Withdrawal try precedes OP1's Deposit) Thread Processing Example First Operator OP1: CA of Mr/Mrs Jones: Second Operator OP2: (OP1 lags behind OP2) OPS1: Get Next Request CAS3: Good Standing OPE2 OPS1: Get Next Request OPS2: Process Request CAwdw OPE2 OPE4 CAS4: Considering Withdrawal CAok CAS3: Good Standing OPS2: Process Request OPS4: Request Failed CAdep OPE5 OPE3 CAS2: Taking Deposit CAok OPS3: Request Succeeded OPE5 OPS1: Get Next Request CAS3: Good Standing OPS1: Get Next Request

  4. ST State /*Behavior of this state */ STid NA c8 1 /* pkey of this ST instance */ SMid NA c8 1 /* fkey of parent State Model */ ActName NA c8 0 /* Action Routine Name/Service */ ActFunc NA c8 0 /* Address of Routine to be called */ Name NA t80 0 /* Full Name or Description of ST */ Active Instance SM StateModel /* Model for all AI's of AC of SM */ SMid NA c8 1 /* pkey of this SM instance */ Abbrev NA c4 0 /* short name - e.g. SM01 */ Name NA t80 0 /* Full Name or Description of SM */ OLCArchitecture (su93olc.sch) AC 1:1 0:1 Active Class AI cstate Runtime Relationships Application Objects (& Sys. Services) (AI and ApplObjs are in 1:1 corresp. ET EventType /*EventType table*/ ETid NA c8 1 /* pkey */ SMid NA c8 1 /* Receiving SM */ Label NA c32 0 /* Event label */ Descrip NA t80 0 /*describes ET*/ Note: Event Label is stored in the ET-parent of each generated EventInstance EI (at EI.ETid_pp->Label) EI TR Transition /* Transition: STid1 to STid2 */ TRid NA c8 1 /* pkey of this TR instance */ STid1 NA c8 1 /* Source or 'From' State */ STid2 NA c8 1 /* Destination or 'To' STate */ Event Instance EN EventEnable /* ET__TR relation */ ENid NA c8 1 /* pkey of ENable row */ ETid NA c8 1 /* fkey of enabling ET */ TRid NA c8 1 /* fkey of enabled TR */ (revised 94/4/26: added Note)

More Related