Skip to content

Tag: multithreading

Read/Write lock for linux kernel module

I’m trying to protect my list with data using read/write locks, i found solution in this thread: What’s the best linux kernel locking mechanism for a specific scenario But i can’t find needed headers for this solution, seems it is outdated, error: error: ‘RW_LOCK_UNLOCKED’ undeclared here (n…

Improve MySQL Performance

Info: MySQL Community 5.7.12 64 bits Programming Language: Python 3.5 mysqld.cnf: Mysqld.cnf result of “show variables” show variables Description: – I have 200 000 tasks. – I process these tasks with 500 threads, one per task, when a thread finishes, another task start. The point of t…

POSIX timer hangs up after a few runs

I have created a POSIX timer in the main function of my program. Each thread of the main program is setting the timer so that on expiry of it, the signal handler update one variable which awakes the next thread of the same process. The timer is working fine most of the time but not always. It sometimes comple…