308-homework3

docx

School

Iowa State University *

*We aren’t endorsed by this school

Course

308

Subject

Electrical Engineering

Date

Jan 9, 2024

Type

docx

Pages

3

Uploaded by annahm1377

Report
CprE 308 Homework 3 Department of Electrical and Computer Engineering Iowa State University Problem 1. (5 points) Applications can be roughly classified into two types based on I/O pattern: sequential and random. Which type of applications tend to have better I/O performance on hard disk drives? Why? Well, in sequential I/O, data is read or written in a continuous, sequential manner. This often involves large, contiguous blocks of data. And in random I/O, data is accessed in a non- sequential manner, and the storage locations are not necessarily contiguous. This can involve smaller, scattered chunks of data. Applications with sequential I/O patterns tend to have better performance on HDDs. The mechanical nature of HDDs makes them more suitable for reading or writing data in a continuous, sequential manner. On the applications with a high degree of random I/O may experience performance bottlenecks on HDDs due to the seek time required to access non-contiguous data.
Problem 2. (5 points) The figure above shows the basic workflow of paging with TLB. Assume the TLB hit ratio is R , which means the percentage of times that a page reference is found in the TLB. Also, assume the latency of memory access is L . Calculate the Effective Access Time (EAT) using R and L . With 2 memory access on TLB miss and 1 memory access on TLB Hit. EAT(effective access time)= P x hit memory time + (1-P) x miss memory time . So in this case we have EAT = 2L * (1-R) + L*R Problem 3. (10 points) We can evaluate a page-replacement algorithm by running it on a particular string of memory references (reference string) and computing the number of page faults on that string. Each number in the reference string represents a page number. Assume there is a reference string as follows: 8,0,1,2,0,3,0,4,2,3,0,3,0,3,2,1,2,0,1,8 Assume the system only has three physical memory frames, and the content of the frames corresponding to the reference string above is as follows:
8 0 1 2 0 3 0 4 2 3 0 3 0 3 2 1 2 0 1 8 8 8 8 2 2 2 2 4 4 4 0 0 0 0 0 0 0 0 0 8 0 0 0 0 3 3 3 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 0 0 0 3 3 3 3 3 3 3 2 2 2 2 (1) Based on the memory content above, how many page faults are there for the given reference string? 13 Page Faults (2) Which page-replacement algorithm is used in the system? FIFO (3) Assume we extend the physical memory by adding one more frame, i.e., there are four frames in the main memory in total now. Assume the system uses Least Recently Used (LRU) pagereplacement algorithm. Fill in the following table to show the content of the memory frames for the given reference string. 8 0 1 2 0 3 0 4 2 3 0 3 0 3 2 1 2 0 1 8 8 8 8 8 8 3 3 3 3 3 3 3 3 3 3 3 3 3 3 8 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 4 4 4 4 4 4 4 4 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help