As desirable as that approach sounds, it did require the OS to look at every hole, or to keep the
holes in order sorted by size, so that it could find the best fitting hole for a new process.
Another approach was called ???first fit,??? and, as it sounds, first fit accepted the first hole that was large
enough, regardless of whether there might be another hole that fit even better. The thought in favor of first fit
was that it would execute more quickly.
Believe it or not, another contending algorithm was ???worst-fit.??? The argument for worst fit was that it would
leave the largest remaining hole, and hence might reduce the problem of external fragmentation. As a matter of
fact, the research showed worst fit lived up to its name, and was worse than best fit and first fit.
TIMESHARING AND SWAPPING
Timesharing systems exposed the need to move a partially complete process out of main memory when the
process was forced to wait for the impossibly slow (in computer time) user at a terminal. Even an actively typing
user might cause the process to wait for the equivalent of 1000 instructions between typed characters.
The solution was called ???swapping.??? When a process blocked for I/O, it became eligible to be swapped to
the disk.
Pages:
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322