[NEWS] Objects Cache

This forum is dedicated to feedback, discussions about ongoing or future developments, ideas and suggestions regarding the ChibiOS projects are welcome.
User avatar
Giovanni
Site Admin
Posts: 12098
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 549 times
Been thanked: 469 times
Contact:

[NEWS] Objects Cache

Postby Giovanni » Wed Aug 28, 2019 10:30 am

Hi,

I just added to OSLIB in trunk a new class "Objects Cache", it implements a cache of arbitrary objects or buffers that are read/written from/to an arbitrary media.

The class implements a LRU list with most recently used objects/buffers, an hash table is used for fast objects/buffers retrieval. Some features:
- Fully static.
- Synchronous or asynchronous read and write operations.
- Read ahead.
- Immediate or lazy write operations.
- Mutual exclusion implemented at object/buffer level (multiple threads can ask for the same object and are serialized if required).

The test suite is not complete but it APPEARS to work, the most immediate use case is to add it to the FatFS bindings in order to increase I/O performance. Ideally it will be used by a native FS able to leverage the advanced features like lazy writing which FatFS could not support as-is.

Giovanni

Return to “Development and Feedback”

Who is online

Users browsing this forum: No registered users and 4 guests