Lab 11 Assignment F23
.pdf
keyboard_arrow_up
School
University of Michigan *
*We aren’t endorsed by this school
Course
370
Subject
Computer Science
Date
Dec 6, 2023
Type
Pages
5
Uploaded by PresidentScienceKomodoDragon18
Introduction to Computer Organization – Fall 2023
Lab 11
Due: @11:55 PM,
Wednesday November 29th
The following assignment is intended to be completed during your assigned lab period. One
member of your group must submit the assignment to Gradescope by the posted deadline and
indicate your group members when submitting the assignment.
Each group member must be
present during the scheduled lab period in order to receive credit.
Group names and uniqnames
Pod Member Name
Uniqname
Alexandra Lavacek
alavacek
Landon Butcher
landonbu
Albon Wu
albonwu
Hongjue Cheng
hongjuec
For each of the following problems, one person should act as the "scribe" and log the
discussions of the group. You should rotate who is the scribe for each problem and indicate in
the given space.
Problem 1: Structs in Caches
[20 points]
Scribe:
[Scribe's name here]
Consider a byte-addressable architecture with the following data cache:
Cache size: 64 bytes
Block size: 16 bytes
struct example{
char a; //1 byte
float b; //4 bytes
short c; //2 bytes
unsigned int d; //4 bytes
char e; //1 byte
int f; //4 bytes
}; //24 bytes
1.
How many example structs fit into our
cache (assume the default data types
sizes we usually use)?
2
struct example{
float b; //4 bytes
unsigned int d; //4 bytes
int f; //4 bytes
short c; //2 bytes
char a; //1 byte
char e; //1 byte
} // 16 bytes
2.
Realign the struct to have minimum
padding and size:
3.
If we realign the struct to the optimal size, how many can fit now?
4
Problem 2: Investigating CAEN
[20 points]
Scribe:
[Scribe's name here]
Let's see if we can reverse-engineer the size of caches used on CAEN computers. What we'll
do is have a piece of code that iterates through arrays of these structs to do a fixed amount of
work. If we increase the amount of data in the array, but do the same amount of work, we should
observe that the overall execution time does not change significantly, as long as the data can be
kept in the level of cache closest to the processor (the so-called "L1 cache").
Once we increase the size of the array beyond what can fit in the cache, we should see a
performance degradation. By figuring out what size this occurs at, we can make a first-order
approximation of the cache size.
Note: this will be a very rough estimate.
Many other
processor features are designed to hide the latencies of cache misses and make it harder to
see when this transition occurs. Also, since processors include multiple levels of caches, each
one slightly larger and slower than the previous, this performance degradation will be more
gradual than if we were going to main memory all the time.
For this problem,
SSH
into "login-course.engin.umich.edu" and transfer over the provided
lab11.c file.
1.
First, we need to ensure what the sizes of our data types are, since they can vary from
system to system. How can we easily do this in a C program? Do any of the data types
differ from our assumptions?
We could use the C sizeof function with the different data types as arguments, and print the
results.
2.
Compile the provided program (make sure to
NOT
specify any optimizations) and run it
with several array sizes (passed in as arg1 in the program) that you think will help
identify the size of the L1 cache. Target to narrow it down to a factor of 100. Note that
running a program using the "time" utility on Linux will report how long the execution took
(e.g. "time ./lab10 [argument]". Using either the real time or user time should be fine for
this.
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
Related Questions
An employee has only one job code, but a job code can be held by many employees. ERD
arrow_forward
Project Description
A telephone book system, also known as a telephone directory, telephone address book, or Phone book, is a listing of telephone subscribers in a geographical area or subscribers to services provided by the organization that publishes the directory. Its purpose is to allow the telephone number of a subscriber identified by name and address to be found.
Project Features
The features of telephone book system are mainly related to adding, listing, searching, sorting, modifying and deleting telephone directory-related records. All these operations are done through Linked-List.
The information contained in the telephone directory records are the first name, last name, phone number, city, address, sex and email of the person whose record is entered in the telephone directory system.
Project Operations
Write a JAVA program that will maintain a phone directory using a Linked-List. The program should be able to perform the following operations:
Add persons details (first…
arrow_forward
System Description:
Branches Dream Home has branch offices in cities throughout the United Kingdom. Each branch office is allocated members of staff, including a Manager, who manages the operations of the office. The data describing a branch office includes a unique branch number, address (street, city, and postcode), telephone numbers (up to a maximum of three), and the name of the member of staff who currently manages the office. Additional data is held on each Manager, which includes the date that the Manager assumed his or her position at the current branch office, and a monthly bonus payment based upon his or her performance in the property for rent market. Staff Members of staff with the role of Supervisor are responsible for the day-to-day activities of an allocated group of staff called Assistants (up to a maximum of 10, at any one time). Not all members of staff are assigned to a Supervisor. The data stored regarding each member of staff includes staff number, name, address,…
arrow_forward
System Description:
Branches Dream Home has branch offices in cities throughout the United Kingdom. Each branch office is allocated members of staff, including a Manager, who manages the operations of the office. The data describing a branch office includes a unique branch number, address (street, city, and postcode), telephone numbers (up to a maximum of three), and the name of the member of staff who currently manages the office. Additional data is held on each Manager, which includes the date that the Manager assumed his or her position at the current branch office, and a monthly bonus payment based upon his or her performance in the property for rent market. Staff Members of staff with the role of Supervisor are responsible for the day-to-day activities of an allocated group of staff called Assistants (up to a maximum of 10, at any one time). Not all members of staff are assigned to a Supervisor. The data stored regarding each member of staff includes staff number, name, address,…
arrow_forward
System Description:
Branches Dream Home has branch offices in cities throughout the United Kingdom. Each branch office is allocated members of staff, including a Manager, who manages the operations of the office. The data describing a branch office includes a unique branch number, address (street, city, and postcode), telephone numbers (up to a maximum of three), and the name of the member of staff who currently manages the office. Additional data is held on each Manager, which includes the date that the Manager assumed his or her position at the current branch office, and a monthly bonus payment based upon his or her performance in the property for rent market. Staff Members of staff with the role of Supervisor are responsible for the day-to-day activities of an allocated group of staff called Assistants (up to a maximum of 10, at any one time). Not all members of staff are assigned to a Supervisor. The data stored regarding each member of staff includes staff number, name, address,…
arrow_forward
List 10-15 application that you have encountered or know.
arrow_forward
SEE MORE QUESTIONS
Recommended textbooks for you
Np Ms Office 365/Excel 2016 I Ntermed
Computer Science
ISBN:9781337508841
Author:Carey
Publisher:Cengage
COMPREHENSIVE MICROSOFT OFFICE 365 EXCE
Computer Science
ISBN:9780357392676
Author:FREUND, Steven
Publisher:CENGAGE L
Programming Logic & Design Comprehensive
Computer Science
ISBN:9781337669405
Author:FARRELL
Publisher:Cengage
A Guide to SQL
Computer Science
ISBN:9781111527273
Author:Philip J. Pratt
Publisher:Course Technology Ptr
Related Questions
- An employee has only one job code, but a job code can be held by many employees. ERDarrow_forwardProject Description A telephone book system, also known as a telephone directory, telephone address book, or Phone book, is a listing of telephone subscribers in a geographical area or subscribers to services provided by the organization that publishes the directory. Its purpose is to allow the telephone number of a subscriber identified by name and address to be found. Project Features The features of telephone book system are mainly related to adding, listing, searching, sorting, modifying and deleting telephone directory-related records. All these operations are done through Linked-List. The information contained in the telephone directory records are the first name, last name, phone number, city, address, sex and email of the person whose record is entered in the telephone directory system. Project Operations Write a JAVA program that will maintain a phone directory using a Linked-List. The program should be able to perform the following operations: Add persons details (first…arrow_forwardSystem Description: Branches Dream Home has branch offices in cities throughout the United Kingdom. Each branch office is allocated members of staff, including a Manager, who manages the operations of the office. The data describing a branch office includes a unique branch number, address (street, city, and postcode), telephone numbers (up to a maximum of three), and the name of the member of staff who currently manages the office. Additional data is held on each Manager, which includes the date that the Manager assumed his or her position at the current branch office, and a monthly bonus payment based upon his or her performance in the property for rent market. Staff Members of staff with the role of Supervisor are responsible for the day-to-day activities of an allocated group of staff called Assistants (up to a maximum of 10, at any one time). Not all members of staff are assigned to a Supervisor. The data stored regarding each member of staff includes staff number, name, address,…arrow_forward
- System Description: Branches Dream Home has branch offices in cities throughout the United Kingdom. Each branch office is allocated members of staff, including a Manager, who manages the operations of the office. The data describing a branch office includes a unique branch number, address (street, city, and postcode), telephone numbers (up to a maximum of three), and the name of the member of staff who currently manages the office. Additional data is held on each Manager, which includes the date that the Manager assumed his or her position at the current branch office, and a monthly bonus payment based upon his or her performance in the property for rent market. Staff Members of staff with the role of Supervisor are responsible for the day-to-day activities of an allocated group of staff called Assistants (up to a maximum of 10, at any one time). Not all members of staff are assigned to a Supervisor. The data stored regarding each member of staff includes staff number, name, address,…arrow_forwardSystem Description: Branches Dream Home has branch offices in cities throughout the United Kingdom. Each branch office is allocated members of staff, including a Manager, who manages the operations of the office. The data describing a branch office includes a unique branch number, address (street, city, and postcode), telephone numbers (up to a maximum of three), and the name of the member of staff who currently manages the office. Additional data is held on each Manager, which includes the date that the Manager assumed his or her position at the current branch office, and a monthly bonus payment based upon his or her performance in the property for rent market. Staff Members of staff with the role of Supervisor are responsible for the day-to-day activities of an allocated group of staff called Assistants (up to a maximum of 10, at any one time). Not all members of staff are assigned to a Supervisor. The data stored regarding each member of staff includes staff number, name, address,…arrow_forwardList 10-15 application that you have encountered or know.arrow_forward
arrow_back_ios
arrow_forward_ios
Recommended textbooks for you
- Np Ms Office 365/Excel 2016 I NtermedComputer ScienceISBN:9781337508841Author:CareyPublisher:CengageCOMPREHENSIVE MICROSOFT OFFICE 365 EXCEComputer ScienceISBN:9780357392676Author:FREUND, StevenPublisher:CENGAGE L
- Programming Logic & Design ComprehensiveComputer ScienceISBN:9781337669405Author:FARRELLPublisher:CengageA Guide to SQLComputer ScienceISBN:9781111527273Author:Philip J. PrattPublisher:Course Technology Ptr
Np Ms Office 365/Excel 2016 I Ntermed
Computer Science
ISBN:9781337508841
Author:Carey
Publisher:Cengage
COMPREHENSIVE MICROSOFT OFFICE 365 EXCE
Computer Science
ISBN:9780357392676
Author:FREUND, Steven
Publisher:CENGAGE L
Programming Logic & Design Comprehensive
Computer Science
ISBN:9781337669405
Author:FARRELL
Publisher:Cengage
A Guide to SQL
Computer Science
ISBN:9781111527273
Author:Philip J. Pratt
Publisher:Course Technology Ptr