Summary of issues for the seventh week
After reading 52, 53 class all students of the seventh Week Study summary (most of the students did not ask questions), summarized as follows:
5201
Question 1: Why do I index with intermediate bits?
Answer: See 415-page Exercise 6.12 and 416-page side-note. High, at any time, the cache stores only one block-sized array of content.
Question 2: Several concepts are easily confused in this section, and errors are generated when you do a problem. The distinction is as follows:
5204
Move files under 1.linux.
Copy file CP [file_name] [destination]
Clip file mv [file name] [destination]
Copy the file to the 20145204csapp/src file, as shown in
5211
Installed VirtualBox, miss the previous Kali, so will her VDI multiple load, wait until the password to lose the account, suddenly found all forgotten. Then restart the Kali, and when the Grub boot menu appears, press the DOWN ARROW key to select "Recovery Mode" and press the E key to enter edit mode.
After entering edit mode, change RO to RW and add Init=/bin/bash later
After the modification is complete, press F10 or the Ctrl+x key to continue to start. Command-line interface appears after startup is complete
After using Ubuntu, you can know that root is my previous account, know that the account is good to run at this time input passwd root, enter the new password can be set directly after entering the new password, and re-enter the confirmation, the system prompts the password update success! You can log in directly with your new password by shutting down the computer and restarting it. KO.
5216
Problem:
What is the difference between cache rows, groups, and blocks?
Workaround:
The following conclusions are drawn by summing up the knowledge points:
- A block is a fixed-size packet that is passed back and forth between the cache and main memory (or the next layer of cache)
- Rows are containers in the cache that store blocks and other information, such as valid bits and marker bits
- A group is a collection of one or more rows. A group in a direct map cache consists of only one row, and groups in the group and fully-linked caches are composed of multiple rows
- In the direct mapping cache, groups and rows are really equivalent, however, in a cascade cache, groups and rows are not the same, and these two words cannot be used interchangeably
- Because a row always stores a block, the term "rows" and "blocks" are always used interchangeably
5308
P403 example why the change of the order of I,J will be the spatial localization of different programs.
A: Because after the exchange order, it scans the array in the order of the columns, rather than in the order of the rows. c arrays are stored in memory in order of row.
5324
1. What's wrong with using compile.sh?
A: In the course of the operation I feel that the use of compile.sh is easy to compile, write a few code, you can write a script and then compile, but run the program is not very good to find the results, if there is a problem, the change is also very troublesome
2, when running the textbook p402 code when the situation occurs
The textbook gives the code to add the main function or not to run, said the argument too few
Look at the code you wrote, found that there is no write parameter in the main function, the modification can be compiled by
In addition, many people have problems when installing tree, can refer to my blog, which is written in detail.
20145326 Cai Yi Guan Blog link
Lou Teacher in the seventh week of blog comments have been stressed that the combination of code to reflect the local!
Take the book p403 code as an example to test!!!
After GCC generates the executable file, the result is as follows
Because the function of the book is not complicated, so the running time gap is not big, but the SUM2 function is using the step N mode to scan the memory, the space limitation is poor, and obviously see the sum2 running time is longer.
Summary of issues for the seventh week