well the important thing about this is that, bplock is just another abstraction over condition variable by that I mean it is inspired by it, but this also ensures order at database level of reads and writes on database pages
ITS ALL JUST ABSTRACTIONS!!
done and I realized that this mainly reduces reader only contention and if writers are queued they still execute in a serial manner, still havent tested mixed version but here are the stats for only readers:
average over 5 exp,
1. single lock : 0.27042us
2. bplock : 0.00792us
done and I realized that this mainly reduces reader only contention and if writers are queued they still execute in a serial manner, still havent tested mixed version but here are the stats for only readers:
average over 5 exp,
1. single lock : 0.27042us
2. bplock : 0.00792us
2 invariant:
1. the order of request should hold.
2. the thread are handled by os, should wait physically.
for 1 a FIFO is used, for 2 the FIFO contains condition variable, mutex, lock type.
all reads up till a write request are processed together, to maintain a consistent view
@ayesha_fatiima Can it be because this is fairly new and people just practiced leetcode and expected to understand codebase with help on job and never practicing for that?
2 invariant:
1. the order of request should hold.
2. the thread are handled by os, should wait physically.
for 1 a FIFO is used, for 2 the FIFO contains condition variable, mutex, lock type.
all reads up till a write request are processed together, to maintain a consistent view
continuing with my database, as concurrency and transactions were in place, I changed how locks were acquired on buffer pool.
earlier a single lock was used, that means a lot of competing threads, so I decided to add Reader/Writer Locks