GSoC 2014 Update : Caching Plugin for Monkey server – Week 1

This is my first week’s update on my GSoC Project – Developing a caching plugin for Monkey server.

During the community bonding period, I had started coding some of the basic data structures that would be required for the caching plugin, such as the hash table for lookup of a resource and a min heap for the deletion of the file that has been used the least number of times. Since these are independent structures from the code, I decided to get started with these. I had done a very simple implementation of these.
Work done this week :
The designed and coded  are the functions that I added :
  1. Hash table : 
    1. create_ht
    2. insert_ht
    3. lookup
    4. delete_ht
  2. Min heap : 
    1. insert
    2. pop
During the first week, I improvised on my code and also added a makefile for easy compilation by referring to [3].
I then concentrated on reading up more about linux system calls that would enable memory copying of files in the cache. My mentor, Eduardo suggested that I try using mmap () for this purpose. mmap is basically a linux system call, an interface, that can be used to map files onto the virtual memory of the process that calls it. You can read more about it at [1] and [2]. I tried out mapping files using mmap function.
Problem faced :  
I had some problems with the makefile and also the delete function of hash table. However I fixed both these problems. You can view my code at [4].
Work for next week : 
I figured out that I would also need to copy the hash table also onto the memory. So I am going to be working on that for the next week. I will also improvise more on my code.
Links : 

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s