Questions tagged [contention]

Questions about any type of resource contention. Use in conjunction with the applicable tag such as [file-access], [memory] or [locking] to indicate the type of resource being referred to.

Questions about any type of resource contention. Use in conjunction with the applicable tag such as , or to indicate the kind of resource being referred to.

88 questions
0
votes
1 answer

sqlite - how can I handle potential contention between two separate threads accessing the same database?

QUESTION: How can I handle potential contention between two separate threads accessing the same Sqlite database? BACKGROUND: I have a C# Winforms application that uses Sqlite via ADO.net. I do have a backgroundworker thread in the winforms…
Greg
  • 34,042
  • 79
  • 253
  • 454
0
votes
0 answers

Is it better to have Custom Thread Pool in .NET using one AutoResetEvent per Thread or one Semaphore across all the threads?

First of all my apologies for a verbose request. I have an infrastructure with a number threads that each wait on their on WaitHandle (AutoResetEvent) till an activity is queued to it. I am thinking of changing that infrastructure for the following…
Swami PR
  • 793
  • 1
  • 8
  • 15
0
votes
2 answers

Index Contention / Oracle environment “high key” issue

I was reading about "Index contention" and found the below explanation: Oracle b-tree indexes are “right-handed” and the right-hand leafs of the b-tree contain the highest key in the lowest tree level. Index leaf node contention happens when rows…
zer0Id0l
  • 1,374
  • 4
  • 22
  • 36
0
votes
1 answer

how jvm handles many threads in runnable state

I am starting with the assumption that a single core machine can run only a single thread. Now I wrote a java/spring based junit test that spawns 20 threads and they calculate factorial of a large number using BigDecimal. I monitored that junit…
makcalif
  • 37
  • 7
0
votes
1 answer

std::map strange resource contention in multithreading

I have a strange behavior with an std::map (or std::set, they seem to behave the same in this scenario). It might be that I have a grave misunderstanding about how this should work. I'm using VS2010 SP1. Take for example this function: extern time_t…
namezero
  • 2,203
  • 3
  • 24
  • 37
0
votes
1 answer

linux ipc need lock?

There system V has three ipc ways: MessageQueue, SharedMemory, Semaphore。 When two processes read or write on it simultaneously, should i use some synchronization like threads lock? And POSIX IPC?
billow
  • 125
  • 1
  • 1
  • 9
0
votes
1 answer

Modify CW value in mac802.11.h in NS2

I'm trying to modify the cw_ value in the mac-802.11.h file, with no luck. Normally this is how it is done, cw_=(cw_<<1)+1. This is what I tried, cw_=(cw_ * 1.8)+1. The above had no change in result with respect to the average throughput and the…
manal
  • 77
  • 8
0
votes
1 answer

Verilog contention with next signal

I'm trying to implement the following code: reg [7:0] next_busy; always @* begin next_busy = busy; //default assignment if (condition determined by module input) begin next_busy[0]= 1'b1; end end //always @* always @(posedge…
user1784747
  • 142
  • 1
  • 5
-1
votes
1 answer

Cloud Firestore Datastore Mode - Transaction Contention without Composite Index

In an application that I am currently working on, we need to ensure uniqueness with respect to the tuple of three properties in a specific kind. As such when creating a new entity, we need to ensure that no entity of that kind with the given tuple…
-1
votes
1 answer

Can there be memory contention even if there are no locks?

I am writing a multithreaded code where a bunch of std::async calls spawn a fixed number of threads for the duration of the entire program. Each thread works off the same const BigData structure on a read-only basis. There are frequent, random reads…
segfault
  • 339
  • 2
  • 8
-1
votes
1 answer

Prevent Multiple users accessing the same folder C#

I am currently in the process of writing a small application in C# to process batches of images and put them into a PDF. Each batch of images is stored in its own folder on a network share. The application will enable users to perform QA checks on a…
-1
votes
1 answer

What can I do to programmatically prevent or limit Resource contentions?

I have created an app that, given enough data, fails to complete, with "The transaction log for database 'tempdb' is full due to 'ACTIVE_TRANSACTION'." and "Cannot find table 0." The Stored Procedure that the report uses does not explicitly…
-2
votes
1 answer

Java - Best practices to avoid contention on multi processes that poll the DB

I have an application that loads a job every 60 seconds. The job polls a table in the database(NoSQL) and If a new row exists it starts some processing in the DB. Now in order to avoid SPOF I load another instance of the application and I…
Bick
  • 17,833
  • 52
  • 146
  • 251
1 2 3 4 5
6