finish a complete prototype

implement MQA and FIFO replacement algo.