Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.programming.threads > #5247
| From | Bonita Montero <Bonita.Montero@gmail.com> |
|---|---|
| Newsgroups | comp.programming.threads |
| Subject | Re: Read again my "final" corrected post about about efficiency and performance.. |
| Date | 2019-10-16 13:48 +0200 |
| Organization | albasani.net |
| Message-ID | <qo702n$63k$1@news.albasani.net> (permalink) |
| References | <a56ddc60-5f15-4dd4-b415-d4932b2313f9@googlegroups.com> |
Amine, a quest for you: Database-servers and operating-system-kernels mostly use LRU as the scheme to evict old buffers from their cache. One issue with LRU is, that an LRU-structure can't be updated by multiple threads simultaneously. So you have to have a global lock. I managed to write a LRU-caching-class that can update the links in the LRU-list to put the most recent fetched block to the head of the list without any lock in almost any acccess. Only when flushing an entry or inserting a new I have to lock the structure completely; but in contrast to cache-hits this has usually a mag- nitude lower frequency because of the slowness of disk-/ssd-access, so this doesn't relly hurt. The algorithm is partitiylly locked, partitially lock-free. Even the case when putting cache hits to the head has to be processed in locked mode in very rare cases. And as I said inserting and flushing is conventional locked access. So the quest is for you: Can you guess what I did?
Back to comp.programming.threads | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Read again my "final" corrected post about about efficiency and performance.. aminer68@gmail.com - 2019-10-14 14:18 -0700
Re: Read again my "final" corrected post about about efficiency and performance.. Bonita Montero <Bonita.Montero@gmail.com> - 2019-10-16 13:48 +0200
Re: Read again my "final" corrected post about about efficiency and performance.. Wisdom90 <d@d.d> - 2019-10-16 13:29 -0400
Re: Read again my "final" corrected post about about efficiency and performance.. Bonita Montero <Bonita.Montero@gmail.com> - 2019-10-16 20:14 +0200
Re: Read again my "final" corrected post about about efficiency and performance.. Wisdom90 <d@d.d> - 2019-10-16 14:19 -0400
Re: Read again my "final" corrected post about about efficiency and performance.. Bonita Montero <Bonita.Montero@gmail.com> - 2019-10-17 05:07 +0200
Re: Read again my "final" corrected post about about efficiency and performance.. Wisdom90 <d@d.d> - 2019-10-16 14:20 -0400
csiph-web