Simulation of concurrency using dbms_lock

Hi all

I tried to simulate the CBC lock contention using the ITO table below and select the declaration as well as the dbms_lock package.
create table kill_cpu (n, primary key(n)) organization index 
as 
select rownum n 
from all_objects 
where rownum <= 23 
;
If I'm running under sql statement regardless of the session, this session is not face any problem of lock of CBC (CBC lock wait event chronicle not in session$ v). So I had planned to run this from 10 different sessions sql statement.
SQL Statement.

alter session set "_old_connect_by_enabled" = true;

select count(*) X 
from kill_cpu 
connect by n > prior n 
start with n = 1 
;
But to simulate competitive access, I used code of all sessions with above the SQL below.
declare  
     n1      number(38);  
     m_handle    varchar2(60);  
begin  
    dbms_lock.allocate_unique(  
        lockname    => 'Synchronize',  
        lockhandle  => m_handle  
    );  

     n1 := dbms_lock.request(  
        lockhandle      => m_handle,  
        lockmode        => dbms_lock.x_mode,  
        timeout         => dbms_lock.maxwait,  
        release_on_commit   => true      -- the default is false !!  
    );  

    dbms_output.put_line(n1);  
end;  
/ 
select count(*) X 
from kill_cpu 
connect by n > prior n 
start with n = 1 
;
Steps followed:
Run only of dbms_lock session code 1.
Run dbms_lock code and sql statement to other meeting 2 and 3.
Perform validation of session 1 to start the concurrency.

But here even session 3 waiting for validation of the session 2, so how can I overcome this dependence commit to simulate the simultaneity say for about 10 sessions?

NOTE: These scripts are derived from Jonathan Lewis, so I'm really sorry if I abused his scripts using it.

-Yasser

YasserRACDBA wrote:
Thank you very much Sir... Jonathan I was bit lazy to read your blog.

By the way don't this is the best method to simulate the latch of the CBC? Is there any other better idea? It seems impractical to demonstrate that it is autonomous transactions for approximately 100 simultaneous sessions... help here?

Yasser,

If you want to test the effect of competitive access with 100 simultaneous sessions, you must have 100 concurrent sessions connected, so the locking/unlocking mechanism is ideal for high stress tests. You may think it's a bit difficult to implement - but I have just a shell script that runs through a loop to send a new copy of sqlplus in the background to run a script that ends with an exit. It's easy to start a test, change the number of concurrent copies if necessary; the test also cleared itself at the end because of the output. There are a number of small improvements that make the process simple and tidy (e.g. the loop of shell past the meter of the loop to the SQL script as a parameter that can be included in the names of the output files).

Don't forget, however, that this script is VERY CPU - it is probably unnecessary in the management of more than two copies by UC because the system is going to be stuck on CPU at the time wherever you get to this point. (It is quite a good test if you want to test the effects of lack of processor on the time of synchronization of log file). For a test of "end-user behavior" more realistic you can replace the application with a loop of pl/sql that executes a query to retrieve a line randomly a large table, then sleep for 0.01 seaconds).

Concerning
Jonathan Lewis

Tags: Database

