For any questions and inquiries
support@essaychambers.com
Live Chat
Login

  • Home
  • About
  • Our Servcies
    • Admission services
    • Academic paper writing
    • Resume/CV services
    • Dissertation services
    • Rewriting
    • Editing
    • Proofreading
    • Multiple choice questions
  • Samples
  • How it Works
  • Price
  • Past Custom Essays
ORDER NOW

Swapping and paging

 

Write a series of small simulation programs in Java, C, or C++. Generate simulated processes; you should not need to make any process management system calls.

Swapping

Assume main memory has 100 MB for swapping with variable-sized partitions. Processes have randomly and evenly distributed sizes of 5, 11, 17, and 31 MB. Processes have randomly and evenly distributed durations of 1, 2, 3, 4, or 5 seconds. Write programs that simulate the first fit, next fit, and best fit memory allocation algorithms. Run each algorithm 5 times simulating 1 minute each time to get an average of the number of processes successfully swapped into memory (but not necessarily completed) during the minute. Generate around 150 new random processes before each run, and allocate them into memory in the order that you generated them according to the algorithm. Once they’re in memory, the processes run independently and simultaneously for their duration. For each algorithm, print the average number of processes that were successfully swapped in. Each time a process is swapped in or completes (and therefore is removed from memory), print a memory map, e.g., AAAAA….bbbbbbbbbbb..33333 where the characters are the process names (one character per MB) and the dots are holes (one per MB). You can reuse process names that aren’t currently in the map. Indicate which process entered or left. For an entering process, also print its size and duration. For each algorithm, print the average number of processes (over the 5 runs) that were successfully swapped in.

Paging

You are running a process that consists of 10 pages numbered 0 through 9. Physical memory has 4 page frames. There are always 10 page frames available on disk. When the process starts, none of its pages are in memory. The process makes random references to its pages. Due to locality of reference, after referencing a page i, there is a 70% probability that the next reference will be to page i, i-1, or i+1. i wraps around from 9 to 0. In other words, there is a 70% probability that for a given i, ?i will be -1, 0, or +1. Otherwise, |?i| > 1. Suggested procedure:

• To compute the next i, first generate a random number r from 0 through 9.

• If 0 ? r < 7, then generate a random ?i to be -1, 0, or +1.

• For 7 ? r ? 9, randomly generate 2 ? ?i ? 8.

Simulate the page replacement algorithms FIFO, LRU, LFU, MFU, and random pick. Run each algorithm 5 times, 100 page references each time, to compute an average hit ratio of pages already in memory. For each reference, print the page numbers of the pages in memory and (if any) which page needed to be paged in and which page was evicted.

Pages
275 Words

Price (USD)
$12.99
ORDER NOW
1

FREE FEATURES

  • FREE Outline $15
  • FREE Unlimited Amendments $15
  • FREE Title page $15
  • FREE Bibliography $14
  • FREE Formatting $13
  • FREE Plagiarism Report $13
  • TOTAL SAVINGS $85
  • Place an Order

FORMAT

  • 275/page (double spaced)
  • 550/ page (single spaced)
  • 1 inch margin
  • 12pt. Times New Roman

Testimonials

Peter, Australia

I ordered my literature review and methodology chapters on the EssayChambers.com as I had no time to complete… Read more “Peter, Australia”

Peter, Australia
Dissertation, Psychology, 10 pages, 3 days, Master’s

Johnson, the UK

I was going through a tough time in my family after I lost a close relative. I could… Read more “Johnson, the UK”

Johnson, the UK
Term Paper, Sociology, 15 pages, Sophomore

Stevens, Australia

My order was on nursing, and I hardly thought it was possible to submit to my supervisor on… Read more “Stevens, Australia”

Stevens, Australia
Book Review, Nursing, 3 days, Senior

Cynthia, Virginia, USA

Superb service!  I was linked with the writer for my order in 5 minutes! And believe me, the… Read more “Cynthia, Virginia, USA”

Cynthia, Virginia, USA
Essay, Criminal Justice, 9 pages, 2 days, Junior

Peterson, Nevada, USA

Previously, I had used other websites when writing my paper. However, no website met my expectations. EssayChambers.com is… Read more “Peterson, Nevada, USA”

Peterson, Nevada, USA
Dissertation, HR Management, 40 pages, 20 days, Master’s

Alexandra, New Zeeland

I will forever remember an experience! There was a class I was about to fail thus almost lowered… Read more “Alexandra, New Zeeland”

Alexandra, New Zeeland
Essay, Political Science, 10 pages Junior

Muhammud, Qatar

I was advised by a friend to use your services. You people never disappointed me. The paper was… Read more “Muhammud, Qatar”

Muhammud, Qatar
Assignment, Education, 16 pages, 6 days, Master’s

Paula, Puerto Rico

I am working and studying at the same time and it is quite challenging to meet the demands… Read more “Paula, Puerto Rico”

Paula, Puerto Rico
Research paper, Biology, 20 pages, 2 days, Senior

Stella, Wales

I was on my maternity leave but I could not complete all my coursework. After I decided to… Read more “Stella, Wales”

Stella, Wales
Coursework, History, 11 pages, 24 hours, Freshman

Cindy, USA

I only use my preferred writer. The essays I have received are outstanding because I always score A+.… Read more “Cindy, USA”

Cindy, USA
Book Report, Business, 6 pages, 4 days

Payment Options

Join our community

© 2023 EssayChambers.com | All Rights Reserved.