YouTube2Text

[CS61C FA20] Lecture 28.1 - OS & Virtual Memory Intro: Intro — Transcript

by CS 61C Departmental · 1,709 words · 289 segments · language en · Watch on YouTube

Full transcript

  1. 0:00[Music]
  2. 0:11hello there
  3. 0:12welcome back to a new module in 61c in
  4. 0:16which we are going to cover
  5. 0:18the basics of operating systems and
  6. 0:21understand how does the virtual memory
  7. 0:23work
  8. 0:24okay so let's get into it and orient
  9. 0:28ourselves
  10. 0:29in the traditional picture of machine
  11. 0:31structures
  12. 0:32we have been dealing with the
  13. 0:34instruction set architecture and we
  14. 0:36approached it with both sides from the
  15. 0:37software side
  16. 0:38and from the hardware side most recently
  17. 0:41we understood how does the processor
  18. 0:43work and how does it work
  19. 0:45with the on-chip cache
  20. 0:50what we are going to do now we are going
  21. 0:52to add some more stuff around it
  22. 0:54first we are going to add the operating
  23. 0:56system
  24. 0:58like what we will see function basic
  25. 1:01functions that terminator on linux or
  26. 1:02mac os or
  27. 1:04windows and then talk about the
  28. 1:08input and output to our computer and
  29. 1:11then we are going to extend that to
  30. 1:13cover how do we work with the memory
  31. 1:16um especially how does the main memory
  32. 1:19work together with the storage
  33. 1:23okay so if you take a look into our
  34. 1:25picture
  35. 1:26of new school machine structures we are
  36. 1:29now dealing
  37. 1:30with the way how we would support
  38. 1:32parallel threads
  39. 1:33in our computers as well as
  40. 1:37with the topics that are related to the
  41. 1:40main memory
  42. 1:42and also very importantly now we are
  43. 1:44revealing the complete
  44. 1:46picture of the locality and memory
  45. 1:49hierarchy
  46. 1:50so we see the whole pyramid now so we're
  47. 1:54going to fill it in
  48. 1:56we are going to look into our we looked
  49. 1:58in in our caches
  50. 2:00and now you're going to really
  51. 2:01understand how does the physical memory
  52. 2:04in this case dram work with ssds and
  53. 2:07magnetic disks
  54. 2:08to implement the virtual memory
  55. 2:12when we are done with that we'll have
  56. 2:14this complete illusion
  57. 2:16of infinitely fast and infinitely large
  58. 2:18memory
  59. 2:20so let's recap one more time where we
  60. 2:22are so far
  61. 2:23in 61c so far we started with c
  62. 2:27and in project one we built a relatively
  63. 2:30small but fun and effective c program
  64. 2:34then in project 2
  65. 2:38in this course we started risk 5
  66. 2:40assembly and we built
  67. 2:42another project
  68. 2:45in there in project 2 we built a risk 5
  69. 2:48assembly a functionality five assembly
  70. 2:50program then in project three
  71. 2:52we built the data path for a risk five
  72. 2:56processor
  73. 2:57and now conceivably
  74. 3:00pretty much any of these c programs that
  75. 3:02we have written
  76. 3:03or the assembly programs can run on this
  77. 3:05data path we have extended that
  78. 3:07to add the cache to improve the
  79. 3:10performance and be able to
  80. 3:12run fairly complex programs on our data
  81. 3:16path
  82. 3:17and then we conceptually introduced
  83. 3:19memory but we didn't really go
  84. 3:21in depth of the memory that's what we
  85. 3:23are going to do now
  86. 3:27but we have built a lot of really cool
  87. 3:30components
  88. 3:31but we really haven't built a computer
  89. 3:34um
  90. 3:34i mean let's take a look at a real
  91. 3:36computer like a laptop
  92. 3:38how is a laptop different than what we
  93. 3:40have built so far well the
  94. 3:41laptop surely does have a processor
  95. 3:45and has a memory and has cache
  96. 3:49but it has a few other things
  97. 3:53that makes it a lot easier to run a c
  98. 3:56program
  99. 3:57uh to enter a c program and to see the
  100. 3:59results well namely it does have a
  101. 4:01screen display where we it can
  102. 4:04output the results such that we can
  103. 4:06conveniently view them
  104. 4:08it has a keyboard that enables us to
  105. 4:10enter things to input things into our
  106. 4:13computer and has storage it has
  107. 4:17disks inside in more modern computers it
  108. 4:19is typically a solid-state drive
  109. 4:22in some more older ones um we will
  110. 4:25typically encounter
  111. 4:27magnetic hard disk drives
  112. 4:30so what do we need to do in this module
  113. 4:32are a few steps
  114. 4:35you know the most importantly we're
  115. 4:36going to take a picture that we are
  116. 4:38reasonably familiar with now
  117. 4:39and we need to add input output first
  118. 4:43to that so we are going to study
  119. 4:47relatively briefly but hopefully
  120. 4:49effectively how do we add
  121. 4:51input output devices to our computer and
  122. 4:54that will provide a uniform way to hook
  123. 4:57up our screens
  124. 4:59keyboards and storage
  125. 5:04so that's what is going to happen here
  126. 5:06we are going to see how does the memory
  127. 5:08dram work and then how do we add storage
  128. 5:11and how do we work with the i o
  129. 5:15besides full fledged laptops
  130. 5:18there are many other simpler computers
  131. 5:22that are around us there is a number of
  132. 5:24them that are called
  133. 5:25single bore computers and one of them
  134. 5:28that is particularly popular
  135. 5:31that really opened up this space of
  136. 5:34single board computers
  137. 5:35is the raspberry pi so you can buy a
  138. 5:37raspberry pi i have a
  139. 5:38very many of them here is a raspberry pi
  140. 5:424 that you can buy for
  141. 5:4635 this one has a little bit more dram
  142. 5:49on it so it's a little bit more
  143. 5:52expensive you know 40 something dollars
  144. 5:55and you'll
  145. 5:56start noticing familiar things on it
  146. 6:00there is a processor on it and i'll
  147. 6:02click here
  148. 6:03processor is the silver thing in the
  149. 6:05middle
  150. 6:06there is a dram chip next to it and i
  151. 6:08put some thermal glue on it
  152. 6:10uh because i was using this one this
  153. 6:12black chip
  154. 6:13is the dram and that's our
  155. 6:16our main memory that's you know that
  156. 6:19that
  157. 6:20rectangle that we've been showing so far
  158. 6:22that's our memory we're going to see
  159. 6:23how do we work with that um then
  160. 6:26um our storage is going to be a flash
  161. 6:29card here we don't really have a solid
  162. 6:31state drive although we could hook up a
  163. 6:33solid state
  164. 6:34drive to it but the main memory here is
  165. 6:35a flash card like the one
  166. 6:37that we use in in
  167. 6:41cameras or music players
  168. 6:44and so on um then you know it's called a
  169. 6:48secure digital card or sd card in this
  170. 6:51case it's based on a
  171. 6:52so-called flash memory we'll talk a
  172. 6:54little bit more about that
  173. 6:56um then there is a
  174. 7:00screen i o we can hook up screens
  175. 7:03to these two hdmi ports we can
  176. 7:06add io in the form of a serial bus
  177. 7:10there are four um serial ios of
  178. 7:13in your universal serial bus type we can
  179. 7:16get
  180. 7:17add wired ethernet to it
  181. 7:20this thing supports wired ethernet and
  182. 7:22finally the silver chip
  183. 7:24is essentially wi-fi so we have wi-fi
  184. 7:28and bluetooth connectivity
  185. 7:29as other types of ios so we're going to
  186. 7:33take a look into the ways how these
  187. 7:35things
  188. 7:35actually do hook up to our processor
  189. 7:38and the picture is going to be fairly
  190. 7:40straightforward hopefully
  191. 7:42and uniform but when we do that when we
  192. 7:45add our i o to this fairly simple single
  193. 7:48board computer
  194. 7:50we have a real computer i mean you can
  195. 7:52actually
  196. 7:53run this class learn this class just by
  197. 7:55using a raspberry pi
  198. 7:58in this setup what we have we have a
  199. 8:00raspberry pi
  200. 8:01[Music]
  201. 8:02with two screens a keyboard
  202. 8:05and a mouse connected to it and it runs
  203. 8:09unix linux a form of linux
  204. 8:12and it and a whole bunch of applications
  205. 8:15that go with that
  206. 8:18even more than that you can actually
  207. 8:21learn
  208. 8:22computer architecture by examining
  209. 8:24things and running all the labs
  210. 8:26or many of the labs on raspberry pi
  211. 8:28there is actually a really good textbook
  212. 8:30that i really like that goes
  213. 8:32slightly below the level of what we
  214. 8:34cover in 61c
  215. 8:35um this is the the the book that is
  216. 8:39learning computer architecture with
  217. 8:40raspberry pi and by the way
  218. 8:42you can if you're a cal student you can
  219. 8:46download it for free from this address
  220. 8:47we are subscribed
  221. 8:49uh our library has infinite number of
  222. 8:51online copies of that book
  223. 8:53so feel free to take a look at it and
  224. 8:54browse to it
  225. 8:56we are not using it in this class
  226. 8:58because again conceptually it's a bit
  227. 9:02lower level and
  228. 9:05it is arm based so it's not as open as
  229. 9:09we would like it to be it's a little bit
  230. 9:11harder to build
  231. 9:12your arm type of processors
  232. 9:16um our labs would have been a lot more
  233. 9:18complicated will not have been able to
  234. 9:20accomplish
  235. 9:20as much but it has a really good
  236. 9:23treatment the book has really good
  237. 9:24treatment of how do you deal with these
  238. 9:27ios and memories and so on
  239. 9:29and how do you see the computer
  240. 9:33from the applications point of view
  241. 9:36os's point of view and how do you run
  242. 9:39things how do you hook up these input
  243. 9:41and output devices
  244. 9:43and there is a number of cool simple
  245. 9:44experiments that are in there
  246. 9:47one day when the single board computers
  247. 9:50they're based on risk five
  248. 9:52um are more affordable and more
  249. 9:54widespread there are some but
  250. 9:55they're a bit expensive if they're in
  251. 9:58this class
  252. 9:59or um if there are a lower class
  253. 10:02they don't just support exactly what we
  254. 10:04need beyond what we are doing in this
  255. 10:05class
  256. 10:06when these become a little bit more
  257. 10:07widespread i'm sure we are going to see
  258. 10:10um labs that are based on that
  259. 10:14so check it out for now so
  260. 10:19but there's another glitch here another
  261. 10:22quirk
  262. 10:23that we didn't quite cover um
  263. 10:27it's you know what we have done so far
  264. 10:29it's not really quite the same
  265. 10:31with what we are seeing on a raspberry
  266. 10:33pi computer or any other computer
  267. 10:36the screen in raspberry pi looks a lot
  268. 10:38different than what we get
  269. 10:40out of our venus in venus we just
  270. 10:43ran relatively short programs but we
  271. 10:46always ran
  272. 10:47a single program we could make it a lot
  273. 10:49bigger a lot more complicated but it was
  274. 10:50always just one computer
  275. 10:53but our computer runs many programs at
  276. 10:56the time a real computer runs many
  277. 10:57programs over time
  278. 10:59and what we'll do to try to convince you
  279. 11:01that changes to the hardware
  280. 11:03are minimal to be able to do this
  281. 11:07this whole thing is just software
  282. 11:11hardware is pretty much there you know a
  283. 11:13few minor things that need to be added
  284. 11:14but here and there
  285. 11:16and that magical software that does that
  286. 11:18is the operating system
  287. 11:20so you're going to get into the
  288. 11:21functions of the operating system just
  289. 11:23after a quick break see you then

About this transcript

This page contains the full transcript of [CS61C FA20] Lecture 28.1 - OS & Virtual Memory Intro: Intro by CS 61C Departmental, generated from the public captions YouTube serves with the video. The transcript has 1,709 words across 289 segments, with the original timestamps preserved so you can click any line to jump to that moment in the embedded player.

What you can do with it

Use the transcript to take notes, quote the speaker, build a study guide, generate a summary with ChatGPT or Claude via the YouTube Summary tool, or export it as a timed subtitle file with YouTube to SRT. You can also re-open it in the transcriber to translate the transcript into 100+ languages.

Free YouTube transcript tool

YouTube2Text is a free YouTube transcript generator — no signup, no daily limit. Paste any YouTube link and get the full transcript instantly, with timestamps, click-to-jump, translation to 100+ languages, AI prompts for ChatGPT, Claude, and Gemini, and exports to TXT, SRT, VTT, or Markdown.