2007-12-31

MIT Lecture summary 2

I have to decrease by about 200 words to 350 words...orz
This sentence below is too fat.

Calculus summary
The overview of this lecture is that to form a graph in geometric from ODE in analytic. By doing this, this lecture is organized into five sections. The first section is talking about First-order ODE’s, ODE is ordinary differential equation, and at view of ODE’s in geometric. And the second section is thinking at what the graph of Direction field or Integral curve in geometric is. And the third section is how to draw the graph, taking a couple of exercise how computer or human does. And the fourth section is thinking at what the principle of drawing Integral line is by using two examples. And final section is what the example which violates before section’s principle is and what the wrong of the example is and the reason why it is wrong.

About first-order ODE’s and at view of ODE’s in geometric
This section begins with explaining examples of ODE which are y’=x/y, y’=x-y2, y’=y=x2. And this section is also explaining the geometry against the analysis, so for example, y’=f(x, y) in analysis is something called Direction field in geometry, and y1(x) in analysis is something called Integral curve in geometry.

What the graph of direction field or Integral curve in geometric
The Direction field which example is f(x, y) in analysis is a slope in each element. And the Integral curve is a curve which goes to the plain in every point, changing in elements, and everywhere has the direction of field everywhere at all points. So that, for example, “y’(x) =f(x, y(x)” is same as “f(x, y1(x1))”

How to draw the graph
It’s different from computer and human how to draw the graph. Computer takes three steps to draw it. Pick up the point (x, y) equally spaced, and then find f(x, y) at the point, and then draw the slope in each required point. But when human does that, pick slope C, and then plot equation f(x, y) (which is an ordinary curve) = C in general Isocline. And then draw the Integral curve.

What the principle of drawing Integral line by using two examples
When it’s giving you an equation “y’= -x/y”, its isocline is “y= -x/c”. So putting in an Integral curve, it comes a circle that is “x2 + y2 = ”. And it can be also replaced “y = y1(x) = + ”. And it has to add “+” because of indicating a negative solution of the Integral curve.

In the other hand, when it’s giving you an equation “y’=1+x-y”, its isocline is “y = 1+x-c”. So putting in an Integral curve, both the Isocline and the Integral line are overlapping when c=1, y=x.

Through the two examples, they show two principles which are two Integral curves can’t cross and cannot be tangent. So it says that it’s just one exist solution and only one unique solution through (x0, y0). To do that, f(x, y) should be continuous near the (x0, y0).

What the wrong example and why so
If the principle is violated, what the graph indicates. For example, the equation xy’=1-y indicates the graph like a flower. It is overlapped at the point (0, 1) which is no uniqueness and the line y=0 is no existence. It’s because its equation “dy/dx = (1-y)/x” is not continuous when x=0, so it can’t be done.

2007-12-30

MIT Lecture summary

I didn't realize that we can see a MIT Lecture on the Internet for free...

Goal
The goal of English II-FS is to be able to listen to English lectures. In order to find out how much this goal has been reached, you will listen to a real 40-to-50 minute long lecture, a science class from MIT (Massachusetts Institute of Technology). It is not required that you understand the lecture completely, but it is hoped that you will be able to gain some understanding of the content through your note taking.


Procedure
l. Select the lecture that you are most interested in. There are five to choose from:
・Physics (Newton’s Laws)
http://mfile.akamai.com/7870/rm/mitstorage.download.akamai.com/7870/8/8.01/f99/videolectures/wl99lec6-300k.rm

・Chemistry (The Structure of the Atom)
http://mfile.akamai.com/7870/rm/mitstorage.download.akamai.com/7870/5/5.111/f05/videolectures/ocw-5.111-09sep2005-220k.rm

・Mathematics (Linear Algebra)
http://mfile.akamai.com/7870/rm/mitstorage.download.akamai.com/7870/18/18.06/videolectures/strang-1806-lec01-26aug1999-220k.rm

・Mathematics (Calculus)
http://mfile.akamai.com/7870/rm/mitstorage.download.akamai.com/7870/18/18.03/s04/videolectures/mit-ocw-18.03-lec1-05feb2003-220k.rm

・Biology (DNA)
http://mfile.akamai.com/7870/rm/mitstorage.download.akamai.com/7870/7/7.012/f04/video/ocw-7.012-lec-mit-10250-20sep2004-1000-220k.rm

(You can watch the lecture either on-line or download it into your computer. Please see the instructions below.)

2. Watch the lecture and take notes using what you have learned in class.

3. Use the notes to write a summary of the lecture in English. (If you are not sure how to write a summary, please see the example provided on the CELESE website.)


Requirements
You must hand in to your English II-FS teacher by the in-class final test day:
l. The notes you took
2. A 250 to 350 word summary

Scoring Procedure
Notes 5 points
Summary 15 points



under Calculus summary
【words】
ODE = ordinary differential equation
= ODE is solved exactly, whenever possible, and approximately using a variational method.
Differential [Noun] = 微分、差、格差、差動
[adjective] = 微分の、区別を示す、差別的な
Equation = 方程式、平均化、均衡 【略称】→eq.
GEOM = geometry = 幾何学 cf. geometric = 幾何学の
Derivative = 導関数、微分係数
Integral curve = 積分曲線
First-order = 一次の[adjective]
Elementary = 初歩的な、基本の、簡単な、単純な
Numerical = 数に関する、数値の、数の、数で示される
Analytic = 解析の、分析の、分析に使う
Direction field = 方向場
Slope = 傾き
Isocline = アイソクライン、等斜褶曲
Cf.アイソクライン法 = 変化がどちらの方向であるかを矢印で表す方法。
主に定性的な性質に対して用いる。
Principle = 法則、公理
Exist = to be real; to be present in a place or situation
[~ on sth] = to live, especially in a difficult situation or with very little money.
[Noun] = existence
Uniqueness = 一意性<数学>, 独自性, 唯一性
Indicate = to show that sth is true or exists = to mention sth, especially in an indirect way
= to represent information without using word = to give information in writing
Subscript = [adj] 下付の = [Noun] 下付き文字
Variable = 変数、変量、可変
Slant = 傾き、傾斜
Corridor = 重要な交通ルート、廊下、回廊地帯
Tangent = タンジェント、接線、接面、正接
[幾何学] = (線・面が一点で)接した adj.

Course: Differential Equations
Professor Arthur Mattuck
Arrangement of talking about
1. FIRST-OREDER ODE’S
2. geometric, view of ODE’s

3. What is a geometric view of ODE’s?
Analytic Geometric
~~~  ⇔ ~~~

4. What is the direction field?

5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.



Sample:Fraction summary
This lecture begins with explaining the theory of friction and then introduces two methods to measure friction. The third part of the lecture provides several calculated examples and a visual example. Finally examples of reduced friction are given in the end.

Friction is not a simple force. The reason why is if a force is applied to a stationary object, the friction will increase in value in a direction opposite to the applied force, until some threshold is met. This threshold is known as μs, the static friction. That is the amount of friction threshold required to start an object moving. The kinetic friction μk, is the friction force while the object is moving. The static friction is always greater than the kinetic friction.

Measurement of Friction
There are two methods to measure friction. The first is to use a slope. We need to increase the angle of the slope until the object begins moving. At the instant the object begins to move we can measure the angle of the slope and calculate the friction coefficient from Newton’s second law, F = ma.

The equation can be derived as μs = tan α.
μs is the static friction. α is the angle that the object begins moving.

There are two interesting points from this equation. That first is that the mass of the object has no effect on frictional force and the second is that the surface area of contact has no effect on frictional force.

The second method of measurement involves the use of a pulley. Here a weight is added to a string through a pulley to provide a force in the opposite direction to that provided by gravity. Here we can calculate the friction by either increasing the angle, or increasing the weigh attached to the pulley.

Examples and experiments
Two worked examples were provided in the lecture. The first demonstrated acceleration uphill, the second no acceleration. This demonstrated that friction is a complicated and a very reactive force depending on which direction the force is coming from. Next two experiments were carried out to demonstrate the two measurement methods.

This was followed by examples of reduced friction. They were hydroplaning in a car where a little bit of water mixes with dirt and grease on the road. A hydroplane example was also provided by adding lubricant (water) between a lid and a pot. Finally, gas was demonstrated as being a very good lubricant. This was demonstrated by both an air-track and a container of carbon dioxide.

2007-12-29

Words in EnglishⅡfinal test

English II (FS) Final Test
Words and Phrases from the Lecture

Noun

duration
= the length of time that sth lasts or continues.


phenomenon
= a fact or an event in nature or society, especially one that is not fully understood.
= a person or thing that is very successful or impressive.


psychology
= the scientific study of the mind and how it influences behavior
= the kind of mind that sb has that makes them think or behave in a particular way
= how the mind influences behaviour in a particular area of life



Adjective

conceivable
= that you can imagine or believe
SYN: possible
OPP: inconceivable


detailed
= giving many details and a lot of information; paying great attention to details


distorted (distort)
= to change the shape, appearance or sound of sth so that it is strange or not clear
= to twist or change facts, ideas, etc. so that they are no longer correct or true


essential
[-- to/for sth -- to do sth -- that ...] SYN: vital
= completely necessary; extremely important in a particular situation or for a particular activity
[only before noun] SYN: fundamental
= connected with the most important aspect or basic nature of sb/sth


receptive
= willing to listen to or to accept new ideas or suggestions

temporary
= lasting or intended to last only for a short time; not permanent
OPP: permanent


visual
= of or connected with seeing or sight



Verb

calculate
= to use numbers to find out a total number, amount, distance, etc
= to guess sth or form an opinion by using all the information available


classify
[VN] = to arrange sth in groups according to features that they have in common
[- sb/sth as sth] = to decide which type or group sb/sth belongs to


distinguish
[A and/from B] = to recognize the difference between two people or things
[VN] = to be a characteristic that makes two people, animals or things different
[VN] = to be able to see or hear sth
[- yourself] = to do sth so well that people notice and admire you


fade
= to become or to make sth become paler or less bright
[V] = to disappear gradually
= if a sports player, team, actor, etc.
fades, the stop playing or performing as well as they did before


mediate
[- in sth - between A and B]
= to try to end a disagreement between two or more people or groups by talking to them
and trying to find things that everyone can agree on
[VN] = to succeed in finding a solution to a disagreement between people or groups
[VN] = to influence sth and/or make it possible for it to happen


register
[PUT NAME ON LIST]
= to record your/sb's/sth's name on an official list
[GIVE OPNION PUBLICLY]
= to make your opinion known officially
[ON MEASURING INSTRUMENT]
= if a measuring instrument registers an amount or sth registers an amount on a measuring instrument,
the instrument shows or records that amount
[SHOW FEELING]
= to show or express a feeling
[NOTICE STH](often used in negative sentences)
= to notice sth and remember it
[LETTER/PACKAGE]
= to send sth by mail, paying extra money to protect it against loss or damage


visualize
= to form a picture of sb/sth in your mind
SYN: imagine



Other

refer to A as B
= to mention or speak about sb/sth
EX: The victims were not referred to by name.
She always refferred to Ben as that nice man.


sift through
= to examine sth very carefully in order to decide what is important or useful or to find sth important


somewhat[adv]
= to some degree; rather


Definitions
Read each definition below and from the table above choose the word or phrase closest in meaning.

1. related to sight
= visual

2. using a lot of information or facts
= detailed

3. a fact or event in nature, especially one that is not fully understood
= phenomenon

4. happening for a limited time
= temporary

5. a little or slightly
= somewhat

6. able to be believed or imagined
= conceivable

7. to gradually become weaker or disappear
= fade

8. to recognize the difference between two or more similar things
=distinguish

9. to measure or compute using numbers
=caliculate

10. important and necessary
= essential

11. the length of time that something continues
= duration

12. changed from the original or correct meaning
= distorted

13. the study of the mind and how it influences people’s behavior
= psychology

14. to decide what group something belongs to
= classify

15. to use a particular name to mention or describe something
= refer to A as B

16. to enter something in a record or list; to record
= register

17. to form a picture of someone or something in your mind
= visualize

18. to act in an intermediate position or transmit information between two sides
= mediate

19. to examine information or documents carefully in order to decide what is important and what is not
= sift through

20. tending to receive rather than produce things
= receptive

How to study English outside of class etc...







※Be careful when to use an article!
Ex; a, the, some, any, (countable), (uncountable), (no-article)
Exercise -feel a nuance between A and B-;
(1)
A:I need some paper.
B:I found the bill among your papers.

(2)
A:Do you have room for this sofa?
B:My new apartment has 5 rooms.

(3)
A:It's made of glass.
B:We need 3 more glasses.

(4)
A:I love bitter chocolate.
B:I gave her a box of chocolates.

(5)
A:Time is precious.
B:How many times do I have to tell you?

(6)
A:Life was tough back then.
B:He led a tough life.

(7)
A:Conversation is an art.
B:I had an interesting conversation with our new neighbor.

[refer to "English grammar felt in heart -conversation edition-"]


↓this sentence contains some mistakes in point of article.

【Unit 15】
1. Did you study English outside of class last week? If so, what did you study? If not, why not?
Yes, I studied English outside of class even excluding LRT and other homework of English class. It’s because I often listen to English café of ESL podcast. So I study English about English listening skill almost day.

There are many kinds of listening podcast in English on the Internet, but I chose English café. So I’ll talk about why I chose it.

There are two reasons why I chose it.
One reason is that my friend who has a high English skill recommended this podcast to me.
And another reason is that I had looked for the listening section which is non-Japanese in podcast and I can learn new English term. It means I can learn new English term in such a way that speaker speaks some topic and he sometimes explains a new English term in the topic by using English.

English café is just what I need. So I thank my friend who recommended this pod cast to me.

In addition to this way, I’m going to try to study English in another way that I use the radio program called “Training English conversation comprehensively” in NHK. And I heard Iwamura Keinan who is a trainer in this program is very famous in Japan in point of good trainer.

But for using this program, I have to buy a textbook in this program. And this program is only distributed on the radio. I wish this program is not only distributed on the radio, but also distributed on the podcast. By doing this, I will save the trouble of recording the radio and all I have to do becomes only to buy text book.

Well… I can choose other way, so I think I will try to seek the most effective way for me to study English in daily life.


2. Using the Language from Unit 15, tell me how to get from your house to the nearest convenience store.
To get my house to the nearest convenience store is very simple action. You take just two steps.
First step is that to leave at my house and turn right at nearest road, and then go straight along a road to Kita Main Street.

Second step is that after reach Kita Main Street, turn right at there and go straight along the Street. And then when it takes about five minuets to the convenience store on foot, you’ll see it on your right.

About three years ago, you could get to a convenience store by only first step. It’s because in those days there was a convenience store near the point which is cross point between Kita Main Street and the road from my house to Kita Main Street. So you could reach there to take only first step. But the convenience store was driven three years ago. So that you have to take two step, and it have to take more minuets than before.


【Unit 16】
1. Is your grammar better now than when you started Tutorial English? Why or why not?
Yes, of course. The reason why I think so is that I feel the number of times which tutor points out my oral sentence decreases gradually. And I think there will be some reasons why the number of times decreases gradually. I’m going to think about it.

I think the reason is that I have read and listen to more native sentences than before. It means English grammar skill is proportionate to the number to touch native sentence.

I think my number to touch it has increased during this late semester. It’s because my English teacher of my department is native and not to speak Japanese in the class which is the same way as Tutorial English. So, the times which I touch native sentence has increased, it means my grammar skill has improved during this semester.

But I have to think about after this semester is over. It’s because if I don’t study English after that, it is like blowing the chance to improve English skill in ever-increasing. So I have to think about it.

Fortunately, it is set to take the pre-intermediate class of Tutorial English in 2 weeks of the beginning of spring vacation, so this term will be enough to study English. But after that, I don’t have a plan to study English. I think it is important to prepare learning environment before the previous plan is over.

Therefore, I must schedule to study English by the time.


2. Using the Language from Unit 16, respond to this request: Can you clean all the Tutorial English booths every Sunday for free? Please give reasons for your answer.
Well… if you pay well-deserved reward to me, I will accept it. It’s because if the reward is worth of working for me, I had better to do it. And if the reward is not worth of working for me, definitely I had better not to do it. But how do I decide whether I say yes to the request or not? So I’ll think about it carefully and mention it for marshaling my thoughts.

I think my branching point whether I say yes to a request or not is very simple. I consider it through two steps.

First step is that I compare a request to my weekly or monthly to-do list. Which to-do list I choose varies depending on the scale of the request. And then I confirm my recent task and I consider if I can afford to agree to the request. If I can afford to do it, it goes to the next step.

Second step is that I guess what I want to do for free. If I want something to buy, it means I should earn money to buy it. So if it is commensurate with the request and its reward, I definitely assume the mantle of the request. But if I want to do something which does not dig into my purse, I had better to do the thing.

Therefore, first I will listen for the reward of the initial request, and then I consider whether I accept it or not in such way. And then I will answer the question.

2007-12-21

How to practice listening & How to get good grades & etc...

These short essays are soooooooooooooooooooooooooooooooooooooooooooooooooooo bad.
It's because these are not logical. As suspected, I cannot make good sentence without in good time.


orz

【Unit 13】
1. How can you practice listening outside of class?

 I usually practice listening outside of class by using MP3 player; it means I hear English sentences which is read by native speaker. Actually, I would like to use the podcasting, but I bought the MP3 player which is not made by Apple computer, but is made by Kenwood Corporation, so I cannot use the podcasting.

 However, I can just download music file and put it into my MP3 player, so I have put some music files which are any English listening data into my MP3 player directly. But, I think only to do it is not a smart action in the way that to put “any” English listening data into it.

 Therefore my mp3 player has some music files which are some Listening sections of some English lecture which I have taken. It’s because it is useful for me not only to practice listening, but also to link to score high in each class.

 So, this is the way for me to practice listening outside of class.


2. Give some advice to a friend who wants to get in shape.

 Hi, dear my friend! I have heard you really need to get in shape. If you really trouble about it, I will give you two suggestions how to get in shape in my experience.

 First suggestion, you should go swimming to get in shape. It’s because you can get in shape in balanced to go swimming. It’s because you can use your generalized muscle by swimming. So this way gives you balanced body and benefits your health and makes you handsome. But this way will cost some money to join a gym, and it is not always to be able to swim. You can only swim just during the gym is opening.

 Another suggestion, you should go jogging to get in shaper. It’s because you can get in shape and make your stamina up. Especially, you can go jogging any time and anywhere. And this way don’t cost money. All you have to do is to get sport shoes and sport cloth. So it’s simply enough to try that, right?
 I’m glad if this suggestion is useful for you. See you!

 And I viewed receive e-mail yesterday. Thanks a lot for answering my questions! I can enlarge my point of view, and my purpose has been clear gradually. And after careful thought, I would decide not to go to the San Francisco, but to go to the Bristol in England, and I would attend the Language school of “OISE” in there.
 I will study English for 4 weeks in the Language School, and then I will draft from place to place for 2 weeks.

 This is just an idea what I do after finishing studying at the Language school. So, I might revise a schedule, but I would like to schedule a drifting from place to place during my trip when I heard your advice.

 However, I’m not finished yet. I must get with many things from now, but I will get with them using examples from your advice. Your advice is so helpful for me! Thank you so much!


【Unit 14】
1. What topics do you need to review from Units 8 - 13? Why?
 I think I need to review Unit 9 “Food” There is a reason why I choose this Unit.

 First reason is that I got a lower point in Can-do function which is "Describe food" in this unit. I often made a mistake in this function. Especially, I often forgot the term describing food. I know why I often forgot it. It’s because I could not imagine the term.

 Ordinarily I remember the term with linking other English term or other English phrase, but then I could not imagine an idea to remember the term. So, I linked the term to the Japanese term or phrase. I think this is the main causation why I was evaluated with lower point.

 Therefore, I learned I should remember the term using only other English term or phrase even if it is difficult for me to link that.

So, if I review it now, I can remember the term because I found the causation. This is the reason why I think I need to review unit 9.


2. I want to get good grades in school. What should I do?

 If I want to get good grades in school, I should schedule in great detail in then semester and I study on the schedule. It’s because it is difficult to get good grades in school only to spend time to study. I think the more the subject is hard to understand, the more it won’t get it easy to spend the time to study simply.

 I mean it is not good just to spend time to study, but you should make all kinds of efforts to get good grades in school.

 For example, my friends and I can help each other, and we can share our knowledge each other. And I can concentrate on studying in less time. And first I can only try to study in the areas which are easier to understand than other areas, and then I ask someone teach me the other ones which are difficult to understand.

 These examples mean you should spend your time effectively for getting good grades in school. For that, you must keep tabs on your schedule to study. With that, it becomes important to draw up standards what is good scheduling and which way is better for you.

 I think there are many ways to make out a good scheduling. And I think it varies among individuals. So if you want to get good grades in school, you should find your study style. And then, you should schedule in great detail by your own way. And then, you study on the schedule.
 By doing this, I think you can spend your time effectively and you can get good grades in school.

2007-12-19

Cache Memories



Topics
・Generic cache memory organization
・Direct mapped caches
・Set associative caches
・Impact of caches on performance

Resource:class12.ppt, class14.ppt

northbrigde
southbrigde

【General Caching Concepts】
2つのことを考える

Placement policy
→もってきた値をどこにおくか

Replacement policy
→誰かを追い出さないと、他の値は入れない→つまり、誰を追い出すか


-Types cache misses-

・Cold(compulsary) miss
→最初は失敗する(キャッシュが溜まるまでの間)→cf.冬の朝の車

・Conflict miss(よく起こるので、なるべく避けるようにする)
→メモリの値は入れる場所が分かれている。
→キャッシュがたくさんあるのに3号車しか使わない(結構よく起きる)
→キャッシュは十分大きくても、各データ同士の関連性が高いと、
同じキャッシュブロックに入ろうとする。よって、効率的にキャッシュが使えなくなる。
→つまり、キリのいい数では悪くなり、キリの悪い数だと良くなる場合がある。

・Capacity miss
→ランダムにたくさんのメモリを触りまくると、うまくいかなくなる。
→そもそもキャッシュが小さすぎた?


Lecture14 -Cache Memories Oct. 10, 2002-
【Inserting an L1 cache Between the CPU and main memory】
キャッシュの階層↓
・一番上にはCPUのレジスターファイル
・レベル1キャッシュ
・レベル2キャッシュ

一般には、一バイトごとに関するのではなくて、
16,32,64byte単位でキャッシュとメモリの間を行き来する。

Line size→行き来するデータの単位

FeaturedとActualの結果は微妙にずれている→理由は後で話す

L1だと Latency 3cycle ⇔ L2だとLatency 10cycle

このぐらい変わる!

それぞれのcache blockには管理情報(validとtag)が付いている
→どこのメモリから持ってきたのか(tag)
→意味がある情報なのか(valid)→1 or 0?

このまとまりをキャッシュラインと呼ぶ
キャッシュラインのまとまりをキャッシュセットという
キャッシュセットの集まりをキャッシュという
B*E*S=Cとなる


【Addressing Caches】
1回に動かせるデータ単位を、大体三つぐらいにぶった切って
真ん中のbitsを「どの部屋に入っているか」に使う(=set index)

一番上のbitsをtagに使う(=tag)
そこがvalidだったら、下位bitsで読めばよい。(=block offset)

The word at address A is in the cache ifthe tag bits in one of
the lines inset match .
The word contents begin at offset bytes from the beginningof the block.

→上位ビットが色んなところにバラけるのが良いところ


【Direct-Mapped Cache】
Simplest kind of cacheCharacterized by exactly one line per set.

一号室の店員一つ、自分の入れる号室は決まっている
→そうすると、柔軟性が無くなってしまう→だから真ん中のビットを使う。

Set selectionn
→Use the set index bits to determine the set of interest.

Line matching and word selectionn
Line matching: Find a valid line in the selected set with amatching tag
Word selection: Then extract the word

Line matching→validであってindexがあって、blockの中のしかるべきワードを使うこと?
Word selection→省略

【Why use Middle Bits as Index?】
High-Order Bit Indexing
・Adjacent memory lines wouldmap to same cache entryn
・Poor use of spatial locality

Middle-Order Bit Indexing
・Consecutive memory lines mapto different cache lines
・Can hold C-byte region ofaddress space in cache at onetime



キャッシュが小さくて4色しかなかった場合。右側がメモリだとする。
同じ色のところに入れる→キャッシュがぶつかりまくる(左側)
→真ん中を使えばうまくバラける→よって、昨今のCPUの大原則となっている

最初のラインに入っても二つ目のラインに入っても良い実際のCPUでは18ways
真ん中を使って部屋を選ぶ

上位の0110ってタグを見て、タグと一致するかどうか調べて、
有効かどうか調べて有効だったらブロックを調べる。validタグが2つあるときは、両方調べる?

最後は一番下を調べて、そこのワードをCPUに読んだり書き込んだりする。
→柔軟性がある変わりに、個々の部屋が大きければ大きいほどタグを比較する回数が増える。
→データと命令は異なるので多くのCPUではデータキャッシュとインストラクションキャッシュにかわる。
→memoryに入らなければ仮想メモリを使ってdiskに入る

Pentium3ぐらいだと、associativityは4-way

(基本情報でやったやつ)※要意味確認!!間違ってるかも。
write-through方式→CPUが計算した結果は、L1 dataに書くだけで終わらせる。
→毎回書いてると大変だから、MainMemoryに書かないこと
→忙しいときは、キャッシュだけを使ってやる→L1とL2にだけ書く。

write-back方式→CPUに書くのはL2がいっぱいになったときだけ、そういう方針のこと

write allocate→ライトアルケイトしない場合、書いたデータはまた読む確立が高いから、Main Memoryまで書かなくても良い?
→キャッシュに書く必要がない場合、キャッシュに書く動作を省略して、直接Main memoriesに書く。→L2には書く、メインメモリーに書かない。

プログラムの中で、ポインターとか使わないプログラムだったら配列が一番問題になる。
典型的ないい確率だったら、L1は3-10%。L2は 99%はあたるのが良いプログラム
→L2からもれるのは相当悪いプログラム

【Cache performance Metrics】
Miss Raten
Fraction of memory references not found in cache(misses/references)
Typical numbers:
3-10% for L1
can be quite small (e.g., <>Hit Time
Time to deliver a line in the cache to the processor (includestime to determine whether the line is in the cache)
Typical numbers:
1 clock cycle for L1
3-8 clock cycles for L2

Miss Penalty
Additional time required because of a miss
Typically 25-100 cycles for main memory

hit time1 clock cycle for L13-8 clock cycles for L2

Miss PenaltyTypically 25-100cycle
→キャッシュを外れると一桁以上遅くなる→桁違いに遅くなる

ではどういうプログラムを書けばよいのか?

【Writing Cache Friendly Code】
・Repeated references to variables are good (temporallocality)
・Stride-1 reference patterns are good (spatial locality)

キャッシュにやさしいプログラムの書き方→temporal locality

配列を書くときはstride-1で書くのは悪くない→spatial locality

アドレスは行順で繋がっている。

例えばキャッシュブロックが16byteだと4回に一回は外れる。

だから、一回外れると、3回当たる。

64byteだと1回外れると、15回当たる。

配列の場合は列順にアクセスされるから、毎回キャッシュから外れてしまう。
→横並びに読み込めば、キャッシュに当たっていたのに。。。

【The memory mountain】
Read throughput (read bandwidth)
Number of bytes read from memory per second (MB/s)

Memory mountain
Measured read throughput as a function of spatial andtemporal locality.
Compact way to characterize memory system performance.

教科書の表紙→先生のお気に入り。ただし、今は飛ばす?

・大事なこと配列をたくさんアクセスしたときに、飛び飛びにアクセスするのは大損する

・世の中でとってもよくやる計算行列の掛け算。

どれだけよくなるのかを話す。普通の行列の掛け算のプログラム→3重ループ

普通に3重ループで書くとあまり良いことにはならない
→全体のキャッシュサイズとキャッシュブロックのサイズを考えてプログラムを書く。

O(N^3)で我慢する

N reads per source element ココはN回読まれる

・Bの各要素もN回読まれる。
・Bの各要素もN回読まれる。
・Cは内積だから、N回の足し算はためておいて、最後に計算する。

→AやBに頻繁にアクセスするので、そこをうまくやらなくてはいけない。

【Concluding Obsercations】
Programmer can optimize for cache performance
How data structures are organized
How data are accessed
Nested loop structure
Blocking is a general technique

All systems favor “cache friendly code”
Getting absolute optimum performance is very platform specific
Cache sizes, line sizes, associativities, etc.
Can get most of the advantage with generic code
Keep working set reasonably small (temporal locality)
Use small strides (spatial locality)

【仮定】
Line size = 32B (big enough for 4 64-bit wordsN)はとてもでかい。
よって、個々の配列のごく一部しか、L1やL2には乗っからない。
そのときどうすればよいか?

→配列のプログラムを良く見て、for文一番内側のプログラムに注目する。
→添え字に注目→アクセスパターンを見る
→工夫をすれば添え字kを一番外側に持っていくことが出来る。

前提として持っているべき知識
・addressは横に続いていること→row-major order
・Stepping through columns in one row
・ブロックサイズが十分大きかったら、compulsory miss rate = 4 bytes/BB = ブロックの大きさ→あんまり高くない
・配列を縦にアクセスすると、空間的局所性がいかせない→miss rate 100%
添え字が外からijk,kij,jkiなどがある一番内側のイテレーション一回分でどのぐらい
ijk→misses/iter = 1.25
kij→misses/iter = 0.5
詳しくは言わないが工夫のしがいがある。

添え字の順番→3の階乗個ある

一番内側のループを図ってみた→何故かijkの方が早い
→キャッシュミスレートだけでは分からない。
→理由は、コードのスケジューリング、レジスターなども絡んでくるから

配列が小さいと数Bで済む!

【!!課題の重要なヒント!!】
行列の掛け算をやるときどういうやりかたがいいか?→ブロッキング

小行列
4つの小行列。線形台数を復習
小行列ごとで計算した方が嬉しい。
→AやBが小さいとキャッシュに載りやすいから。
大きな配列ではまずい。小行列でやっては差し込む、これを繰り返す。

ただし、プログラムがややこしくなる50loopぐらいになる。
→一見難しいように見えるが、小行列の掛け算だからキャッシュにあたる。

キャッシュの升目はかなりでかい!下に行きまくると外れまくるが、
4×4とか小さいレベルなら外れない→だから小行列を使う。これがアイデア。


結果他のアルゴリズムは、キャッシュから外れまくるが、小行列のアルゴリズムは、
10[cycle per elements]以下で収まっている。
→割といい性能が維持されている→2倍ぐらい早い。

メモリマウンテンは来年のお楽しみ。

Programer can optimize for cache performance
→ループしているところが一番→ループの入れ異なっているところに注目する

All systems favor "cache friendly code"個々のコンピュータシステムは、
個々の性能に非常に依存する。

一般的な原則としては、working set→アクセスするメモリの総量を小さくする左側をアクセスするのはlarge stride→ストライドがでかい!

【課題説明】
やること:画像処理
期限:年明け

→2次元配列をひっくり返す。それだけ。でもバカにはできない。90℃回転するプログラム。

要素の数は4MB
→つまり、そこらへんのPCではキャッシュに載らない→如何にうまくキャッシュに載せるかを考える。


結果よりも工夫と考察を評価する。キャッシュに関しては出来るだけ記載する。
勿論プログラムのソースも出す。

行列の転置+行列の逆転この画像は壊さないで、別のものに入れてよい。画像を壊して、そこに置くとなると、ちょっと大変だから。

matrix_t[N][N]を2次元配列方とする。
・src=source
・dst=destination
このプログラムは難しい。
ソースに対しては気持ちがいいプログラムだと、デスティネーションに対して悪くなる
デスティネーションに対して気持ちがいいプログラムを作ると、ソースに対して気持ち悪くなる。


さらにがんばって見たい人
【発展課題】
・今まで見たいにgccではなくgcc特有の機能を使う
・CGG以外のコンパイラの利用
・アセンブリコードの挿入
・複数のマシンでの実験

ノートPCでやるとうまいデータが取れない可能性がわずかにある。
辺にいい結果が出ることがある。→節電の設計がたくさんあるから。
→CPEが計算しているときはクロックを供給する
→メモリ使ってCPUが暇になると、CPUにクロックの供給を止める設計のBIOSがある。
→サイクルカウントが止まって進まないPower savingをoffにする。
→コンセントに差して使う。

データが変だと思ったら、すぐ質問をする。(色々な要因が複雑に絡まっているから)

CPEについて。
最適化しないと10。大抵は1~100の間
→1以下の人は正確に測れていない
→100以上の人は頑張らなさ杉。
1を若干数切ることはありうるが、0,0Xという値は無い。

配列のサイズは大幅に変える。
・等差数列
・等比数列
・1,5,10,50,100,500は良くない

1,2,4,8,16,32も微妙
→メモリが特定の部屋にいく傾向がある。
キリのいい数字はプログラムの性能を悪くする。
若干きりの悪い数値も使ってみるべし!

2007-12-16

Moving diary








これでちゃんとmixiにも表示できてるかな?

先日Google Japan社にお邪魔したとき、ちょっと感化されてしまったので、勢いでblogger作りますた。

Bloggerを使ってみて、多少バグもあるけど、自由さ+opensource(一部)が面白そうな感じ。

Googleレベルのcodingの勉強にも繋がったらいいなぁ、とか妄想してみたり。

本当は自分用Server & 自分用blogでやってみたかったけど、それは追々時間が余ったらチャレンジしようかと。

というわけで、今日からはこっちで日記書きます。


さようならmixi、こんにちはblogger。

2007-12-14

How to remember new English vocabulary & etc...




【Unit 11】 Bold red word is a new term for me to remember.
1. What do you do to remember new English vocabulary?

I take a two-step approach to remember new English vocabulary.

First step is to write and to say the word to remember the vocabulary. It’s because it is so simple and shortest way to remember the vocabulary.

And second step is to relate the vocabulary to the similar one or similar meaning phrase as much as possible. It’s because it is difficult to forget the remembered vocabulary in this way. It means I should make a network of English vocabularies. It’s because if I make the network larger and larger, I’m difficult to forget the vocabulary and I remind it easier if I forget it. So it is so simple way to remind it if I forget it because I have only to follow the network.

Therefore, I can remember the vocabulary in any way, and if I forget it, I can remind it in any way. So, when I remember new English vocabulary, I’m not conscious of remembering individually, but I’m conscious of relating it to another vocabulary and broadening my English vocabulary network.

2. using the Language from Unit 11, describe your appearance and personality.

I have unkept hair and I think I’m average-height and weight; Maybe I’m a little heavier than the average-weight. It’s because I’m hardly physically active recently. So I think I had better play sports or go to gym, but I had so many assignments that I have to throw myself into a task.

In most cases, it is fact recently that even if I spend every day doing my assignments, I cannot complete my all assignments; I always don’t do a few assignments for lack of time. However, I don’t want to give up playing sports or going to gym. So I need to make time to do it. It means I need to concentrate on doing my assignments and I complete my assignment earlier and to keep it good-quality. So now, I need the skill to judge useful information to understand about Computer Science earlier, and to make time.

In getting off the subject, but it is the personality of me. I think I’m such a floundering man to get something that I want. So I meet any obstacle by trying to get something. In this case, something is time, but any other thing is same as this case. So to sum them up, I have unkept hair and I’m a little heavier weight, but I have an intention to try it better. And the process which I try it better shows my personality.

And…I’m afraid I will be absent from next lesson. It’s because I get a chance to go to Google Japan Company tomorrow. I can get a opportunity to learn about Google Tech in this session for collage student. And this session is started from 0:45 PM to 4:00PM, so I can’t attend next lesson. But I would like to contact you because I asked you help about the Language School. So I write my E-mail address and mobile phone number below. If I could get any advice, please contact me.
~~~
~~~
~~~

【Unit 12】
1. Do you think watching movies or TV in English can help you improve your English skills?
Why or why not? Yes, of course. It will help me improve my English skill because it is better to spend the time when I’m exposed to English even if only slightly. But, I think this way may be only an efficient for listening, so if I continue to study English in this way, I may not improve my English skill about speaking absolutely. So I think there is a more efficient way to improve my English skills than this way.

However, it is fact that this way improves my any English skill. Also, it is very fun to watch it. So, it may be better to try to study English in diverse ways because it makes me so weariless that it motivates my intentions.

I think it is very important to have a continual motivation to study than to study hard temporarily. Therefore, Maybe I should have diverse opportunities to be exposed to English to have a continual motivation about English.


2. You are in Hawaii and want to buy a t-shirt. What questions do you need to ask the store clerk? (Use the language from Unit 12.)

I take four-step in this action.

First step, I ask the store clerk “Excuse me, do you have any T-shirts?” And if he says “Yes.”, I ask also the store clerk “Where are the t-shirts?” And then, the store clerk will guide me to the area about t-shirts. And I move the area.

Second step, if I need to try it on, I say “Can I try it on?” And if the store clerk says “Yes.”, I try it on. And then if I feel it is large for me, I ask the store clerk “Do you have this in a smaller size?”

Third step, if I find the favorite t-shirt, I ask the store clerk “How much is this one?” and then, if the t-shirt costs reasonable price, I say “I’ll take it” to the store clerk.

Fourth step, in front of checkstand, if I have a Master card, I say “MasterCard, please.” And when I finish making account I can get the favorite t-shirt. That’s line of the action which I want to buy a t-shirt in Hawaii.

Contact Google Japan



プレゼンもオワタ。

今回、発表者の中では一番だったろうけど、 反省点はたんまりあるな。

・評価基準を事前に推測し、評価基準を鑑みながら質問に回答する。

・資料は手に持たないで、事前に頭に入れておく。

・自分の担当でないプログラム部分でも、事前に情報をすり合わせておき、一人で発表する。

他にもあるけど、とりあえずこんぐらいに絞って、 次プレゼンするときは、ここを意識しておこう。

そして明日は、初Google社訪問。 ワクテカが止まらんぜ!

これが最初で最後、なんてオチにはならないようにしたいもんだ。

2007-12-07

Lesson Review Task in Unit 9 & 10

む~、やばいな。プログラミングCもやらなくては。。。

といっても、春休みの準備に手を抜きたくないし… 特に焦点を当てるべき課題は、

・朝もしっかり起きて活動すること
・勉強量の時間特性を指数的にふやす

の2つかな。 とりあえず、チューターには空気読まずに英語で質問してみた。
カッとなってやった。今はとても反省している。

【Unit 9】
1. Do you think you will use the language from Unit 9 in the future? Why or why not?

Yes, I will. It’s because I think I will take lunch or dinner at the restaurant with foreign friends in the future, so then I will talk about any topics with friends. And then, I think Japanese food will be come up in conversation because various Japanese foods are well known around the world. Even as far as I know, SUSHI and SHABU-SHABU and YAKITORI and NATTO and MISOSHIRU are famous all over the world.

Therefore, some foreigners may ask me some questions about Japanese food because I’m Japanese. At the time, if I can’t describe Japanese food, I will miss a precious opportunity to talk with friends. It’s a very disappointing thing for me to miss the opportunity. So I need to describe food.

On the other hand, in that situation I will have to order the menu. And then I need to order the menu accurately. It’s because if I can’t order the menu, there is a possibility that the waiter has brought the wrong food which I ordered. In most case it’s attributable to me.

Therefore, I need to master how to order, and need to know how to deal some problems which the waiter has brought wrong food.


2. Using the Language from Unit 9, describe your favorite food.
My favorite food is Japanese NABE. It is a favorite and general food in Japan. You can cook it easily, because it is very simple dish. So I tell you how to cock it.

First, you fry a chicken on the greased pan.

Next, you pour water till the meat is soaked a little, and then you pour the sauce in it.

Next, you boil the pan and wait until the water is boiling. And then, you throw various vegetables which you like, and wait until the vegetables are soft.

Finally, if you taste it rich, you can add the sauce to adjust the seasoning. It’s all to cock it. So, it’s very simple dish, isn’t it?

Now, it’s cold gradually, so I guess this dish is useful for you.



For something completely different, I have some questions to you. I want to go abroad and improve English skills more in this spring vacation. So now, I plan to attend the Language School in San Francisco in California. And, I try to apply for admission to the Language School directly using the Internet. It’s because it can cut cost down and I can study among people without Japanese. So, I would like to ask you to give me some advices. If you wouldn’t mind, please give me some answers of 3 questions below.

1. If you know about the Language School, please tell me any information or rumor about the Language School.
* I’m planning on choosing the Language School in these sites below. http://www.angelus.co.jp/sanfranc.html
http://www.studyabroad.jp/usa_west.html (only in San Francisco)

2. If there is anything to pay careful attention to stay San Francisco, please tell me it.

3. Which is safer, to use home stay or to use share room?

At this time, I can’t judge which better Laguage school is yet. It’s because I can read the information about fee and program and school’s features etc by using the Internet, but I can’t get the rumor of the Language School. So I want to gather rumor as much as possible. So, I’m afraid it would help me great deal if you answer the questions.

These are information and what I hope for the Language school.
*** Purpose ***
To improve English skill and the TOEFL score.

*** Condition ***
Place: San Francisco
Stay style: Anything OK
Budget: No condition
Term: About 4 weeks
School: I try to choose the Language School in those sites below. http://www.angelus.co.jp/sanfranc.html
http://www.studyabroad.jp/usa_west.html (only in San Francisco)



【Unit 10】 1. Do you always review the unit after class? Why or why not?

Yes, I always review the unit after class. It’s because I can’t do my Lesson Review Task without reviewing. So while I continue to hand in the answer to the Lesson Review Task, it means I review the unit after class. By the way I’m trying to answer the second question”Why or why not?” It’s because I take a class by paying some fees. So I want to maximize the effectiveness of this class. Otherwise, it means I throw up the chance and lost money.

Therefore, I always review the unit after class.

2. Imagine you are very rich. Using the Language from Unit 10, describe your home.
Now, I live in the exclusive apartment house. And it is the highest floor which I live. Well…from now, I introduce my room. My room is very roomy, and it’s traditional style.

It’s because I like it, especially I like Japanese style room which has the paper doors and the Tatami mat and Kotatsu and so on. These materials and architecture make me relax. So I can spend the comfortable time when I’m in it.

In addition, it’s sunny because my house is located higher place. So, it is the scenic place, too. And there is a Kotatsu in the center. And there are some sitting chairs around it. And there are some materials related Japanese cultures.

So whenever I invite any foreigner in my house, I can let him impressed and he is interested in Japanese culture. So, why don’t you come in my house if I actualize the house truly?

2007-12-05

Filter 1 & 2




オワターーーーーーーーーーーーーーーーーーーーーーー!!!

今までのどんな課題よりも難しかった。 というか理解するのに相当頑張った。

回路理論再試験のために、回路理論を猛勉強したのがかなり役立った。かも。

そして、次はプログラミングCの締め切りが1週間後。

ソフトウェア制作のプレゼンテーションが1週間後+1日。

微々たるものだけど、tutorialも英語も仏語の課題もある。

うはwwwwwwwこうなりゃやけだwww 全部の課題をモッコモコに片付けてやんよ!!


*頑張った痕跡【Contents of a FilterⅠ&Ⅱ report】
Document:26 sheets
Semi Log graph:16 sheets
Curcuit graph:7 sheets
Simulation graph:7 sheets
Sum:56 sheets
Time:1 week
Memories:priceless