Similar Questions

  • Update of a definition of concurrent using FNDLOAD DOWNLOAD program

    Hello

    In 11i to R12 upgrade, we needed to change values on some parameters in first Grade.
    After you change the CP, I took a LDT of the report and then moved to the test instance and run the FNDLOAD DOWNLOAD. But the values changed is not updated?

    Is there a specific setting that must be set to update existing definitions of CP using FNDLOAD DOWNLOAD?

    Thanks in advance.

    Kiran

    Hello

    What are the commands that you used for the download and upload?

    Have you tried the command with CUSTOM_MODE = STRENGTH and UPLOAD_MODE = FNDLOAD REPLACEMENT options (see Note: 211692.1 for more details on these two options).

    Kind regards
    Hussein

  • Golden rule using the infinitely thin driver in EM simulation?

    Does anyone know when - is it safe to use around thin conductor during the EM in Axiem simulation?

    What the report of the dielectric thickness thickness of copper?

    For loss of conductor, thin and thick metal work substantially the same.  The place more obvious thickness there where is with coupling between metal on the same layer.  The sentence that you pay for the thickness of the metal is AXIEM must solve for most unknown, somewhere between 2 and 3 times the amount.

    At some point the coupling due to the thickness of the metal has a great effect on the hitch.   It is difficult to tell an exact rule when to make the change will question how far your floor plan is on the bottom and the thickness of the metal is.    What I suggest to you that do is setup a microstrip coupled simulation of line using the technology you use then sweep the distance between the lines for both a thin metal case and drop thick and see where converge the two responses.

    A few other points.

    1 check the option for the use of mesh edge when using thick metal.  For the most precise response and a good comparison, you want to make sure you edge the thick metal mesh.

    2. I have not seen the report of dielectric thickness to the question of the thickness of copper a lot, but you can run a similar experiment, just to see if it's important.   The biggest problem here is to ensure that you get the distance between your ground plan and track on the right.  If you use the limit of the structure to the ground, this usually isn't a problem.  But if you have aircraft grounded at other locations in your stackup, you will need to adjust dielectric thicknesses depending on whether you use thin or thick metal to ensure that the thickness of the dielectric is correct.

  • Can I use the public APIs of BlackBerry for automation of the tests on the Simulator?

    Hello

    I'm developing a framework of automation with BlackBerry API public.

    Is it possible to test it against the custom application and 'Core BlackBerry Applications,' for example, mail, calendar...?

    With the help of API net.rim.device.api.ui.Keypad. * can manipulate the keyboard on a simulator, is that correct?

    Thank you!

    You can use the EventInjector API for input (keyboard, trackpad and touchscreen) events Simulator to interact with built-in applications.  It will work in the Simulator and the real device.

    If you are looking just to automate something in the Simulator, you can use the BlackBerry Simulator controller.  It is a command-line tool that enables script steps in the Simulator.  For more information look in the help on the BlackBerry smartphone Simulator menu.

  • Not (rightly?) MDS Simulator using rimpublic.property

    I'm testing an application that manages cookies on its own, so I tried to change the rimpublic.property parameter:

    application.handler.http.CookieSupport = false

    but the MDS Simulator still manages cookies.  I then changed the value of WebServer.listen.port to 8010 and the MDS Simulator still load the web server on the default port 8080. This suggests that the MDS Simulator is not correctly read the file rimpublic.property. Initially, I had problems of file with Vista so I changed the permissions on everything under the directory "C:\Program research in Motion\BlackBerry JDE 4.7.0\MDS" so that all users have all permissions. That always has not contributed to the problem though. Anyone has ideas or information, why this is happening?

    I'm v4.7.0 JDE running and modifying this file specifically:

    C:\Program search in Motion\BlackBerry JDE 4.7.0\MDS\config\rimpublic.property

    Thank you

    Joe

    Well well if someone has the same problem, I managed to get this to work finally.

    I reinstalled everything - the JDE, all my simulators and the JDE component Package (this can be unnecessary, given that I didn't tried the next step until after I did - twice). Then in the JDE, I put the directory of MDS Simulator - CS to use the version installed by the Installer component package to 'C:\Program research in Motion\BlackBerry JDE component package 4.7.0\MDS' (Edit-> preferences, tab Simulator MDS - CS). I also had to change the properties of that directory and give total control of the users group. And of course the rimpublic.properties file is now in the directory "C:\Program search component Package Motion\BlackBerry JDE 4.7.0\MDS\config".

    It works, but one of the problems is that the instance of MDS - CS turns off automatically when I close the Simulator. But I can live with that.

  • problem in using browser in the Simulator

    Hi all

    If she can be too small question to ask here, is to create a big problem for me. I am not able to view web pages in the Simulator. I use JDE 4.6.1.23 and BB 8900 simulator, also downloaded e-mail MDS services Simulator 4.1.4 n. now every time I try to navigate (in Simulator 8900), the following message appears

    "You are not currently in an area that can handle the communication of data. Therefore, the browser can't retrieve all of the Web pages. Please try again when you are in a different location, or contact your service provider if the problem persists"

    I'm not able to find the cause and need help on this... thnx in advance.

    You can check the status of the network on your device Simulator? If it is disabled, you can turn on them and try.

  • When using Microsoft Flight Simulator, the Simulator just crashes from time to time and blamks outside.

    Ask helps solve crashes during flight simulator

    Hello

    ·         What version of Microsoft Flight simulator do you use?

    ·          You get the error message? If Yes, what is the full error message?

    I suggest you follow the steps in troubleshooting section below and check if it helps:

    Game hangs or quits unexpectedly

    http://support.Microsoft.com/kb/303032

    Hope this helps

  • check whether or not a concurrent request is complete the backend

    Hi all
    I want to check whether or not the competing applications is complete the backend using the API. I discovered that FND_CONCURRENT.wait_for_request can be used, but inside this procedure they use dbms_lock.sleep command to delay treatment. I used the same dbms_lock.sleep in my code, but does not correct results.
    Please you siggest me on solutions workaround that needs to be done to get the exact time of the concurrent request will have to fill.


    Thank you and best regards,
    Mahesh

    Hello

    You can get the same information in table FND_CONCURRENT_REQUESTS (API of FND_CONCURRENT of the readings of the same table).

    If you want to continue to use an API, see if you can use FND_CONCURRENT. GET_REQUEST_STATUS (Please check if it is a public API).

    Kind regards
    Hussein

  • Multisim simulation of co error

    Hello

    When you perform a simulation in Labview (using a model of Multisim) in the Loop Simulation & control, sometimes a small window pops up with the error: Multisim is closing due to the error... (or something like that, I don't use multisim in English) even if I did not open at all Multisim. I think that it opens in the background and it closes because of an error.

    If someone could help me, I would be very grateful...

    Thank you

    Ussr123

    Hello

    I think I already know what the problem was. I was providing some input values in my file of Multisim simulation. These values were floating point numbers, and sometimes with a micro digits after the comma. It seems that Multisim couldn't handle it. After cutting all the numbers they came after the comma, leaving only 2 or 3, the error seemed no more.

    I hope I could help, if everyone will head the same error, try to think of cutting the floating numbers to real numbers.

    Ussr123.

  • Control and simulation and data acquisition

    Hello

    I am applying to motor control in Labview. I'm sampling speed from DC engine in real time through an acquisition of data. (my sampling time is 1000 samples per second)

    Then wrap speed as input to a Simulation (simulation and design of the order) and inside the loop simulation, I have a PID controller. The PID has the actual speed of the engine for the acquisition of data and the engine reference speed as input.

    Reference engine speed comes from the generator of signals (control design and simulation-Simulation) and is a waveform.

    My step in the engine size is 1000.

    I am running this application real-time and drawing the reference signal and the motor real signals. I run into several problems with regard to the calendar.

    1. when I change the size of the step of the simulation loop, the frequency of squares of reference also seems to change. For example. What step size = 1000, duration of pulse = 1 s. What step size = 100, pulse width = 0.1. (My pulse frequency is 1 Hz, Simulation clock - 10 kHz). How step size can affect the pulse width.

    2. can you explain the relationship between the DAQ, the Simulation step size loop sampling time, Loop Simulation period.

    3. If I want to collect different sets of data using sampling different hours, it's OK to change the sampling DAQ time without changing the size of the step of the simulation.

    Would also like to emphasize that the DAQmx calendar under sample clock mode is placed in front of the simulation loop and the output is connected to the loop simulation.

    Appreciate any help.

    Hello

    Maybe some screenshots of your code would help. Furthermore, what you have read your samples together with your DAQ screws?

    (1) If you have a waveform, the output is specified as:

    For example, if you change the size of the step of the simulation loop, you change the simulation time which are introduced into the signal generator and affecting the waveform that you see if you do not have a size quite small step to characterize the waveform that you generate.

    (2) sampling DAQ rate is the speed at which samples are taken on the acquisition of card data itself. The size of the simulation step, help. "Specifies the interval between the time when the ODE Solver evaluates the model and updates the results of the model, in a few seconds." Simulation loop, still using, "Indicates the amount of time that elapses between two subsequent iterations of the loop of control & Simulation.". " "Step size determine the value of t that is introduced to the functions you use in the loop simulation while the loop simulation period controls simply to how fast you change the following t value. The sampling rate of DAQ hardware is a clock of completely separate hardware controlling the analogue-digital on the DAQ card converter so that you can get a deterministic dt between the samples being acquired.

    (3) you can change the schedule for the acquisition of data, but you will need to restart each time the changes take effect. If you change the calendar of data acquisition and want your values to correlate with your simulation, you will need to change your size of step as well.

    -Zach

    -Zach

  • Hardware implementation of the controller DMA using the FPGA and LABVIEW

    Respected Sir/Madam

    I am simulating the DMA using LABVIEW7.1 controller and I am fresher to this tool, please suggest me how to do this

    You can go through the FPGA tutorial.

    For specific information on DMA you can see this.

  • INTEL FORTRAN COMPILE / VISUAL STUDIO FOR THE ASPEN SIMULATION

    Hi all

    I have little knowledge about the use of FORTRAN with application of this on VISUAL STUDIO. In fact, I know about these software because of the obligation for them to rewrite some code I had to rewrite before running on ASPEN Plus.

    My problem is, I want to run a simulation Aspen Plus using the soft articles in question, but I honestly don't know how to go for them, as all this seems confusing. I have already installed the compiler FORTRAN and Visual Studio, but I don't know which platform to extract the entry codes I need to compile.

    The codes that I needed to re - compile in Intel FORTRAN, which is compatible with the Aspen has been compiled previously using Silver frost 95.But FORTRAN, after compilation by using this software in Silver frost, codes does not work on Plus.It of Aspen was a few days ago I learned this can never work on ASPEN Plus Hence the need to install the compatible software.

    (1) what it means to re - write a written code previously in Silver frost FORTRAN 95 or other FORTRAN codes in Intel FORTRAN compiler code and what is the procedure for that?
    (2) after having rewritten in Intel FORTRAN codes codes using Intel FORTRAN compile, how I performs the following steps before finally launching the simulations using Aspen:
    b compile the user model?
    (b) models of the user shared a link in a Fortran Library procedure?
    (c) provide the files objects or shared for the Aspen Plus system libraries?

    Any positive contribution will be highly appreciated.
    Gee right.

    Hi, Ghislain law

    Your message is addressed in the discussions on these Microsoft Community forums. It is better suited for the MSDN Developer audience. Please click on the following link and post your question in the appropriate forum.

    MSDN forums: Index

    http://social.msdn.Microsoft.com/forums/en-us/categories

    Concerning

  • Flight Simulator panels and add on models fails to load on the main screen

    Original title: problem FSX and windows

    Some of the panels such as the F-18 and add it on the templates may not appear or do not come up on top of the screen when picked up. I just reinstalled windows and do not know what happened during the installation. I'm not sure if all the main files are missing for something wasn't going to install it. I run FSX with acceleration pack and is a 32-bit microsoft windows xp.

    Hi United869,
     
    Try these steps and check the result.
    Step 1: Download and install the drivers for Windows XP-compatible video card.
    a. visit the video card or the system manufacturer's Web site to download the driver.
    b. install the driver and restart the computer for the changes to take effect.
    c. start the game and check the difference.
     
    Step 2: Adjust display settings
    a. right click on the desktop, click on properties.
    b. click on the settings tab and adjust the screen resolution at best.
    c. click ok to apply the changes.
     
    Step 3: If the problem persists, reduce the game to the minimum settings. To do this, follow these steps:
    a. start the game.
    b. click on settings.
    c. click Reset defaults.
     
    Step 4: Check the Windows updates to see if there are updates available for flight simulator
    a. see using Windows Update for Windows XP

    See Solutions for the Flight Simulator Centre

    Visit our Microsoft answers feedback Forum and let us know what you think.

  • The mouse cursor is not displayed in Tablet OS Simulator

    Hello!

    I just tried to launch the Tablet OS simulator. I use VMWare Server 1.0.8. When I click on the screen, the cursor disappears. It is a usual thing for vmware. When I click, I can accidentally hit some button and I see this menu opens, etc.. However, I do not see the position of the slider and it makes me confused.

    Is there a way to force the display of the cursor?

    Thank you!

    I had the same problem and solve it install the VM Ware Player 3.1.2

  • SDCard of BB JDE 4.2.1 Simulator.

    Quote from previous forums:

    Comments: Raiden
    SDCard of BB JDE 4.2.1 Simulator.
    Posted the: July 10, 2008 06:32
     
    Hello guys have a good day.
    Little do I need your advice. I want to know how to write the file on card SD JDE on local hard drive. I think that it is possible to do. But I do not know how? Please help me guys.
    Have a beautiful day again"

    msohm

    Messages: 2 239
    Join date: Jul, 2005

    Re: SD of the BB JDE 4.2.1 Simulator.
    Posted the: 10 July 2008 09:37
     
    You try to do to the BlackBery Simulator or a real BlackBerry?

    Mark Sohm
    BlackBerry developer journal
    www.blackberrydeveloperjournal.com

    Comments: Raiden
    Re: SD of the BB JDE 4.2.1 Simulator.
    Posted the: July 14, 2008 21:25
     
    Sorry for answering at the end "I am train to the BB Simulator.
    TNX for your reply ' Makk Sohm

    See the knowledge base article developers below for the steps to set up a micro SD card in the BlackBerry Simulator.

    Use a computer filesystem in the form of microSD card
    DB-00654
    http://www.BlackBerry.com/knowledgecenterpublic/livelink.exe/fetch/2000/348583/800738/800792/801083/...

    This feature was added in version 4.2.2 of the BlackBerry Simulator.  So unfortunately it is not supported in version 4.2.1.

Maybe you are looking for