Skip to content

Simple cache buffer system using doubly linked list programmed in C.

Notifications You must be signed in to change notification settings

emreblgn/Cache-Buffer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 

Repository files navigation

Simple Cache Buffer Design

Implementation of a cache buffer system that use doubly linked list using language C.

The program has 4 main part:

  1. Implementation of double linked list nodes and data structure.

    • Every node keeps adress of the page, total request count, pointer of the previous node and pointer of the next node.
  2. Solution of the given operation with using doubly linked list.

    • Reading input.
    • Processing input.
      • If input address already exist in cache buffer its request count increase by 1. If its request count is bigger than threshold value 't' node will be moved to head node.
    • Controlling cache buffer.
      • Cache buffer has a capacity 'l' if this capacity is exceeded last node will be deleted.
  3. Repeating 2nd part for every request.

  4. Clearing the buffer.

    • User can ask for clear the cache and stop the program.

Sample Inputs and Outputs:

About

Simple cache buffer system using doubly linked list programmed in C.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages