Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Testing concurrent data structures

How can you practically test a synchronized data structure (in C)?

Firing a couple of threads and have them compete for access to the structure for a while to see if anything goes wrong doesn't sound very safe.

EDIT in response to comments: I mean that there are several threads running functions that operate on the same set of data, with some kind of synchronization strategy (flags/semaphores/lock-free CAS/etc) to presumably eliminate race conditions and deadlocks. The problem is programatically testing for the correct synchronization of the workers.

like image 396
slezica Avatar asked Jan 24 '12 22:01

slezica


People also ask

What is concurrency in performance testing?

Concurrency testing is a type of software testing that checks the performance of software when multiple users are logged in and perform actions simultaneously. Hence, it is also referred to as multi-user testing.

What is concurrency in data structure?

In computer science, a concurrent data structure is a particular way of storing and organizing data for access by multiple computing threads (or processes) on a computer.

How do concurrent data structures work?

Concurrent data structures permit many threads to operate on common data using a high-level interface. When a data structure is accessed concurrently by many threads, its semantics are typically defined by a property called linearizability,8 which provides strong consistency.


1 Answers

No-one really knows how to do this with 100% reliability. Here is just one example of of a testing tool to find concurrency bugs.

like image 66
markgz Avatar answered Oct 06 '22 00:10

markgz