martes, 13 de diciembre de 2011


LRU Cache is implemented through the LinkedHashMap class, this holds values with unique key.

Many methods which have been used in the following program are explained as follows.

This class is also used for the implementing the doubly linked list which tracks either insertion or access order.

Objects are valid only to the duration of the interation.

Returns the key corresponding to the value.

This entry is for points in second opportunity.

FIFO and Queue

FIFO: Allows data exchange between processes, with a queue where read us and write bytes.

A queue holds a collection of data or elements and follows the FIFO rule.
The FIFO that means which data added first in the list, only that element can be removed or retrieved first from the list.

I explain how a queue is implemented.

- This is the constructor of the LinkedList class. This class importing the java.util package.

Removes and returns the first element of the list

Removes and returns the last element of the list.

This method checks whether the list is empty or not.

This method used to remove the elements in the list in a specified sequence.

This entry is for points in second opportunity.

File System

In this part talk about File System

File System : Structured information stored in a storage unit.

To open the file:

The path can be absolute or relative.
Oflag: Opens the file for reading, writing or both.
- O_RDONLY - Read
- O_WRONLY - Write
- O_RDWR - Both

To create a link to a file:

This entry is for points in second opportunity.