Browse Source

Typos and grammer improvements before Part 1

pull/20/head
Ali Çehreli 3 years ago
parent
commit
5ea419e86e
2 changed files with 52 additions and 52 deletions
  1. 30
    30
      README.md
  2. 22
    22
      book_src/Operating System From 0 to 1.lyx

+ 30
- 30
README.md View File

@@ -7,7 +7,7 @@ Operating System: From 0 to 1
This book helps you gain the foundational knowledge required to write an
operating system from scratch. Hence the title, 0 to 1.

After completing this book, at the very least:
After completing this book, at the very least you will learn:

- How to write an operating system from scratch by reading hardware datasheets.
In the real world, it works like that. You won't be able to consult Google for
@@ -18,12 +18,12 @@ After completing this book, at the very least:
- Write code independently. It's pointless to copy and paste code. Real learning
happens when you solve problems on your own. Some examples are given to kick
start, but most problems are yours to conquer. However, the solutions are
available online for you to examine after giving a good try.
available online for you to examine after giving it a good try.

- Linux as a development environment and how to use common tools for low-level
programming.

- Understand x86 assembly in-depth.
- x86 assembly in-depth.

- How a program is structured so that an operating system can run.

@@ -39,17 +39,17 @@ After completing this book, at the very least:
> You give a poor man a fish and you feed him for a day. You teach him to fish
> and you give him an occupation that will feed him for a lifetime.

