operating system program in java


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 3 of 3

Thread: operating system program in java

  1. #1
    bina Guest

    operating system program in java



    1. A process contains eight virtual pages on disk and is assigned a fixed
    allocation of
    four page frames in main memory. The following page trace occurs:
    1, 0, 2, 2, 1, 7, 6, 0, 1, 2, 0, 3, 0, 4, 5, 1, 5, 2, 4, 5, 6, 7, 2, 4, 2,
    7, 3, 3, 2, 3
    a. Show the successive pages residing in the four frames using the LRU
    replacement algorithm. Compute the hit ratio in main memory. Assume the
    frames are initially empty.
    b. Repeat part (a) for the FIFO replacement policy.
    c. Explain why the differences between the two ratios in part (a) and part
    (b).

    d. Write a program (e.g. using Java) to simulate part (a) and part (b). That
    is, to
    simulate that a fixed allocation of four page frames in main memory is used
    for a process containing eight virtual pages on disk. Assume the frames are
    initially empty. At the start of the program, the user should be asked to
    choose
    a page replacement algorithm from FIFO and LRU. On each cycle, read the
    number of the referenced page and display a list of pages residing in the
    frames. Also run the program with an equal-length sequence of numbers, each
    being chosen randomly from the uniform distribution 07. Briefly discuss
    the two results of using FIFO and LRU.

    Can any one write for me program just part (d) in java language.
    thanks in advance.
    bina

  2. #2
    Ako Guest

    Re: operating system program in java


    I doubt any one will do your home work for you. you got to have a go and ask
    specific questions here if you have any problems, there will be many people
    willing to help.

    Ako


    "bina" <syedaferdous@hotmail.com> wrote:
    >
    >
    >1. A process contains eight virtual pages on disk and is assigned a fixed
    >allocation of
    >four page frames in main memory. The following page trace occurs:
    >1, 0, 2, 2, 1, 7, 6, 0, 1, 2, 0, 3, 0, 4, 5, 1, 5, 2, 4, 5, 6, 7, 2, 4,

    2,
    >7, 3, 3, 2, 3
    >a. Show the successive pages residing in the four frames using the LRU
    >replacement algorithm. Compute the hit ratio in main memory. Assume the
    >frames are initially empty.
    >b. Repeat part (a) for the FIFO replacement policy.
    >c. Explain why the differences between the two ratios in part (a) and part
    >(b).
    >
    >d. Write a program (e.g. using Java) to simulate part (a) and part (b).

    That
    >is, to
    >simulate that a fixed allocation of four page frames in main memory is used
    >for a process containing eight virtual pages on disk. Assume the frames

    are
    >initially empty. At the start of the program, the user should be asked to
    >choose
    >a page replacement algorithm from FIFO and LRU. On each cycle, read the
    >number of the referenced page and display a list of pages residing in the
    >frames. Also run the program with an equal-length sequence of numbers, each
    >being chosen randomly from the uniform distribution 07. Briefly discuss
    >the two results of using FIFO and LRU.
    >
    >Can any one write for me program just part (d) in java language.
    >thanks in advance.
    >bina



  3. #3
    mike Guest

    Re: operating system program in java


    for those of you who would be able to answer this question...i'll ask this.
    on a WinNT system how can my user program specify the memory working set
    size for my process? i thought this is an operation of the underlying operation
    system to determine the working set size for a process. i didn't think it
    was possible for my user mode program to specify to the kernel the granularity
    of the number of pages allocated for the process.

    Note, i'm not referring to the java vm's ability to set the min/max hint
    for initial memory allocation.

    cheers,
    mike


    "bina" <syedaferdous@hotmail.com> wrote:
    >
    >
    >1. A process contains eight virtual pages on disk and is assigned a fixed
    >allocation of
    >four page frames in main memory. The following page trace occurs:
    >1, 0, 2, 2, 1, 7, 6, 0, 1, 2, 0, 3, 0, 4, 5, 1, 5, 2, 4, 5, 6, 7, 2, 4,

    2,
    >7, 3, 3, 2, 3
    >a. Show the successive pages residing in the four frames using the LRU
    >replacement algorithm. Compute the hit ratio in main memory. Assume the
    >frames are initially empty.
    >b. Repeat part (a) for the FIFO replacement policy.
    >c. Explain why the differences between the two ratios in part (a) and part
    >(b).
    >
    >d. Write a program (e.g. using Java) to simulate part (a) and part (b).

    That
    >is, to
    >simulate that a fixed allocation of four page frames in main memory is used
    >for a process containing eight virtual pages on disk. Assume the frames

    are
    >initially empty. At the start of the program, the user should be asked to
    >choose
    >a page replacement algorithm from FIFO and LRU. On each cycle, read the
    >number of the referenced page and display a list of pages residing in the
    >frames. Also run the program with an equal-length sequence of numbers, each
    >being chosen randomly from the uniform distribution 07. Briefly discuss
    >the two results of using FIFO and LRU.
    >
    >Can any one write for me program just part (d) in java language.
    >thanks in advance.
    >bina



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center