Computer Science Engineering (CSE) Exam  >  Computer Science Engineering (CSE) Questions  >  A computer has 1000 K of main memory. The job... Start Learning for Free
A computer has 1000 K of main memory. The jobs arrive and finish in the sequence Job 1 requiring 200 K arrives Job 2 requiring 350 K arrives Job 3 requiring 300 K arrives Job 1 finishes Job 4 requiring 120 K arrives Job 5 requiring 150 K arrives Job 6 requiring 80 K arrives Among best fit and first fit, which performs better for this sequence?
  • a)
    First fit
  • b)
    Best fit
  • c)
    Both perform the same
  • d)
    None of the above
Correct answer is option 'A'. Can you explain this answer?
Most Upvoted Answer
A computer has 1000 K of main memory. The jobs arrive and finish in th...
First Fit
- In the First Fit memory allocation algorithm, the operating system allocates the first available block that is large enough to accommodate a job.
- This means that the system will allocate the job to the first hole in memory that is big enough to hold it.
- In the given sequence of jobs and memory requirements, Job 1 arrives first and requires 200 K of memory.
- Since there is no allocated memory yet, Job 1 is allocated the first available block of 200 K in the main memory.
- Job 2 arrives next and requires 350 K of memory. This job is allocated the next available block of 350 K in the memory.
- Job 3 arrives and requires 300 K of memory. It is allocated the next available block of 300 K in memory.
- Job 1 finishes, and its previously allocated block of 200 K becomes available.
- Job 4 arrives and requires 120 K of memory. The First Fit algorithm will allocate this job to the first available block that is large enough to hold it. In this case, it will allocate the job to the 200 K block previously allocated to Job 1.
- Job 5 arrives and requires 150 K of memory. It is allocated the next available block of 150 K in memory.
- Job 6 arrives and requires 80 K of memory. It is allocated the next available block of 80 K in memory.

Best Fit
- In the Best Fit memory allocation algorithm, the operating system allocates the smallest available block that is large enough to accommodate a job.
- This means that the system will search for the smallest hole in memory that is big enough to hold the job and allocate it there.
- In the given sequence of jobs and memory requirements, Job 1 arrives first and requires 200 K of memory.
- Since there is no allocated memory yet, Job 1 is allocated the first available block of 200 K in the main memory.
- Job 2 arrives next and requires 350 K of memory. This job is allocated the next available block of 350 K in the memory.
- Job 3 arrives and requires 300 K of memory. It is allocated the next available block of 300 K in memory.
- Job 1 finishes, and its previously allocated block of 200 K becomes available.
- Job 4 arrives and requires 120 K of memory. The Best Fit algorithm will search for the smallest hole that can accommodate the job, which in this case is the 200 K block previously allocated to Job 1. The job is allocated there.
- Job 5 arrives and requires 150 K of memory. The Best Fit algorithm will search for the smallest hole that can accommodate the job, and it finds a 150 K block available. The job is allocated there.
- Job 6 arrives and requires 80 K of memory. The Best Fit algorithm will search for the smallest hole that can accommodate the job, and it finds an 80 K block available. The job is allocated there.

Performance Comparison
- In this particular sequence of jobs and memory requirements, the First Fit algorithm performs better than the Best Fit algorithm.
- The First Fit algorithm allocates the jobs to the first available blocks, resulting in efficient memory utilization.
- The Best Fit algorithm, on the other hand, searches for the smallest holes which may lead to fragmentation and inefficient memory
Free Test
Community Answer
A computer has 1000 K of main memory. The jobs arrive and finish in th...
Main memory = 1000K Job 1 requiring 200 K arrives Job 2 requiring 350 K arrives Job 3 requiring 300 K arrives and assuming continuous allocation: Free memory = 1000 − 850(200 + 350 + 300) = 150 K (till these jobs first fit and best fit are same) Since, job 1 finishes, Free memory = 200 K and 150 K Case 1: First fit Job 4 requiring 120 K arrives Since 200 K will be the first slot, so Job 4 will acquire this slot only. Remaining memory = 200 - 120 = 80 K Job 5 requiring 150 K arrives It will acquire 150 K slot Job 6 requiring 80 K arrives It will occupy 80 K slot, so, all jobs will be allocated successfully. Case 2: Best fit Job 4 requiring 120 K arrives It will occupy best fit slot which is 150 K. So, remaining memory = 150 − 120 = 30 K Job 5 requiring 150 K arrives It will occupy 200 K slot. So, free space = 200 − 150 = 50 K Job 6 requiring 80 K arrives There is no continuous 80 K memory free. So, it will not be able to allocate. So, first fit is better. Option (A) is correct.
Explore Courses for Computer Science Engineering (CSE) exam

Similar Computer Science Engineering (CSE) Doubts

Top Courses for Computer Science Engineering (CSE)

