Qualcomm Interview Question

Write a script to mimic buffer I/O operations done by the O.S.