Page 1 of 2

Why is kernel placed at 1M in Bare Bones tutorial

Posted: Mon May 27, 2013 2:05 pm
by gsingh2011
If I understand correctly, in the bare bones tutorial we load the kernel at 1 MB. But we haven't switched to protected mode yet, and in real mode we can only access up to 1 MB, right? So how can we load our kernel at 1 MB?

Re: Why is kernel placed at 1M in Bare Bones tutorial

Posted: Mon May 27, 2013 2:51 pm
by bluemoon
By temporary switch to protected mode(recommended), or unreal mode; do the copy, and switch back to real mode.

Re: Why is kernel placed at 1M in Bare Bones tutorial

Posted: Mon May 27, 2013 3:21 pm
by sortie
The Bare Bones tutorial assume you are loading a multiboot kernel with GRUB. It will do whatever tricks you need to load a kernel (such as entering protected mode). This tutorial is not a follow-up to a bootloader tutorial.

Re: Why is kernel placed at 1M in Bare Bones tutorial

Posted: Mon May 27, 2013 3:48 pm
by gsingh2011
sortie wrote:The Bare Bones tutorial assume you are loading a multiboot kernel with GRUB. It will do whatever tricks you need to load a kernel (such as entering protected mode). This tutorial is not a follow-up to a bootloader tutorial.
Ok, thanks. It would be nice if this was at least mentioned, so people like me who've read about real mode and protected mode understand what's going on.

Re: Why is kernel placed at 1M in Bare Bones tutorial

Posted: Mon May 27, 2013 4:31 pm
by Love4Boobies
You mean you should actually read the tutorial. It obviously mentions this.

Re: Why is kernel placed at 1M in Bare Bones tutorial

Posted: Mon May 27, 2013 5:27 pm
by gsingh2011
Love4Boobies wrote:You mean you should actually read the tutorial. It obviously mentions this.
You're right. I have a bad habit of skipping prefaces, sorry.

Re: Why is kernel placed at 1M in Bare Bones tutorial

Posted: Mon May 27, 2013 5:58 pm
by Love4Boobies
Don't feel bad. The purpose of tutorials is to spoonfeed the ignorant with introductory material so as to think they've actually accomplished something. Just because you've failed such a simple task doesn't mean you would have learned anything by succeeding.

Re: Why is kernel placed at 1M in Bare Bones tutorial

Posted: Tue May 28, 2013 5:52 am
by Prochamber
Love4Boobies wrote:Don't feel bad. The purpose of tutorials is to spoonfeed the ignorant with introductory material so as to think they've actually accomplished something. Just because you've failed such a simple task doesn't mean you would have learned anything by succeeding.
Wait a minute, tutorials aren't that bad.
The word "tutor" in tutorial indicates their purpose is to teach not to spoonfeed.
Everyone needs to start somewhere.

Re: Why is kernel placed at 1M in Bare Bones tutorial

Posted: Tue May 28, 2013 8:45 am
by gsingh2011
Prochamber wrote:
Love4Boobies wrote:Don't feel bad. The purpose of tutorials is to spoonfeed the ignorant with introductory material so as to think they've actually accomplished something. Just because you've failed such a simple task doesn't mean you would have learned anything by succeeding.
Wait a minute, tutorials aren't that bad.
The word "tutor" in tutorial indicates their purpose is to teach not to spoonfeed.
Everyone needs to start somewhere.
That's true. The first time I got my kernel to boot using the bare bones tutorial was when I was 15. I wouldn't have been able to do it if there wasn't a site like OSDev.

Re: Why is kernel placed at 1M in Bare Bones tutorial

Posted: Tue May 28, 2013 10:50 am
by Love4Boobies
Prochamber wrote:Wait a minute, tutorials aren't that bad.
I was being a little bit sarcastic. Even if tutorials are not necessarily evil by nature, they are almost always misused. If anything, they should serve as simple implementation examples to those who have already studied the subject. If anything in a tutorial is fresh information to you, you are doing something wrong. Due to the fact that they're so short, they leave out pretty much everything, yet give newbies the illusion that they've covered a lot of ground. Here are some of the dangers of their ignorance:
  • They remain unaware of the tutorial's subtleties (e.g., if you search through the OP's posts, you will notice some of the confusion).
  • They remain unaware of alternatives.
  • They get stuck after the tutorial, unless there is a follow-up. They never learn to become self-reliant, which is a pitty considering that tutorials on more advanced topics don't really exist.