This is the guiding principle of the book when I was writing it. The book does
This has been the guiding principle of the book when I was writing it. The book does
not try to teach you everything, but enough to enable you to learn by yourself.
The book itself, at this point, is quite "complete": once you master part 1 and
part 2 (which consist of 8 chapters), you can drop the book and learn by
yourself. At this point, a smart reader should be able to continue on his own.
For example, he can continue his journey
yourself. At this point, smart readers should be able to continue on their own.
For example, they can continue their journeys
on [OSDev wiki](http://wiki.osdev.org/Main_Page); in fact, after you study
everything in part 1 and part 2, you only meet
the [minimum requirement](http://wiki.osdev.org/Required_Knowledge) by OSDev
Wiki (well, not quite, the book actually goes deeper for the suggested topics).
Or, if he considers developing an OS for fun is impractical, he can continue
Or, if you consider developing an OS for fun is impractical, you can continue
with a Linux-specific book, such as this free
book [Linux Insiders](https://0xax.gitbooks.io/linux-insides/content/), or other
popular Linux kernel books. The book tries hard to provide you a strong
@@ -57,26 +57,26 @@ foundation, and that's why part 1 and part 2 were released first.

The book teaches you core concepts, such as x86 Assembly, ELF, linking and
debugging on bare metal, etc., but more importantly, where such information
comes from. For example, instead of just teaching x86 Assembly, it also teaches
you how to use the reference manuals from Intel. Learning to read the official
come from. For example, instead of just teaching x86 Assembly, it also teaches
how to use reference manuals from Intel. Learning to read the official
manuals is important because only the hardware manufacturers themselves
understand how their hardware work. If you only learn from the secondary
resources because it is easier, you will never gain a complete understating of
the hardware you are programming for. Have you ever read a book on Assembly, and
wonder where does all the information come from? How does the author know
wondered where all the information came from? How does the author know
everything he says is correct? And how one seems to magically know so much about
hardware programming? The book gives a pointer to such questions.
hardware programming? This book gives pointers to such questions.

As an example, you should skim through chapter 4, "x86 Assembly and C", to see
how it makes use of the Intel manual, Volume 2, when explaining stuffs. And in
how it makes use of the Intel manual, Volume 2. And in
the process, it guides you how to use the official manuals.

Part 3 is planned as a series of specifications that a reader will implement to
complete each operating system component. It will not contain code, aside from a
few examples. Part 3 is just there to shorten the reader's time from read the
complete each operating system component. It does not contain code aside from a
few examples. Part 3 is just there to shorten the reader's time when reading the
official manuals by giving hints where to read, explaining difficult concepts
and how to use the manuals to debug. In sum, the implementation, is up to the
reader to work on his own; the chapters are just like university assignments.
and how to use the manuals to debug. In short, the implementation is up to the
reader to work on his or her own; the chapters are just like university assignments.

# Prerequisites

@@ -84,33 +84,33 @@ Know some circuit concepts:
+ Basic Concepts of Electricity: atom, electrons, proton, neutron, current flow.
+ Ohm law

However, if you know absolute nothing, you can quickly learn it here:
However, if you know absolutely nothing about electricity, you can quickly learn it here:
<http://www.allaboutcircuits.com/textbook/>, by reading chapter 1 and chapter 2.

Know some C programming. In particular:

- Variable and functions declaration/definitions
- Variable and function declarations and definitions

- While and for loops.
- While and for loops

- Understand how pointers work.
- How pointers work

- Fundamentals of algorithm and data structure in C.
- Fundamentals of algorithms and data structures in C

Know Linux basics:

- Know how to navigate directories with the command line
- How to navigate directories on the command line

- Know how to invoke a command with options.
- How to invoke a command with options

- Know how to pipe output to another program.
- How to pipe a program's output to another program

Know how to touch type. Since we are going to use Linux, touch typing helps. I
know typing speed does not relate to problem -solving, but at least the speed
should be fast enough not to let it get it the way and degrade the learning
should be fast enough not to let it get in the way and degrade the learning
experience.

In general, I assume that a reader acquired basic programming knowledge with C,
In general, I assume that the reader has acquired basic knowledge of programming with C,
and can use an IDE at its basic. That is, know how to press the Play button for
building and running a program.

@@ -131,8 +131,8 @@ building and running a program.
- Chapter 11: Incomplete
- Chapter 12: Incomplete
- Chapter 13: Incomplete
... and more future chapters not included yet ...
... and future chapters not included yet ...

In the future, I hope to expand part 3 to cover more than the first 2 parts. But
for the time being, I will try to finish the above chapters first.
@@ -153,7 +153,7 @@ Paging and I/O are not yet implemented. I will try to implement it as the book p

# Contributing

If you find any grammatical issue, please report it using Github issue. Or, if
If you find any grammatical issue, please report it using Github Issues. Or, if
some sentence or paragraph is difficult to understand, feel free to open an
issue with the following title format: `[page number][type] Descriptive Title`.

@@ -171,7 +171,7 @@ content of the book is in the file "Operating System: From 0 to 1.lyx". You can
use [Lyx editor](https://www.lyx.org) to edit it, or any editor that can
understand Latex.

The book is in development, so please bear with me if the English irritates you.
The book is in development, so please bear with me if the English irritates you.
I really appreciate it.

Finally, if you like the project and if it is possible, please donate to help

+ 22
- 22
book_src/Operating System From 0 to 1.lyx View File

@@ -806,7 +806,7 @@ Part
\begin_inset space ~
\end_inset
1 provides a foundation for learning operating system.
1 provides a foundation for learning operating systems.
\end_layout
\begin_deeper
@@ -830,16 +830,16 @@ Chapter 3 provides a general architecture of a computer, then introduces
\begin_layout Itemize
Chapter 4 introduces the x86 assembly language through the use of the Intel
manuals along with commonly used instructions.
The chapter gives detailed examples how high-level syntax corresponds to
low-level assembly, thus enabling a reader to read generated assembly code
The chapter gives detailed examples of how high-level syntax corresponds to
low-level assembly, thus enabling the reader to read generated assembly code
comfortably.
It is necessary to read assembly code when debugging an operating system.
\end_layout
\begin_layout Itemize
Chapter 5 dissects ELF in detail.
Only by understanding how the structure of a program at the binary level,
a reader can build one that runs on the bare metal by manipulating its
Only by understanding the structure of a program at binary level
the reader can build one that runs on bare metal by manipulating its
structure.
\end_layout
@@ -849,12 +849,12 @@ Chapter 6 introduces
gdb
\family default
debugger with extensive examples for commonly used commands.
After a reader is acquainted with
After acquainting the reader with
\family typewriter
gdb
\family default
, it then provides insight on how a debugger works.
This knowledge is essential for building a debug-able program on the bare
This knowledge is essential for building a debuggable program on the bare
metal.
\end_layout
@@ -866,7 +866,7 @@ Part
\end_inset
2 presents how to write a bootloader to bootstrap a kernel.
Hence, the name
Hence the name
\begin_inset Quotes eld
\end_inset
@@ -875,9 +875,9 @@ Groundwork
\end_inset
.
After mastering this part, a reader can either continue with the next part
that guides the reader how to write an operating system by himself.
However, if the reader does not like the presentation, he can look elsewhere,
After mastering this part, the reader can either continue with the next part
that is a guide on writing an operating system.
However, if the reader does not like the presentation, he or she can look elsewhere,
such as OSDev Wiki:
\begin_inset Flex URL
status open
@@ -895,20 +895,20 @@ http://wiki.osdev.org/
\begin_deeper
\begin_layout Itemize
Chapter 7 introduces to bootloader, how to write one in assembly and then
Chapter 7 introduces the bootloader, explains how to write one in assembly, and how to
load it on QEMU, a hardware emulator.
This process involves typing repetitive and long commands, so GNU Make
is applied to improve the productivity by automating the repetitive parts
and simpler the interaction with the project.
and simplifying the interaction with the project.
This chapter also demonstrates the use of GNU Make in context.
\end_layout
\begin_layout Itemize
Chapter 8 introduces linking by explaining the relocation process when combining
object files.
Then, this is the last piece of the puzzle required to build debuggable
programs on bare metal, include the bootloader and an operating system
written in C.
In addition to a bootloader and an operating system written in C,
linking is the last piece of the puzzle required to build debuggable
programs on bare metal.
\end_layout
\end_deeper
@@ -918,14 +918,14 @@ Part
\end_inset
3 provides guidance on how to write an operating system.
Only guidance, since a reader should implement on his own and be proud
of his creation.
Only guidance, since the reader should implement it on his or her own and be proud
of this creation.
The guidance consists of a simpler and coherent explanation of necessary
concepts, from hardware to software, to implement a feature of an operating
concepts, from hardware to software, to implement the features of an operating
system.
Without the guidance, a reader spends more time gathering information spread
through different parts of various documents and on the Internet.
It then provides a plan on how to map the concepts to code.
Without this guidance, the reader would spend more time gathering information spread
throughout different parts of various documents, some on the Internet.
The chapter then provides a plan on how to map concepts to code.
\end_layout
\begin_layout Section*

Loading…
Cancel
Save