Managing and exploiting flash-based storage for data-intensive systems