[CS61C FA20] Lecture 28.1 - OS & Virtual Memory Intro: Intro — Transcript
Full transcript
- 0:00[Music]
- 0:11hello there
- 0:12welcome back to a new module in 61c in
- 0:16which we are going to cover
- 0:18the basics of operating systems and
- 0:21understand how does the virtual memory
- 0:23work
- 0:24okay so let's get into it and orient
- 0:28ourselves
- 0:29in the traditional picture of machine
- 0:31structures
- 0:32we have been dealing with the
- 0:34instruction set architecture and we
- 0:36approached it with both sides from the
- 0:37software side
- 0:38and from the hardware side most recently
- 0:41we understood how does the processor
- 0:43work and how does it work
- 0:45with the on-chip cache
- 0:50what we are going to do now we are going
- 0:52to add some more stuff around it
- 0:54first we are going to add the operating
- 0:56system
- 0:58like what we will see function basic
- 1:01functions that terminator on linux or
- 1:02mac os or
- 1:04windows and then talk about the
- 1:08input and output to our computer and
- 1:11then we are going to extend that to
- 1:13cover how do we work with the memory
- 1:16um especially how does the main memory
- 1:19work together with the storage
- 1:23okay so if you take a look into our
- 1:25picture
- 1:26of new school machine structures we are
- 1:29now dealing
- 1:30with the way how we would support
- 1:32parallel threads
- 1:33in our computers as well as
- 1:37with the topics that are related to the
- 1:40main memory
- 1:42and also very importantly now we are
- 1:44revealing the complete
- 1:46picture of the locality and memory
- 1:49hierarchy
- 1:50so we see the whole pyramid now so we're
- 1:54going to fill it in
- 1:56we are going to look into our we looked
- 1:58in in our caches
- 2:00and now you're going to really
- 2:01understand how does the physical memory
- 2:04in this case dram work with ssds and
- 2:07magnetic disks
- 2:08to implement the virtual memory
- 2:12when we are done with that we'll have
- 2:14this complete illusion
- 2:16of infinitely fast and infinitely large
- 2:18memory
- 2:20so let's recap one more time where we
- 2:22are so far
- 2:23in 61c so far we started with c
- 2:27and in project one we built a relatively
- 2:30small but fun and effective c program
- 2:34then in project 2
- 2:38in this course we started risk 5
- 2:40assembly and we built
- 2:42another project
- 2:45in there in project 2 we built a risk 5
- 2:48assembly a functionality five assembly
- 2:50program then in project three
- 2:52we built the data path for a risk five
- 2:56processor
- 2:57and now conceivably
- 3:00pretty much any of these c programs that
- 3:02we have written
- 3:03or the assembly programs can run on this
- 3:05data path we have extended that
- 3:07to add the cache to improve the
- 3:10performance and be able to
- 3:12run fairly complex programs on our data
- 3:16path
- 3:17and then we conceptually introduced
- 3:19memory but we didn't really go
- 3:21in depth of the memory that's what we
- 3:23are going to do now
- 3:27but we have built a lot of really cool
- 3:30components
- 3:31but we really haven't built a computer
- 3:34um
- 3:34i mean let's take a look at a real
- 3:36computer like a laptop
- 3:38how is a laptop different than what we
- 3:40have built so far well the
- 3:41laptop surely does have a processor
- 3:45and has a memory and has cache
- 3:49but it has a few other things
- 3:53that makes it a lot easier to run a c
- 3:56program
- 3:57uh to enter a c program and to see the
- 3:59results well namely it does have a
- 4:01screen display where we it can
- 4:04output the results such that we can
- 4:06conveniently view them
- 4:08it has a keyboard that enables us to
- 4:10enter things to input things into our
- 4:13computer and has storage it has
- 4:17disks inside in more modern computers it
- 4:19is typically a solid-state drive
- 4:22in some more older ones um we will
- 4:25typically encounter
- 4:27magnetic hard disk drives
- 4:30so what do we need to do in this module
- 4:32are a few steps
- 4:35you know the most importantly we're
- 4:36going to take a picture that we are
- 4:38reasonably familiar with now
- 4:39and we need to add input output first
- 4:43to that so we are going to study
- 4:47relatively briefly but hopefully
- 4:49effectively how do we add
- 4:51input output devices to our computer and
- 4:54that will provide a uniform way to hook
- 4:57up our screens
- 4:59keyboards and storage
- 5:04so that's what is going to happen here
- 5:06we are going to see how does the memory
- 5:08dram work and then how do we add storage
- 5:11and how do we work with the i o
- 5:15besides full fledged laptops
- 5:18there are many other simpler computers
- 5:22that are around us there is a number of
- 5:24them that are called
- 5:25single bore computers and one of them
- 5:28that is particularly popular
- 5:31that really opened up this space of
- 5:34single board computers
- 5:35is the raspberry pi so you can buy a
- 5:37raspberry pi i have a
- 5:38very many of them here is a raspberry pi
- 5:424 that you can buy for
- 5:4635 this one has a little bit more dram
- 5:49on it so it's a little bit more
- 5:52expensive you know 40 something dollars
- 5:55and you'll
- 5:56start noticing familiar things on it
- 6:00there is a processor on it and i'll
- 6:02click here
- 6:03processor is the silver thing in the
- 6:05middle
- 6:06there is a dram chip next to it and i
- 6:08put some thermal glue on it
- 6:10uh because i was using this one this
- 6:12black chip
- 6:13is the dram and that's our
- 6:16our main memory that's you know that
- 6:19that
- 6:20rectangle that we've been showing so far
- 6:22that's our memory we're going to see
- 6:23how do we work with that um then
- 6:26um our storage is going to be a flash
- 6:29card here we don't really have a solid
- 6:31state drive although we could hook up a
- 6:33solid state
- 6:34drive to it but the main memory here is
- 6:35a flash card like the one
- 6:37that we use in in
- 6:41cameras or music players
- 6:44and so on um then you know it's called a
- 6:48secure digital card or sd card in this
- 6:51case it's based on a
- 6:52so-called flash memory we'll talk a
- 6:54little bit more about that
- 6:56um then there is a
- 7:00screen i o we can hook up screens
- 7:03to these two hdmi ports we can
- 7:06add io in the form of a serial bus
- 7:10there are four um serial ios of
- 7:13in your universal serial bus type we can
- 7:16get
- 7:17add wired ethernet to it
- 7:20this thing supports wired ethernet and
- 7:22finally the silver chip
- 7:24is essentially wi-fi so we have wi-fi
- 7:28and bluetooth connectivity
- 7:29as other types of ios so we're going to
- 7:33take a look into the ways how these
- 7:35things
- 7:35actually do hook up to our processor
- 7:38and the picture is going to be fairly
- 7:40straightforward hopefully
- 7:42and uniform but when we do that when we
- 7:45add our i o to this fairly simple single
- 7:48board computer
- 7:50we have a real computer i mean you can
- 7:52actually
- 7:53run this class learn this class just by
- 7:55using a raspberry pi
- 7:58in this setup what we have we have a
- 8:00raspberry pi
- 8:01[Music]
- 8:02with two screens a keyboard
- 8:05and a mouse connected to it and it runs
- 8:09unix linux a form of linux
- 8:12and it and a whole bunch of applications
- 8:15that go with that
- 8:18even more than that you can actually
- 8:21learn
- 8:22computer architecture by examining
- 8:24things and running all the labs
- 8:26or many of the labs on raspberry pi
- 8:28there is actually a really good textbook
- 8:30that i really like that goes
- 8:32slightly below the level of what we
- 8:34cover in 61c
- 8:35um this is the the the book that is
- 8:39learning computer architecture with
- 8:40raspberry pi and by the way
- 8:42you can if you're a cal student you can
- 8:46download it for free from this address
- 8:47we are subscribed
- 8:49uh our library has infinite number of
- 8:51online copies of that book
- 8:53so feel free to take a look at it and
- 8:54browse to it
- 8:56we are not using it in this class
- 8:58because again conceptually it's a bit
- 9:02lower level and
- 9:05it is arm based so it's not as open as
- 9:09we would like it to be it's a little bit
- 9:11harder to build
- 9:12your arm type of processors
- 9:16um our labs would have been a lot more
- 9:18complicated will not have been able to
- 9:20accomplish
- 9:20as much but it has a really good
- 9:23treatment the book has really good
- 9:24treatment of how do you deal with these
- 9:27ios and memories and so on
- 9:29and how do you see the computer
- 9:33from the applications point of view
- 9:36os's point of view and how do you run
- 9:39things how do you hook up these input
- 9:41and output devices
- 9:43and there is a number of cool simple
- 9:44experiments that are in there
- 9:47one day when the single board computers
- 9:50they're based on risk five
- 9:52um are more affordable and more
- 9:54widespread there are some but
- 9:55they're a bit expensive if they're in
- 9:58this class
- 9:59or um if there are a lower class
- 10:02they don't just support exactly what we
- 10:04need beyond what we are doing in this
- 10:05class
- 10:06when these become a little bit more
- 10:07widespread i'm sure we are going to see
- 10:10um labs that are based on that
- 10:14so check it out for now so
- 10:19but there's another glitch here another
- 10:22quirk
- 10:23that we didn't quite cover um
- 10:27it's you know what we have done so far
- 10:29it's not really quite the same
- 10:31with what we are seeing on a raspberry
- 10:33pi computer or any other computer
- 10:36the screen in raspberry pi looks a lot
- 10:38different than what we get
- 10:40out of our venus in venus we just
- 10:43ran relatively short programs but we
- 10:46always ran
- 10:47a single program we could make it a lot
- 10:49bigger a lot more complicated but it was
- 10:50always just one computer
- 10:53but our computer runs many programs at
- 10:56the time a real computer runs many
- 10:57programs over time
- 10:59and what we'll do to try to convince you
- 11:01that changes to the hardware
- 11:03are minimal to be able to do this
- 11:07this whole thing is just software
- 11:11hardware is pretty much there you know a
- 11:13few minor things that need to be added
- 11:14but here and there
- 11:16and that magical software that does that
- 11:18is the operating system
- 11:20so you're going to get into the
- 11:21functions of the operating system just
- 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.