answer is 19 units.
@Swapnil Naik because all the job is initial available
@Tuhin Dutta it is the static allocation so the J8 should go in the 2K slot even though the 4K is empty before 2K slot,
@Kushagra गुप्ता Here should we assume like it is a multicore CPU?
Partitons are $4k , 8k, 20k, 2k$, now due to best fit algo,
and next job size of $10 k$ $(5)$ wait for the partition of $20k$ and after completion of no. $2$ job, job no. $5$ will be executed for $1$ unit ($10$ to $11$). Now, $20 k$ is also waiting for partition of $20k$, because it is best fit for it. So after completion of job $5$, it will be fit . So, it will execute for $8$ unit which is $11$ to $19$. So, at $19$ unit $20k$ job will be completed .
Answer should be $19$ units.
There are two 6k requests in the question and you have considered only 1,
the first 6k request will be satisfied by the 20k partition executing 14k request, and from the next 6k request your answer will apply,
Although answer will be same, at 19s.
No, don't consider CPU scheduling as it is not mentioned.
Whenever the context is partitioning or allocation using best fit etc Consider the execution time as the time for which a process will occupy a partition. These kind of questions should be dealt in this way.
I have a doubt.
After we put '14K' process into '20K' partition, there'll be '6K' left. The next '6K' can be put into it instead of '8K' partition. This delays the execution of '20K' process by one unit.
So, shouldn't the answer be 20?
Please correct me if I'm missing anything here.
In question it's not specifically mentioned that we gotta consider STATIC-PARTITIONING so why we're allowing only one-process in a partition at a time?
But a 14k process in 20k partition isn't occupying the partition completely and a process of 6k can be fitted in there. How their address-spaces are essentially overlapping?
If the question were about fixed/static-partitioning then you would have been surely correct.
Ans: 19 time unit
First thing we can do is distributes the jobs among partitions as given below:
Now question is asked for 20K job so clearly it depends on 14K and 10K jobs
So it will complete after: 14K Execution time (10) + 10K Execution time (1) + 20K Execution time (8)