Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 2 of 2

Thread: Can someone just point me into the right direction?

  1. #1
    Member
    Join Date
    Aug 2013
    Posts
    41
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Can someone just point me into the right direction?

    I am trying to do my term project for my Operating Systems class but I am just lost and do not know what direction to go. I am NOT asking for someone to do it for me, I just simply want someone to give me an idea as to how to approach it. Thank you.

    Project:


    In this project you will investigate the performance of Job Scheduling strategies, Memory Allocation strategies and a CPU Scheduling strategy used by a hypothetical operating system (HOS). The computer system that runs this HOS has four identical processors so that four ready processes can execute truly in parallel. The HOS uses multiprogramming to multiplex the four processors amongst all the memory-resident jobs. The physical memory space is divided into several segments of varying sizes and the allocation strategy uses contiguous allocation of memory space to the waiting processes. Each user program runs in a single segment. Any unused space of an allocated segment is considered wasted.

    Memory space requirement and CPU time requirement of all the jobs will be randomly generated: this data essentially constitutes the “Job Queue” or “Input Queue”. The HOS allocates memory to as many jobs as possible based on the scheduling and allocation strategies. It then starts their execution. These jobs remain in memory until completion (no preemption.). When one or more jobs finish, the HOS brings in additional jobs from the job queue based on the same scheduling and allocation strategies.

    The following information will be needed to run the simulation:

    1. You will need to identify and keep current the following information on each job:
    a. Job identification number
    b. Memory request (in MB)
    c. Execution time request
    d. Memory assigned (segment number)
    e. Execution time remaining (initially same as item c.)
    f. Job status: Waiting, Ready, Running, & Finished

    2. You will need to maintain the following information on memory:
    a. Segment number
    b. Size in megabytes (MB)
    c. Whether the segment is in use or not
    d. Wasted space (MB)

    3. The physical memory of size 256 megabytes is partitioned into seven memory blocks as indicated in the table below.
    Fixed-Size Memory Segments

    Segment Number Size in MB
    0 32
    1 48
    2 24
    3 16 4 64
    5 40
    6 32




    4. The input for the simulation will be the memory request and execution time request of a sequence of jobs. To generate input, use the random number generator Math.random() or Random class provided by Java. Use calls to the random number generator to input a job. Assume that memory requests (in MB) are randomly distributed in the range (12 - 50) and time requests are in the range (2 - 10). You should generate 20 jobs, all assumed to have an arrival time of 0 (zero). For job identification, you number the jobs 1 to 20, in order, as they are generated. We will assume that the simulation will run for 30 time units.

    5. For the sake of simplicity, we will assume that all execution times are in multiples of one time slice unit. We will assume true parallel processing of jobs and thus, during each time slice, take one time unit off the time remaining for four of the active jobs. To be fair to all the jobs in the ready queue, you need to schedule the ready jobs in a round robin fashion.

    The output should include the following:

    For every unit of time, output the events that occurred in that time unit

    TIME ID SEGMENT MEM REQUEST TIME REMAIN MESSAGES
    … … … … … …

    5 8 1 40 5 running
    5 11 5 30 3 running
    5 12 0 30 4 ready
    5 7 -1 45 8 waiting
    … … … … … …

    20 20 1 40 7 ready
    20 15 0 30 4 running
    20 13 -1 50 0 finished

    At the end of each time step, output the number of jobs that are waiting and the total memory wasted. At the end of the simulation, output the total number of jobs completed.

    You need to do simulation for the following three cases (all three should use the same test data.) Compare and explain the results from the three cases.

    Case One
    Jobs are moved from the job queue to the ready queue in First-Come First-Served order and
    using the First-Fit allocation policy. The jobs in the ready queue are executed on the four processors in a round robin fashion with a time slice of one time unit.

    Case Two
    Jobs are moved from the job queue to the ready queue in First-Come First-Served order and
    using the Best-Fit allocation policy. The jobs in the ready queue are executed on the four processors in a round robin fashion with a time slice of one time unit.

    Case Three
    Jobs are moved from the job queue to the ready queue in Shortest-Job First-Served order (shortest means smallest execution time) and using the Best-Fit allocation policy. The jobs in the ready queue are executed on the four processors in a round robin fashion with a time slice of one time unit.


    DELIVERABLES AND OTHER EXPECTATIONS

    1. You may work on this project as a team of two students. You should let me know who will be your team partner by 11th March (Tuesday) class time. For any reason you encounter problems with your team-mate, it is your responsibility to complete the project on your own & then submit the deliverables under your name only.

    2. A detailed, well-written, professional design document describing your assumptions, data structure choices and algorithm strategies used in the project. It should include the top-down design details of your program logic. It should also include a conclusion section discussing the observed results. A one page preamble to the design document should describe the breakdown of work: which parts of the project you both worked on, which parts you worked on individually, and how you integrated all parts. Spelling and grammar mistakes will be penalized.

    3. Your Java source code files must be well-commented & well structured and should include the names of the team partners.

    4. Hardcopy of all source code files used in the project and hardcopy of all the results from your program are due to the instructor by the due date time. Format the results so that they are concise and readable.

    5. Create a README text file that shows the name and purpose of each of the Java source file belonging to your project. The README file also should inform the instructor how to compile/run your program and where to find the program results.

    6. Put all the files belonging to your project in a folder named P_XX_YY where XX and YY stand for first & last initials of the two team members. Post the zip file of this folder to the appropriate Blackboard location by the due date time.


  2. #2
    Super Moderator
    Join Date
    Jun 2013
    Location
    So. Maryland, USA
    Posts
    6,290
    My Mood
    Mellow
    Thanks
    252
    Thanked 777 Times in 762 Posts

    Default Re: Can someone just point me into the right direction?

    I am trying to do my term project for my Operating Systems class but I am just lost and do not know what direction to go.
    There's not much we can do with lost and directionless, because we don't know what you don't know, and we can't start every response from ground zero. You have to give us a starting point by letting us know why you feel lost and what about the assignment confuses you.

    Perhaps you're overwhelmed by the size and complexity of the project. Maybe you've procrastinated and don't have much time. If so, when you're well rested, sit down with the assignment determined to make progress, read it completely through, and start outlining a solution. What classes might be needed? What queues and data structures will be used? What are First-Fit and Best-Fit allocation policies? What will the test program look like in order to setup and run the 3 test cases?

    If you have a partner, discuss the assignment, answers to the basic questions posed above, and determine how you'll work the project as a team. Set some deadlines and get to work.

    Not sure what else to tell you at this point. If you have specific questions or areas of uncertainty, come back with them.

Similar Threads

  1. [SOLVED] Validation of user, fails ned a point in the right direction
    By tools in forum JDBC & Databases
    Replies: 0
    Last Post: October 8th, 2013, 04:04 PM
  2. Can Anyone Point me in the right direction?
    By ImyMTD in forum AWT / Java Swing
    Replies: 8
    Last Post: May 4th, 2013, 03:29 AM
  3. Can anyone point me in the right direction dealing with bytes
    By derekxec in forum Java Theory & Questions
    Replies: 5
    Last Post: August 18th, 2012, 02:44 PM
  4. HI WORLD! Can anyone point a complete novice in the right direction??
    By Irish-novice in forum Member Introductions
    Replies: 4
    Last Post: June 26th, 2012, 06:16 PM
  5. [SOLVED] Someone point me to the right direction..
    By ineedhelp in forum JavaServer Pages: JSP & JSTL
    Replies: 0
    Last Post: June 30th, 2011, 11:03 PM