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: help

  1. #1
    Junior Member
    Join Date
    Nov 2011
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default help

    does someone knows to write java code for this i'm a begginer and don't know even what to do pls help thanks


    make a simulation of proccesses in the computer.For every process we have how much memory does it require, how much time the process needs to execute completly,when did the process arrived in the system and which processes the process depends on so that the process can be executed


    the file to read from should be like this

    no_cores
    ttl_ram
    quantum
    arrive_time pid ttl_time p_name mem_consumtion
    arrive_time pid ttl_time p_name mem_consumtion pid1
    arrive_time pid ttl_time p_name mem_consumtion pid1, pid2
    arrive_time pid ttl_time p_name mem_consumtion pid1
    arrive_time pid ttl_time p_name mem_consumtion pid1, pid2, pid4

    where

    no_cores represents a number which tell us how many core the processor has
    ttl_ram is how big is the ram (in bytes)
    arrive_time –the time when it arrives
    pid –unique id of the process(a whole number from 0 to 65536)
    ttl_time is the time the process needs to execute
    p_name –process name
    mem_consumption –how much memory the process need to be executed (in bytes)
    pidN- pid of the process from which the given process depends on

    when one process arrives it’s known from which processes the process depends off but it doesn’t mean that those processes are finished.
    The processes can be in the virtual memory or in the RAM,those which are in the ram stays there until they are executed .for those which there isn’t room in the RAM they are placed in the virtual memory. If one process is not in the RAM when it is time to be executed than that process is placed immediately at the end of the row if there is enough memory
    Practicaly this is what I need
    Reading all processes from a file
    Putting a new process in a row for execution О(1)
    Execution of a process О(1)
    Returning an unfinished process in a row О(1)
    Checking if all processes are executed from which a given process Is dependable of О(n)
    Checking if a given process is finished O(1)
    Keeping a log in the file
    Finding a deadlock
    Removing a deadlock

  2. #2
    Grand Poobah
    Join Date
    Mar 2011
    Posts
    1,512
    My Mood
    Grumpy
    Thanks
    0
    Thanked 165 Times in 156 Posts

    Default Re: help

    Thanks for dumping your assignment on us. I will start working on it right away!
    Improving the world one idiot at a time!