Implement a separate memory component

Assignment Help Operating System
Reference no: EM13917812

Main Memory Allocation

The objective of this week's lab is to simulate and evaluate different memory allocation/deallocation techniques (first fit, next fit, best fit, and worst fit)when a linked list is used to keep track of memory usage. You will implement a separate Memory component for TWO of the four memory allocation/deallocation techniques. This lab is designed to be completed in two weeks. One allocation/deallocation technique is due on Week 4, and the second technique is due on Week 5.

Assume that the memory is 256 KB and is divided into units of 2 KB each. A process may request between 3 and 10 units of memory. Your simulation consists of three components: a Memory component that implements a specific allocation/deallocation technique, arequest generation component that generates allocation/deallocation requests, and a statistics reporting component that prints out the relevant statistics. The Memory component exports the following functions:

1. intallocate_mem(intprocess_id, intnum_units): allocates num_units units of memory to a process whose id is process_id. If successful, it returns the number of nodes traversed in the linked list. Otherwise, it returns -1.

2. intdeallocate_mem(intprocess_id): deallocates the memory allocated to the process whose ID is process_id. It returns 1, if successful, otherwise "1.

3. intfragment_count( ): returns the number of holes (fragments of sizes 1 or 2 units).

The request generation component generates allocation and deallocation requests. For allocation requests, the component specifies the process ID of the process for which memory is requested as well as the number of memory units being requested. For this simulation, assume that memory is requested for each process only once. For deallocation requests, the component specifies the process ID of the process whose memory has to be deallocated. For this simulation, assume that the entire memory allocated to a process is deallocated on a deallocation request. You may generate these requests based on some specific criteria, e.g., at random or from a memory allocation/deallocation trace obtained from some source.

There are three performance parameters that your simulation should calculate for the chosen two techniques: average number of external fragments, average allocation time in terms of the average number of nodes traversed in allocation, and the percentage of times an allocation request is denied.

Generate 10,000 requests using the request generation component, and for each request, invoke the appropriate function of the Memory component for each of the memory allocation/deallocation techniques. After every request, update the three performance parameters for each of the techniques. The statistics reporting component prints the value of the three parameters for the two techniques at the end.

You will submit four separate files to the dropbox for Week 4:
1. C or C++ program (source code)
2. Executable file (object)
3. Instructions to execute the program
4. Analysis of the results for the chosen allocation/deallocation technique

Reference no: EM13917812

Questions Cloud

Elements of a contract-providing examples to help : Identify, define, and discuss the 6 elements of a contract, providing examples to help further the understanding of each element.
Most of the stock valuation models discussed in the textbook : Most of the stock valuation models discussed in the textbook (with the exception of the P/E multiple model) employ a discount rate to find the present value of a particular variable. Are the value estimates derived from the models positively or negat..
The data dictionary back to top : document titled MySQLOmnymbusSupport.docx located in the Doc-Sharing folder titled Omnymbus Tutorial Files for instructions on how to get help for any issues that you are having with the MySQL/Omnymbus Environment.
Use for debt when calculating the cost of capital : DeVille Industrial Machines issued 143,000 zero coupon bonds four years ago. The bonds originally had 30 years to maturity with a 7.3 percent yield to maturity. Interest rates have recently increased, and the bonds now have an 8.4 percent yield to ma..
Implement a separate memory component : Generate 10,000 requests using the request generation component, and for each request, invoke the appropriate function of the Memory component for each of the memory allocation/deallocation techniques.
Knowledge of accounting and financial : You have been selected as the consultant to develop a business plan for Durango Manufacturing Company, which is a start-up, medium-sized public manufacturing company. The CEO has a background in manufacturing and is well versed in supply chain man..
About the yield curve : Find the 3-year implied forward rate one year and two years from now (the expected 3-year spot rate starting one year from now and two years from now). State the final answers as an annual rate.
Stakeholders and project team members : As the project manager for the District 4 Warehouse Move project, you will need to determine who your stakeholders and project team members are for this project. Remember that anyone connected to the project who has an interest or stake in the pro..
Liquidity issues with investment portfolio : Freeman Bank is concerned about liquidity issues with its investment portfolio. As an investment manager for Freeman, prepare a 750-word report for senior management that explains liquidity.

Reviews

Write a Review

Operating System Questions & Answers

  File compression

Research the Internet or create your own files which meet the following criteria: a) gzip compresses by more than 80 percent b) gzip compresses by less than 10 percent

  Describe different ways to program producer-consumer problem

Describe two different ways to program producer-consumer problems using shared buffers and semaphores in Windows 7. Think about how to implement the shared buff- er in each case.

  How does linux make file sharing safe and reliable

Analyze the use of file sharing on a local network and how sharing files increases the ease of administration through centralized file storage and file replication across servers. How does Linux make file sharing safe and reliable

  Describe the differences between symmetric and asymmetric

Describe the differences between symmetric and asymmetric multiprocessing. What are three advantages and one disadvantage of multiprocessor systems?

  Power management settings in bios

Every day at 2PM a client's computer at work reboots itself. You have made sure the power management settings in the BIOS and in the Windows Control Panel are not responsible.

  Determine values of it industry certifications

Discuss briefly how IT certification works. What business arenas are IT certifications needed, security, or what technical problem is IT certification designed to solve?

  Explain trade-off between memory use and cpu overhead

Remembering that there's a trade-off between memory use. Then give an example where doing so will cause throughput to suffer.

  What are the four types of business ownership describe each

what are the four types of business ownership? describe each of them. your response should be at least 200 words in

  What are the minimum services

One approach to operating system design is to provide as small a kernel as possible and to make all other modules optional. What are the minimum services that must be provided in such a miniature kernel

  Find the common characteristics of the dss system

Assume you are a chief information officer who is hired through a company that generates electricity with three coal burning electric power plants located in various parts of the nation.

  Explain page trace analysis using fifo

Increase size of memory so it contains four page frames for public use. Using same page request as above and FIFO, do another page trace analysis and calculate the failure and success ratio.

  Provide security suggestions for laptop users

Andersen & Sons is a huge marketing company with four offices in the Chicago area. Each office has Windows Server 2003, and all servers are in a single domain.

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