Perhaps the above points are better illustrated by an analogy: Do you believe a tutorial on configuring routers can teach networking?
Prochamber wrote:The word "tutor" in tutorial indicates their purpose is to teach not to spoonfeed.
That's not a very good argument. Despite its name, computer science is neither a science nor the study of computers.
Prochamber wrote:Everyone needs to start somewhere.
Indeed. However, that somewhere shouldn't de a tuturial. They make lousy primary sources of information.

Re: Why is kernel placed at 1M in Bare Bones tutorial

Posted: Tue May 28, 2013 3:17 pm
by Kevin
Love4Boobies wrote:Perhaps the above points are better illustrated by an analogy: Do you believe a tutorial on configuring routers can teach networking?
Did you learn everything about networking before you first used a network?

Re: Why is kernel placed at 1M in Bare Bones tutorial

Posted: Tue May 28, 2013 3:32 pm
by Love4Boobies
My point is not to learn everything. My point is that tutorials don't have enough information to serve as proper learning materials. Tutorials are what I am criticizing.

Re: Why is kernel placed at 1M in Bare Bones tutorial

Posted: Tue May 28, 2013 5:01 pm
by Prochamber
Love4Boobies wrote:
Prochamber wrote:Wait a minute, tutorials aren't that bad.
I was being a little bit sarcastic. Even if tutorials are not necessarily evil by nature, they are almost always misused. If anything, they should serve as simple implementation examples to those who have already studied the subject. If anything in a tutorial is fresh information to you, you are doing something wrong. Due to the fact that they're so short, they leave out pretty much everything, yet give newbies the illusion that they've covered a lot of ground. Here are some of the dangers of their ignorance:
  • They remain unaware of the tutorial's subtleties (e.g., if you search through the OP's posts, you will notice some of the confusion).
  • They remain unaware of alternatives.
  • They get stuck after the tutorial, unless there is a follow-up. They never learn to become self-reliant, which is a pitty considering that tutorials on more advanced topics don't really exist.
You make quite good points, that the makers of tutorials don't expect them to be used as a sole resource. However I disagree that they are menu to be used by those that have already studied the subject. Most tutorials aim to get you started at something and are aimed at someone who has little or no experience in the subject.
Love4Boobies wrote:
Prochamber wrote:Everyone needs to start somewhere.
Indeed. However, that somewhere shouldn't be a tutorial. They make lousy primary sources of information.
You are correct in saying that if you have experience in operating system development you shouldn't be using tutorials. However what about people who don't, if not a tutorial then what should it be? Newbies have little knowledge in the subject so there are not many resources they can use. They don't want to buy books, technical articles are full of words they don't know, forums care little about seemingly obvious questions, reading code from other is hard if you have no background in its purpose and figuring it out for yourself can only be done if you have a basis to work on. It would seem like tutorials are the only way to get started.

Re: Why is kernel placed at 1M in Bare Bones tutorial

Posted: Tue May 28, 2013 11:55 pm
by fronty
Prochamber wrote:However what about people who don't, if not a tutorial then what should it be? Newbies have little knowledge in the subject so there are not many resources they can use.
Books, course materials, or even a course if possible. There are many books on the subject, at least several quite usable. Many universities have course materials freely available, and if the newbie is studying software technology in university, there's a good chance he has to take at least one or more OS course. I think there's lots of good resources they can use.

Re: Why is kernel placed at 1M in Bare Bones tutorial

Posted: Wed May 29, 2013 1:28 am
by leejbaxter
I agree and disagree...

In my opinion, tutorials are kinda dumbed-down hands-on sources of information; they absolutely shouldn't be used as a sole source of information for a newbie, but they should be used as the first!!! Tutorials tend to provide a minimal amount of information about a topic, but they explain it in plain English, and they provide a means to allow the keen learner to get their feet wet before they go about searching for more in-depth sources of information (which online tutorials often contain links to).

Its like one of the posters mentioned; a newbie has to begin somewhere, and a tutorial is the best place! I've found that's the best way to learn; find a tutorial to pick up the basics and get your feet wet, then when you're comfortable follow the path to more in-depth information and start to experiment...