Thread: File System I/O

  1. #1
    Registered User
    Join Date
    Apr 2010
    Posts
    1

    Question File System I/O

    Characterize and compare the performance of file I/O by implementing reading and writing of files through the following three methods:

    · I/O through system calls read and write

    · Memory mapped I/O through mmap

    · Buffered I/O through read and write



    You should implement a program that can either read or write blocks of a given size from a large file. The user should be able to specify the I/O method to use for reading and writing. For example, writing blocks of 1K through system calls (the first method above) may be done as follows:

    iotest --method=syscall --blocksize=1024 --operation=write

    Use your program to measure the read and write I/O performance achieved through the three methods for various block sizes. What can you deduce from your observations?

    How do I start solving this?

  2. #2
    Registered User
    Join Date
    Feb 2010
    Posts
    11
    What code do you have so far? Post it up, even if all it does is handle the command line options.

  3. #3
    Noob AnishaKaul's Avatar
    Join Date
    Jan 2010
    Location
    Gurgaon, India
    Posts
    115
    What's so difficult in this ?

    Create a multi choice function for the following 3 user-choices:
    -I/O through system calls read and write
    -Memory mapped I/O through mmap
    -Buffered I/O through read and write

    Read about Buffered IO and UnBuffered IO from the following link:
    Input and Output (I/O):stdio.h

    Read about mmap command ! see below:
    http://www.devshed.com/c/a/BrainDump...anced-File-IO/
    Last edited by AnishaKaul; 04-15-2010 at 04:50 AM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Problem building Quake source
    By Silvercord in forum Game Programming
    Replies: 16
    Last Post: 07-11-2010, 09:13 AM
  2. Data Structure Eror
    By prominababy in forum C Programming
    Replies: 3
    Last Post: 01-06-2009, 09:35 AM
  3. Subtle(?) File I/O Problem
    By cecomp64 in forum C Programming
    Replies: 9
    Last Post: 07-16-2008, 11:39 AM
  4. Replies: 4
    Last Post: 10-21-2003, 04:28 PM
  5. simulate Grep command in Unix using C
    By laxmi in forum C Programming
    Replies: 6
    Last Post: 05-10-2002, 04:10 PM

Tags for this Thread