What is a buddy system?, Operating System

Assignment Help:

What is a buddy system?

We are dividing the memory as powers of two therefore the division will be 2, 4, 8, 16, 32, 64, 128, 256...i.e. in powers of 2 as well as we are selecting the space which is smallest but large enough to hold a process. Assume we have 1M memory. If a process 70k enters we are able to choose the 128k which will be the best fit for the process. Thus divide the 1M into 512k each. After that a further division of 256k each in one 512k afterward one of the 256 is divided into further 128keach and place the process in that. Similarly to that if another process enters the division and placing will continue.

Process A enters of 0k

 

A

 

 

 

 

 

 

 

          128     128         256                                 512

Process B enters of 35k

A

B

 

 

 

 

.

 

128    64  64     256                           512                                                                         

Process c enters of 80k

A

 

B

 

 

 

C

 

 

 

 

 

           128     64   64  128    128                          512

Process A terminates

 

128

B

 

 

 

C

 

 

 

 

 

         64   64  128    128                         512

Process D enters of 60k

 

128

B

 

D

 

C

 

 

 

 

 

                      64  64    128   128          512

Process B terminates

128     

 

64

 

D

 

C

 

 

 

 

 

                              64   128   128                          512

Process D terminates

128

64

64

C

 

 

                                         128   128                     512

Process C terminates

128

64

64

128

128

                   512

 

Subsequent to this all the free spaces will join together. Later than the two adjacent processes having same space completed they will combine together and at last when all the processes are over the 1M memory will get back.


Related Discussions:- What is a buddy system?

Read-write locks, Consider a large web-based database. In some sense, Googl...

Consider a large web-based database. In some sense, Google is sort of like this. There might be many users who want to read from the database, but only a few users who are allowed

Interprocess communication, Now we consider the following questions: how ca...

Now we consider the following questions: how can the parent process communicate with its child? Or how can children processes communicate with other children? The exact answer depe

Explain process scheduling, Explain Process scheduling Process scheduli...

Explain Process scheduling Process scheduling consists of the subsequent sub-functions: 1.      Scheduling : Selects the process to be implement next on the CPU 2.      D

Define process? what is meant by state of a process?, Define process? What ...

Define process? What is meant by state of a process? Process is a program in implementation. A process in general includes the process stack, which consists temporary data and

Homework, Write an application that does the following:(1) fill an array wi...

Write an application that does the following:(1) fill an array with 50 random integers; (2) loop through the array, displaying each value, and count the number of negative values;

Explain the concept of process, Q. Explain the Concept of Process? A pr...

Q. Explain the Concept of Process? A process is sequential program in execution. A process states the basic unit of computation for the computer. Components of process are:

Changing the runlevel of system from 5 to 3 on startup, Front page We n...

Front page We need to continue or customization and documentation of our system. Currently our system boots into runlevel 5 and we need it to boot into runlevel 3. For future r

Determine the fork and execlp functions - linux, Assignment What I...

Assignment What I'm covering: General control flow fork() execlp() Parameters Makefiles Additional Questions General Control Flow/fork(

What is a real-time system?, What is a Real-time system? A Real-time sy...

What is a Real-time system? A Real-time system is used when inflexible time requirements have placed on the operation of processor or the flow of data so it is often used as a

Explain the procedure for handling the page fault, The procedure for handli...

The procedure for handling the page fault is as follows 1. We check the internal table to verify whether the reference was valid or invalid. 2. If the reference was invalid,

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd