-
New to Minix
Hello everyone, I am a senior CS major starting an independent study
on operating systems in general and Minix in particular. This is the
first relatively large piece of code that I have encountered and it
can be a bit intimidating. I was hoping that maybe some of you who
have been working with Minix for a while could give me some advice as
to what things are important to understand starting out and what
things can be mastered later. Really any advice is welcome. I am
currently in chapter two of the Tanenbaum book. I plan on working
through chapters two and three this semester and chapters four and
five next semester. I also will be coming up with my own projects
along the way in order to apply what I have learned, so any
suggestions as to what may be a fun project to attempt would be
welcome as well. Any input will be greatly appreciated.
Thanks
-WS
-
Re: New to Minix
> Hello everyone, I am a senior CS major starting an independent study[color=blue]
> on operating systems in general and Minix in particular. This is the
> first relatively large piece of code that I have encountered and it
> can be a bit intimidating. I was hoping that maybe some of you who
> have been working with Minix for a while could give me some advice as
> to what things are important to understand starting out and what
> things can be mastered later. Really any advice is welcome. I am
> currently in chapter two of the Tanenbaum book. I plan on working
> through chapters two and three this semester and chapters four and
> five next semester. I also will be coming up with my own projects
> along the way in order to apply what I have learned, so any
> suggestions as to what may be a fun project to attempt would be
> welcome as well. Any input will be greatly appreciated.[/color]
If you have that little experience with reading source code, you would
do well to find out first what the code is doing and then attempt to
understand how it is achieving that.
I would recommend the following procedure:
1) Fast-track your reading of Tanenbaum, reading the entire book before
starting out with the source code. This will give you more of an
idea
of what is happening.
2) Run Minix and experiment with it. Write some small programs running
in Minix. Minix programming is essentially the same as Linux
programming, except that you have to be more standards compliant.
This exercise is useful in itself and it helps you understand what
the OS is doing for you.
3) Start reading code, re-reading the appropriate sections of the
Tanenbaum book at the same time. First take a global overview,
looking which binaries are created (kernel, fs, pm, ...), where you
can find their code and what their functions are. Start looking
deeper at the parts that interest you most (I found the kernel most
interesting, but keep in mind that this part requires that you
understand assembly). First check what each source file is doing,
then start looking at the most relevant functions in them.
--
With kind regards,
Erik van der Kouwe
-
Re: New to Minix
On Jul 15, 6:10 am, "Erik van der Kouwe" <vdkouwe <at> few.vu.nl>
wrote:[color=blue][color=green]
> > Hello everyone, I am a senior CS major starting an independent study
> > on operating systems in general and Minix in particular. This is the
> > first relatively large piece of code that I have encountered and it
> > can be a bit intimidating. I was hoping that maybe some of you who
> > have been working with Minix for a while could give me some advice as
> > to what things are important to understand starting out and what
> > things can be mastered later. Really any advice is welcome. I am
> > currently in chapter two of the Tanenbaum book. I plan on working
> > through chapters two and three this semester and chapters four and
> > five next semester. I also will be coming up with my own projects
> > along the way in order to apply what I have learned, so any
> > suggestions as to what may be a fun project to attempt would be
> > welcome as well. Any input will be greatly appreciated.[/color]
>
> If you have that little experience with reading source code, you would
> do well to find out first what the code is doing and then attempt to
> understand how it is achieving that.
>
> I would recommend the following procedure:
>
> 1) Fast-track your reading of Tanenbaum, reading the entire book before
> starting out with the source code. This will give you more of an
> idea
> of what is happening.
>
> 2) Run Minix and experiment with it. Write some small programs running
> in Minix. Minix programming is essentially the same as Linux
> programming, except that you have to be more standards compliant.
> This exercise is useful in itself and it helps you understand what
> the OS is doing for you.
>
> 3) Start reading code, re-reading the appropriate sections of the
> Tanenbaum book at the same time. First take a global overview,
> looking which binaries are created (kernel, fs, pm, ...), where you
> can find their code and what their functions are. Start looking
> deeper at the parts that interest you most (I found the kernel most
> interesting, but keep in mind that this part requires that you
> understand assembly). First check what each source file is doing,
> then start looking at the most relevant functions in them.
>
> --
> With kind regards,
> Erik van der Kouwe[/color]
Thanks for the response. I do have a few years experience reading
source code, just not at this level. The things I've worked through
up to this point have been typical CS textbook examples and
programming projects, generally between a couple hundred and a
thousand lines of code all contained in a handful of files. The
largest project I've worked on before this was an assembly program
that was just over 2000 lines. So do you think it is necessary to
read through the entire book before starting on the code or would it
be feasible to read through a chapter and then look at its code before
moving on to the next? That is the approach I have been planning on
taking. At present I almost finished with chapter two, and while I
feel I have a pretty good grasp on what is going on, I do find myself
glazing over when I run into the details. Again, I really appreciate
the feedback.
-WS
-
Re: New to Minix
> So do you think it is necessary to[color=blue]
> read through the entire book before starting on the code or would it
> be feasible to read through a chapter and then look at its code before
> moving on to the next? That is the approach I have been planning on
> taking. At present I almost finished with chapter two, and while I
> feel I have a pretty good grasp on what is going on, I do find myself
> glazing over when I run into the details.[/color]
Well, it all depends on what you would like to learn from Minix.
If you are wondering about something specific like "how would one
perform a context switch?" then go right ahead: dive into the code,
knowing what you are hoping to find out. If you have a clear target you
should not get lost in the details, as you know which details do matter
for you and which do not.
If you want to learn about how operating systems work in general -
which is what I expect given the situation you described - I think
reading the code should be your last priority. Although Minix is very
small for an operating system, it is really much too large to read line
by line.
When you read the book, you should get some idea of which parts make up
Minix and how they interact. Once you get the feeling this is the case,
you should know what specific implementation details are of interest to
you, which means you can apply paragraph 2 of my post. This is the
point where reading code becomes useful. Whether this occurs after
reading the entire book or after reading just a few chapters is
something you should determine for yourself, but I would expect that
the more you have read at this point, the better you will understand
the code.
--
With kind regards,
Erik van der Kouwe