Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New to the CF scene
    Join Date
    Mar 2009
    Posts
    1
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Unhappy simulator for managing of files on a disk.

    How to create this disk simulator?can u do this using java?



    Disk space is a valuable resource which should be used sparingly. When a file is brought in to a
    computer it saves all the data contained in to the disk. Managing files in a disk is a interesting
    task. Initially the all the available disk space is in kept in a pool which can be represented by a
    linked list (the space does not have to be contiguous). When a file is saved the space is taken
    from the pool and the allocation is maintained at the files end with another linked list
    You are required to implement a simulator for managing of files on a disk. Please follow the
    guidelines given below.
     Define the disk as an array of size numberOfSectors*sizeOfSector, sizeOfSector refers
    to the amount of characters stored in one sector. As for this assignment we will resolve to
    have 100 sectors with each holding 4 characters.
     The structure of the linked list node should be identified and it does not have to be the
    same for both the lists

     Implement the methods to save and delete files.
     Since the allocated sectors might not be contiguous (this phenomenon is known as
    fragmentation ) retrieval of the file from the disk can be very badly affected. You are
    required to write method which would remove file fragmentation from the disk.
    Coding Constraints
     Name of the Java class should be FileManagementSim
     The array should be named disk and the two linked lists should be named pool and file
     The method signatures of the above operations should be save(String filename) ,
    delete(String filename) and defragment(). You can have any number of methods you
    want but these three methods with there respective signatures are mandatory.
     The complete source code should be written in a single file . Once you have tested your
    program remove the main method from it before submitting.

  • #2
    God Emperor Fou-Lu's Avatar
    Join Date
    Sep 2002
    Location
    Saskatoon, Saskatchewan
    Posts
    16,978
    Thanks
    4
    Thanked 2,659 Times in 2,628 Posts
    Given you're criteria for note 5, yep its supposed to be in Java.

    This is clearly a homework assignment. We cannot do you're work for you, but we can answer any specific questions. Do you have any?
    PHP Code:
    header('HTTP/1.1 420 Enhance Your Calm'); 

  • Users who have thanked Fou-Lu for this post:

    vipula (03-31-2009)

  • #3
    Gox
    Gox is offline
    Regular Coder Gox's Avatar
    Join Date
    May 2006
    Location
    Ontario, Canada
    Posts
    392
    Thanks
    2
    Thanked 20 Times in 20 Posts
    You know, maybe we should take posts in the above form (OP's post); Where nothing more than the assignment description is given and move them all into a single thread. That way when the occasional person who actually wants to learn to program posts a thread like "I want to learn give me some projects to try" we can just point them to the thread with a list of other peoples assignment questions.

  • Users who have thanked Gox for this post:

    vipula (03-31-2009)


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •