Open
Conversation
yanyusong57
added a commit
to yanyusong57/ysyx_en
that referenced
this pull request
Oct 2, 2023
yifeifang
reviewed
Oct 2, 2023
|
|
||
| #### The story of the birth of the world - Chapter 3 | ||
|
|
||
| The von Neumann computer was indeed so powerful that it was able to give new life to cold gate circuits. In order to allow the computer to automatically run a set of programs, the pioneers improved the computer. |
Owner
There was a problem hiding this comment.
Suggested change
| The von Neumann computer was indeed so powerful that it was able to give new life to cold gate circuits. In order to allow the computer to automatically run a set of programs, the pioneers improved the computer. | |
| The von Neumann computer was indeed so powerful that it was able to bring the gate circuits to life. In order to allow the computer to automatically run a set of programs, the pioneers improved the computer. |
| @@ -0,0 +1,26 @@ | |||
| [#](#A Journey Through Time: Batch Processing System) PA3 - A Journey Through Time: Batch Processing System | |||
|
|
||
| #### Submission Requirements (please read the following carefully, if you violate it, you will be responsible for the consequences) | ||
|
|
||
| **Expected average time to completion**: 40小时 |
Owner
There was a problem hiding this comment.
Suggested change
| **Expected average time to completion**: 40小时 | |
| **Expected average time to completion**: 40 hours |
| **Tasks to-do**: | ||
|
|
||
| * task PA3.1: Implement self-trap operation`yield()` | ||
| * task PA3.2: Implement the loading and system calling of user programs, and support the running of TRM programs |
Owner
There was a problem hiding this comment.
Suggested change
| * task PA3.2: Implement the loading and system calling of user programs, and support the running of TRM programs | |
| * task PA3.2: Implement the loading of guest program and system calls, and support execution of TRM programs. |
|
|
||
| * task PA3.1: Implement self-trap operation`yield()` | ||
| * task PA3.2: Implement the loading and system calling of user programs, and support the running of TRM programs | ||
| * task PA3.3: Run Xian Jian Qi Xia Zhuan (also called Chinese PAL) and Fairy and demonstrate the batch processing system, and submit a complete experimental report No newline at end of file |
Owner
There was a problem hiding this comment.
Suggested change
| * task PA3.3: Run Xian Jian Qi Xia Zhuan (also called Chinese PAL) and Fairy and demonstrate the batch processing system, and submit a complete experimental report | |
| * task PA3.3: Run Xian Jian Qi Xia Zhuan (also called Chinese PAL) and demonstrate the batch processing system, and submit a complete lab report |
|
|
||
| Such a background program is actually an operating system. Yes, you heard it right, this background program that sounds like it does nothing is really an operating system! Speaking of operating systems, you may immediately think of Windows with several GB of installation packages. But in fact, the earliest operating system [GM-NAA I](https://en.wikipedia.org/wiki/GM-NAA_I/O) put into use in history was born in 1956, and one of its main tasks is to Go to "Automatically load new programs". | ||
|
|
||
| #### What is an operating system? (It is recommended to think about it in the second trail) |
Owner
There was a problem hiding this comment.
Suggested change
| #### What is an operating system? (It is recommended to think about it in the second trail) | |
| #### What is an operating system? (It is recommended to think about it in the second round) |
| bash init.sh nanos-lite | ||
|
|
||
|
|
||
| Nanos-lite contains all modules used in subsequent PAs, but the specific functions of most modules have not been implemented. Since the functions of the hardware (NEMU) are gradually added, Nanos-lite must also cooperate with this process. You will use some macros in `nanos-lite/include/common.h` which are used to control the functions of Nanos-lite during the experiment. As the experimental progress progresses, we will gradually explain all the modules, and Nanos-lite will do more and more work. Therefore, when reading the code of Nanos-lite, you only need to care about the modules related to the current progress, and do not get entangled in the code that is not related to the current progress. |
Owner
There was a problem hiding this comment.
Suggested change
| Nanos-lite contains all modules used in subsequent PAs, but the specific functions of most modules have not been implemented. Since the functions of the hardware (NEMU) are gradually added, Nanos-lite must also cooperate with this process. You will use some macros in `nanos-lite/include/common.h` which are used to control the functions of Nanos-lite during the experiment. As the experimental progress progresses, we will gradually explain all the modules, and Nanos-lite will do more and more work. Therefore, when reading the code of Nanos-lite, you only need to care about the modules related to the current progress, and do not get entangled in the code that is not related to the current progress. | |
| Nanos-lite contains all modules used in subsequent PAs, but the functionality of most modules has not yet been implemented. Since the functionality of the hardware (NEMU) are gradually added, Nanos-lite must align with it. You will use some macros in `nanos-lite/include/common.h` which controls the feature set based on your progress. As the lab progresses, we will gradually explain all the modules, and Nanos-lite will do more and more work. Therefore, when reading the code of Nanos-lite, you only need to care about the modules related to the current progress, and do not get trapped in the code that is not related to the current progress. |
| └── syscall.c # System call handling | ||
|
|
||
|
|
||
| It should be reminded that Nanos-lite runs on AM, and AM’s APIs are available in Nanos-lite. Although the operating system is a special concept to us, from AM's perspective, it is just an ordinary C program that calls the AM API, no different from Super Mario. At the same time, you will once again realize the benefits of AM: the implementation of Nanos-lite can be architecture-independent, which means that no matter which ISA you have chosen before, you can easily run Nanos-lite, and even you can Just like developing klib, debug your Nanos-lite on `native`. |
Owner
There was a problem hiding this comment.
Suggested change
| It should be reminded that Nanos-lite runs on AM, and AM’s APIs are available in Nanos-lite. Although the operating system is a special concept to us, from AM's perspective, it is just an ordinary C program that calls the AM API, no different from Super Mario. At the same time, you will once again realize the benefits of AM: the implementation of Nanos-lite can be architecture-independent, which means that no matter which ISA you have chosen before, you can easily run Nanos-lite, and even you can Just like developing klib, debug your Nanos-lite on `native`. | |
| It should be reminded that Nanos-lite runs on AM, and AM’s APIs are available in Nanos-lite. Although the operating system is a special concept to us, from AM's perspective, it is just an ordinary C program that calls the AM API, no different from Super Mario. At the same time, you will once again realize the benefits of AM: the implementation of Nanos-lite can be architecture-independent, which means that no matter which ISA you have chosen before, you can easily run Nanos-lite on it, further more you can debug your `Nanos-lite` in `native` mode just like what you did for `klib`. |
|
|
||
| It should be reminded that Nanos-lite runs on AM, and AM’s APIs are available in Nanos-lite. Although the operating system is a special concept to us, from AM's perspective, it is just an ordinary C program that calls the AM API, no different from Super Mario. At the same time, you will once again realize the benefits of AM: the implementation of Nanos-lite can be architecture-independent, which means that no matter which ISA you have chosen before, you can easily run Nanos-lite, and even you can Just like developing klib, debug your Nanos-lite on `native`. | ||
|
|
||
| In addition, although it will not cause obvious misunderstandings, after the introduction of Nanos-lite, we will still use the concept of "user process" instead of "user program" in some places. If you can't understand what a process is now, you only need to understand the process as a "running program". Still can’t feel the difference between the two? Let’s give a simple example. If you open Notepad three times, there will be three Notepad processes running on the computer, but there is only one Notepad program on the disk. Process is an important concept in the operating system. Detailed knowledge about processes will be introduced in the operating system class. |
Owner
There was a problem hiding this comment.
Suggested change
| In addition, although it will not cause obvious misunderstandings, after the introduction of Nanos-lite, we will still use the concept of "user process" instead of "user program" in some places. If you can't understand what a process is now, you only need to understand the process as a "running program". Still can’t feel the difference between the two? Let’s give a simple example. If you open Notepad three times, there will be three Notepad processes running on the computer, but there is only one Notepad program on the disk. Process is an important concept in the operating system. Detailed knowledge about processes will be introduced in the operating system class. | |
| In addition, although it will not cause obvious misunderstandings, after the introduction of Nanos-lite, we will still use the concept of "guest process" instead of "guest program" in some places. If you can't understand what a process is now, you only need to understand the process as a "running program". Still can’t feel the difference between the two? Let’s give a simple example. If you open Notepad three times, there will be three Notepad processes running on the computer, but there is only one Notepad program on the disk. Process is an important concept in the operating system. Detailed knowledge about processes will be introduced in the operating system class. |
|
|
||
| In addition, although it will not cause obvious misunderstandings, after the introduction of Nanos-lite, we will still use the concept of "user process" instead of "user program" in some places. If you can't understand what a process is now, you only need to understand the process as a "running program". Still can’t feel the difference between the two? Let’s give a simple example. If you open Notepad three times, there will be three Notepad processes running on the computer, but there is only one Notepad program on the disk. Process is an important concept in the operating system. Detailed knowledge about processes will be introduced in the operating system class. | ||
|
|
||
| At the beginning, all macros related to the experimental progress in `nanos-lite/include/common.h` are not defined. At this time, the function of Nanos-lite is very simple. Let's briefly sort out the current behavior of Nanos-lite: |
Owner
There was a problem hiding this comment.
Suggested change
| At the beginning, all macros related to the experimental progress in `nanos-lite/include/common.h` are not defined. At this time, the function of Nanos-lite is very simple. Let's briefly sort out the current behavior of Nanos-lite: | |
| At the beginning, all macros related to the experimental progress in `nanos-lite/include/common.h` are not defined. Currently, the functionality of Nanos-lite is amazingly simple. Let's briefly sort out the current behavior of Nanos-lite: |
yifeifang
reviewed
Oct 10, 2023
|
|
||
| At the beginning, all macros related to the experimental progress in `nanos-lite/include/common.h` are not defined. At this time, the function of Nanos-lite is very simple. Let's briefly sort out the current behavior of Nanos-lite: | ||
|
|
||
| 1. Print the logo of Project-N, and output hello information and compilation time through `Log()`. It should be noted that the `Log()` macro defined in Nanos-lite is not the `Log()` macro defined in NEMU . Nanos-lite and NEMU are two independent projects, and their codes will not affect each other. You need to pay attention to this when reading the code. In Nanos-lite, the `Log()` macro outputs through the `printf()` you wrote in `klib`, which will eventually call TRM's `patch()`. |
Owner
There was a problem hiding this comment.
Suggested change
| 1. Print the logo of Project-N, and output hello information and compilation time through `Log()`. It should be noted that the `Log()` macro defined in Nanos-lite is not the `Log()` macro defined in NEMU . Nanos-lite and NEMU are two independent projects, and their codes will not affect each other. You need to pay attention to this when reading the code. In Nanos-lite, the `Log()` macro outputs through the `printf()` you wrote in `klib`, which will eventually call TRM's `patch()`. | |
| 1. Print the logo of Project-N, and output hello information and compilation time through `Log()`. It should be noted that the `Log()` macro defined in Nanos-lite is not the `Log()` macro defined in NEMU . Nanos-lite and NEMU are two independent projects, and their codes will not affect each other. You need to pay attention to this when reading the code. In Nanos-lite, the `Log()` macro write to console through the `printf()` you wrote in `klib`, which will eventually call TRM's `patch()`. |
|
|
||
| #### The operating system is a C program | ||
|
|
||
| You may not believe it, but the .c and .h files of the framework code undoubtedly contain this ironclad fact, and there is nothing special about even the compilation method. The same is true for GNU/Linux: If you read it If you look at the source code, you will find that GNU/Linux is just a huge C program. |
Owner
There was a problem hiding this comment.
Suggested change
| You may not believe it, but the .c and .h files of the framework code undoubtedly contain this ironclad fact, and there is nothing special about even the compilation method. The same is true for GNU/Linux: If you read it If you look at the source code, you will find that GNU/Linux is just a huge C program. | |
| You may not believe it, but the .c and .h files of the framework code undoubtedly contain this ironclad fact, and there is nothing special about even the compilation method. The same statement holds true for GNU/Linux if you look at the source code, you will find that GNU/Linux is just a huge C program. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PA3.1 translated