A computer has 1000 K of main memory. The jobs arrive and finish in the sequence Job 1 requiring 200 K arrives Job 2 requiring 350 K arrives Job 3 requiring 300 K arrives Job 1 finishes Job 4 requiring 120 K arrives Job 5 requiring 150 K arrives Job 6 requiring 80 K arrives Among best fit and first fit, which performs better for this sequence?a)First fitb)Best fitc)Both perform the samed)None of the aboveCorrect answer is option 'A'. Can you explain this answer?
Question Description
A computer has 1000 K of main memory. The jobs arrive and finish in the sequence Job 1 requiring 200 K arrives Job 2 requiring 350 K arrives Job 3 requiring 300 K arrives Job 1 finishes Job 4 requiring 120 K arrives Job 5 requiring 150 K arrives Job 6 requiring 80 K arrives Among best fit and first fit, which performs better for this sequence?a)First fitb)Best fitc)Both perform the samed)None of the aboveCorrect answer is option 'A'. Can you explain this answer? for Computer Science Engineering (CSE) 2024 is part of Computer Science Engineering (CSE) preparation. The Question and answers have been prepared according to the Computer Science Engineering (CSE) exam syllabus. Information about A computer has 1000 K of main memory. The jobs arrive and finish in the sequence Job 1 requiring 200 K arrives Job 2 requiring 350 K arrives Job 3 requiring 300 K arrives Job 1 finishes Job 4 requiring 120 K arrives Job 5 requiring 150 K arrives Job 6 requiring 80 K arrives Among best fit and first fit, which performs better for this sequence?a)First fitb)Best fitc)Both perform the samed)None of the aboveCorrect answer is option 'A'. Can you explain this answer? covers all topics & solutions for Computer Science Engineering (CSE) 2024 Exam. Find important definitions, questions, meanings, examples, exercises and tests below for A computer has 1000 K of main memory. The jobs arrive and finish in the sequence Job 1 requiring 200 K arrives Job 2 requiring 350 K arrives Job 3 requiring 300 K arrives Job 1 finishes Job 4 requiring 120 K arrives Job 5 requiring 150 K arrives Job 6 requiring 80 K arrives Among best fit and first fit, which performs better for this sequence?a)First fitb)Best fitc)Both perform the samed)None of the aboveCorrect answer is option 'A'. Can you explain this answer?.
Solutions for A computer has 1000 K of main memory. The jobs arrive and finish in the sequence Job 1 requiring 200 K arrives Job 2 requiring 350 K arrives Job 3 requiring 300 K arrives Job 1 finishes Job 4 requiring 120 K arrives Job 5 requiring 150 K arrives Job 6 requiring 80 K arrives Among best fit and first fit, which performs better for this sequence?a)First fitb)Best fitc)Both perform the samed)None of the aboveCorrect answer is option 'A'. Can you explain this answer? in English & in Hindi are available as part of our courses for Computer Science Engineering (CSE). Download more important topics, notes, lectures and mock test series for Computer Science Engineering (CSE) Exam by signing up for free.
Here you can find the meaning of A computer has 1000 K of main memory. The jobs arrive and finish in the sequence Job 1 requiring 200 K arrives Job 2 requiring 350 K arrives Job 3 requiring 300 K arrives Job 1 finishes Job 4 requiring 120 K arrives Job 5 requiring 150 K arrives Job 6 requiring 80 K arrives Among best fit and first fit, which performs better for this sequence?a)First fitb)Best fitc)Both perform the samed)None of the aboveCorrect answer is option 'A'. Can you explain this answer? defined & explained in the simplest way possible. Besides giving the explanation of A computer has 1000 K of main memory. The jobs arrive and finish in the sequence Job 1 requiring 200 K arrives Job 2 requiring 350 K arrives Job 3 requiring 300 K arrives Job 1 finishes Job 4 requiring 120 K arrives Job 5 requiring 150 K arrives Job 6 requiring 80 K arrives Among best fit and first fit, which performs better for this sequence?a)First fitb)Best fitc)Both perform the samed)None of the aboveCorrect answer is option 'A'. Can you explain this answer?, a detailed solution for A computer has 1000 K of main memory. The jobs arrive and finish in the sequence Job 1 requiring 200 K arrives Job 2 requiring 350 K arrives Job 3 requiring 300 K arrives Job 1 finishes Job 4 requiring 120 K arrives Job 5 requiring 150 K arrives Job 6 requiring 80 K arrives Among best fit and first fit, which performs better for this sequence?a)First fitb)Best fitc)Both perform the samed)None of the aboveCorrect answer is option 'A'. Can you explain this answer? has been provided alongside types of A computer has 1000 K of main memory. The jobs arrive and finish in the sequence Job 1 requiring 200 K arrives Job 2 requiring 350 K arrives Job 3 requiring 300 K arrives Job 1 finishes Job 4 requiring 120 K arrives Job 5 requiring 150 K arrives Job 6 requiring 80 K arrives Among best fit and first fit, which performs better for this sequence?a)First fitb)Best fitc)Both perform the samed)None of the aboveCorrect answer is option 'A'. Can you explain this answer? theory, EduRev gives you an ample number of questions to practice A computer has 1000 K of main memory. The jobs arrive and finish in the sequence Job 1 requiring 200 K arrives Job 2 requiring 350 K arrives Job 3 requiring 300 K arrives Job 1 finishes Job 4 requiring 120 K arrives Job 5 requiring 150 K arrives Job 6 requiring 80 K arrives Among best fit and first fit, which performs better for this sequence?a)First fitb)Best fitc)Both perform the samed)None of the aboveCorrect answer is option 'A'. Can you explain this answer? tests, examples and also practice Computer Science Engineering (CSE) tests.
Explore Courses for Computer Science Engineering (CSE) exam

Top Courses for Computer Science Engineering (CSE)

Explore Courses
Signup for Free!
Signup to see your scores go up within 7 days! Learn & Practice with 1000+ FREE Notes, Videos & Tests.
10M+ students study on EduRev