opening a file f: fd = open(f,RW) -> adr = mmap (f,RW) filelist[fd].mem = adr reading from a file f: read (fd, buf, count) -> adr = filelist[fd].mem offset = filelist[fd].pos filesize = filelist[fd].size if (offset+count > size) count = count - ... memcpy (buf, adr+offset, count) offset += count return count lseek (fd, offset, OPT) -> calculate absolute offset from current filelist[fd].pos filelist[fd].pos = abs_offset writing to a file f: - problem with appending to a file - need to have a more flexible mmap() - or use a maximal file size and create a sufficiently large mapping - otherwise like read()