Thursday, 21 March 2013

recursion and operating system

From my perspective, recursion is easy to understand. As long as we know what will be produced if the placeholder is 0, we can use (g 0) to get (g 1) and use (g 1) to get (g 2). The first question in the recursion sheet is to produce a green outline square with the size of 10 when placeholder "d" is 0. Then, if "d" is 1, we need to use the other condition:

[(> d 0)
(overlay
(beside (g (- d 1)) (g (- d 1)))
(square (* 2 (image-width (g (- d 1)))) "outline" "green"))]

Then it will produce that two green outline squares with the size of 10 are on a big green outline square with the size of 20.


The second class in this week was an introduction of operating system and the connection between machines in a network. I felt I did not know much about the operating system like how it works and how it relates to CPU. In terms of the fixed procedures to choreograph cooperation, I learned three types of connections: roundly connected, all connected, and centrally connected. The problem in roundly connected example is that the whole network will fail if the network in one of computers fails. All connected cooperation is like human communication because someone waits for the other talks first and then he or she talks. For the centrally connected example, the sender sends out the information to the hub and the rest of receivers can get information from the hub. Only of the hub is broken, the whole network will be broken. 

I think I will be fine if the tomorrow's quiz is about recursion.

No comments:

Post a Comment