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