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?

Define middleware to ease the low-level protocol burden, Define Middleware ...

Define Middleware to Ease the Low-Level Protocol Burden Fortunately, many products are available today to ease the low-level protocol burden on the application programmer. Midd

Explain first fit algorithm, FIRST FIT ALGORITHM Scanning a list along...

FIRST FIT ALGORITHM Scanning a list along with if a free hole is available with necessary space for the process to allocate it allocates the process in that space. The first s

Define server processing with queues, Define Server Processing with Queues ...

Define Server Processing with Queues The efficient server processing of client request is essential for optimized client- server applications. This process is greatly enhanced

Deadlock, what are the overall concepts of deadlock

what are the overall concepts of deadlock

Describe the file system architecture-device driver, Device Drivers ...

Device Drivers Communicates straight with peripheral devices (disks, tapes, etc.). Responsible for begin physical I/O operations on the device. Pro

Conversion of binary to hex, Take the binary number and divide it into grou...

Take the binary number and divide it into groups of 4 bits starting from the right hand side , if no group of 4 exists fill out leading 0's, then convert each group of 4 to a hex n

Explain advantages and inconveniences of ult, ADVANTAGES AND INCONVENIENCES...

ADVANTAGES AND INCONVENIENCES OF ULT Advantages: Thread switching doesn't involve the kernel - no mode switching Scheduling is able to be application specific -

Embedded systems design or hardware design, You have been requested by your...

You have been requested by your Senior Engineer to design an Engine Control Unit (ECU) and prepare a report detailing your proposed solution. The client requires a design for a mic

Explain the os/2 operating system, Explain the OS/2 Operating System Li...

Explain the OS/2 Operating System Like NetWare, OS/2 manage resources at three levels, as shown in Figure 4.5 Resources may be maintained at the session, process, and thread le

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