Is there a less CPU-intensive alternative for TOmniMREW?

Eric Grange

I'm after a slim Single-Read Multi-Write lock, similar to TOmniMREW, but that would be less CPU-intensive in cases of contention.

TOmniREW uses only a spinlock, so threads will skyrocket to 100% CPU usage until they can acquire the lock.

Currently I'm using a Critical Section, and while it has less efficient behavior (I have more readers than writers), in case of contention threads relinquish their CPU times.

Contention happens very occasionally in my case, typically when a writer triggers a more complex (lengthy) operation, but when it does, the spinlocks have CPU usage skyrocket.

The Windows SRW implementation uses a similar strategy and is of no help (edit: actually it's about 2-3 times faster in some cases of high contention, but still exhibits the issue edit 2: TOmniMREW will be using SRW when available in future version, so speed will be the same).

Eric Grange

Actually after more testing, it appears that Windows SRW does relinquish CPU, it just takes slightly more times for it to do so than I saw in my Critical Sections test.

So Windows SRW are the answer.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Alternative of Thread.Abort for a cpu+time intensive method

From Dev

Least CPU intensive loop

From Dev

Dependent properties that are CPU intensive

From Dev

RxJava sample() is CPU intensive

From Dev

CPU-intensive parsing with scrapy

From Dev

CPU-intensive parsing with scrapy

From Dev

NSDate processing very CPU intensive

From Dev

alternative to breakOut that is less verbose

From Dev

Do you need a WakeLock for CPU intensive services?

From Dev

Why is slither.io CPU intensive?

From Dev

Is the time.h library in c cpu intensive?

From Dev

Power-off on CPU-intensive task

From Dev

Improvement of Nodejs CPU intensive tasks using webAssembly

From Dev

An alternative to bitmapdata with less memory usage?

From Dev

A less costly alternative to indexed views?

From Dev

Which SCM is less disk intensive? (GIT vs SVN vs others)

From Dev

Is short-polling less resource-intensive than message queues?

From Dev

Pig CPU intensive task - small data file - many mappers?

From Dev

How to parallelize CPU intensive operations in ASP.NET

From Dev

Handling CPU intensive computations in a Node.js application

From Dev

Hadoop Java vs C/C++ on cpu-intensive tasks

From Dev

Pig CPU intensive task - small data file - many mappers?

From Dev

NextTick() does not working [Interleaving CPU-intensive task with other events]

From Dev

what architecture to use for website with cpu intensive server side tasks?

From Dev

Least CPU intensive way of streaming your screen on windows?

From Dev

least CPU intensive serial logging on embedded (router) Linux

From Dev

doing multicore programming when CPU intensive applications are running in background?

From Dev

Scaling out CPU-intensive tasks in .NET application hosted in AWS

From Dev

Is CPU and bandwidth intensive sending push notifications directly with Firebase Cloud Messaging?

Related Related

  1. 1

    Alternative of Thread.Abort for a cpu+time intensive method

  2. 2

    Least CPU intensive loop

  3. 3

    Dependent properties that are CPU intensive

  4. 4

    RxJava sample() is CPU intensive

  5. 5

    CPU-intensive parsing with scrapy

  6. 6

    CPU-intensive parsing with scrapy

  7. 7

    NSDate processing very CPU intensive

  8. 8

    alternative to breakOut that is less verbose

  9. 9

    Do you need a WakeLock for CPU intensive services?

  10. 10

    Why is slither.io CPU intensive?

  11. 11

    Is the time.h library in c cpu intensive?

  12. 12

    Power-off on CPU-intensive task

  13. 13

    Improvement of Nodejs CPU intensive tasks using webAssembly

  14. 14

    An alternative to bitmapdata with less memory usage?

  15. 15

    A less costly alternative to indexed views?

  16. 16

    Which SCM is less disk intensive? (GIT vs SVN vs others)

  17. 17

    Is short-polling less resource-intensive than message queues?

  18. 18

    Pig CPU intensive task - small data file - many mappers?

  19. 19

    How to parallelize CPU intensive operations in ASP.NET

  20. 20

    Handling CPU intensive computations in a Node.js application

  21. 21

    Hadoop Java vs C/C++ on cpu-intensive tasks

  22. 22

    Pig CPU intensive task - small data file - many mappers?

  23. 23

    NextTick() does not working [Interleaving CPU-intensive task with other events]

  24. 24

    what architecture to use for website with cpu intensive server side tasks?

  25. 25

    Least CPU intensive way of streaming your screen on windows?

  26. 26

    least CPU intensive serial logging on embedded (router) Linux

  27. 27

    doing multicore programming when CPU intensive applications are running in background?

  28. 28

    Scaling out CPU-intensive tasks in .NET application hosted in AWS

  29. 29

    Is CPU and bandwidth intensive sending push notifications directly with Firebase Cloud Messaging?

HotTag

Archive