Evaluate different memory allocation techniques

Assignment Help Operating System
Reference no: EM13807548

The objective of this week's lab is to simulate and evaluate different memory allocation/deallocation techniques (first fitnext fitbest 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, a request 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. int allocate_mem(int process_id, int num_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. int deallocate_mem(int process_id): deallocates the memory allocated to the process whose ID is process_id. It returns 1, if successful, otherwise "1.
  3. int fragment_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 fragmentsaverage 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.

 

  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: EM13807548

Questions Cloud

Business model successful in the japanese luxury market : What has made Louis Vuitton's business model successful in the Japanese luxury market? What are the opportunities and challenges for Louis Vuitton in Japan?
Strategic surveillance must be kept : Strategic surveillance must be kept
A new criminal trial : From the e-Activity, summarize at least two (2) arguments presented for and against granting Sandusky's motion for a new criminal trial. Identify the most likely factors that you believe would support the judge's decision to grant a new trial. Provid..
Statistical technique, hypothesis testing problems : Discuss the limitations and assumptions of your analysis. Is there any additional information that you would like to have before publishing your findings?
Evaluate different memory allocation techniques : 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
Words of the strategic plan for organization : Write a draft of no more than 1,800 words of the strategic plan for your organization (Xerox, Inc.), including the following:
Electrical switching equipment company : How many breakers would the electrical switching equipment company need per year to make the in-house option the least costly?
Land diving in vanatu, pentecost island diving : Land diving in vanatu, pentecost island diving on Pentecost island in Vanuatu, they could use a vairety of methods.Based on what you have learned.How do you think this activity should be studied? why?
Technological advancements and challenges : Technology can be both good and bad depending on how individuals use it. From the e-Activity, examine the key ways in which the company that you selected benefits from the influences of changing technological forces.

Reviews

Write a Review

Operating System Questions & Answers

  Cache access time of 20ns

Given a cache access time of 20ns, a main memory access time of 1000ns, and a cache hit ratio of 90 percent. Assuming fetches to main memory are started in parallel with look-ups in cache

  Solving passwords problems

As we all know about problems with people and passwords and how technology can mitigate some of them. What types of problems do you assume implementing these technologies for people might cause?

  Deadlock prevention.

Describe what changes could be made to an operating to break the conditions of non-preemption and hold and wait for deadlock prevention. What are the drawbacks of your changes?

  4-way set associative cache unit with a 6-bit offset

Given a 4-way set associative cache unit with a 6-bit offset and a 12-bit index for a 32-bit address space with a LRU write-back policy, determine the nominal and actual size of the cache unit.

  Operating system interfaces questions

Select one of the programs that comes with Vista in which you think your classmates would be interested. Determine what does the program do?

  Indefinite blocking what is semaphore what is the meaning

what is semaphore? what is the meaning of it and how to explain it?meaning of semaphore...... where this type of word

  Difference between a formal and an informal system

Explain the main reasons that firms implement intranets and one major obstacle to obtaining these benefits also explain the difference between a formal and an informal system.

  Concept and process of data binding

Describe the idea and process of Data Binding. Include an example of statements that would be used to create a Binding object. Describe components and effects of your model statement.

  Determine the format of main memory address

Given that a system has two way set associative cache of size eight KBytes, with sixteen bytes cache lines, and a byte-addressable main memory of size 64 MBytes.

  Web security threats

Think about the given threats to Web security and explain how each is countered by a particular feature of SSL.

  How many page faults would occur under pure demand paging

How many page faults would occur under pure demand paging (all frames are initially empty), assuming four frames are available, under FIFO, LRU.

  Supporting a transmission system

A transmission system operates at sixteen MHz. The power output is 1 W and .1 Watt is needed at the receiver. The receiver is located one hundred meters from the transmitter.

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