Classic Os algorithm implementation
The following is to use the page replacement algorithm of the test directory as an example to illustrate the structure of this project
└─页面置换算法(测试)
├─golang
│ ├─.idea
│ └─lru
├─Java
│ └─com
│ └─dhx
│ ├─algorithms
│ │ └─lru
│ └─sample
└─Python
└─mx
├─algorithm
└─sample
The first level directory is the name of an algorithm in a certain aspect, such as a permutation algorithm, a scheduling algorithm, etc.
The second level directory is the specific language implementation of some aspect of algorithms, such as page permutation algorithm (test)
└─页面置换算法(测试)
├─golang
├─Java
└─Python
The third-level directory is generally the implementation code of the corresponding programming language, where the algorithms directory is stored as an algorithm implementation, and the sample directory (or file) is stored as an operation example.
If you find any problems during the process of browsing this repository, you are welcome to raise an issue and we welcome everyone to contribute to our projects.
- Pointing up problems does not necessarily mean code, but can be any problem. Even if there is a typo or something wrong with the format in the document, if you can help us point out problems or ask a pull request, we will warmly welcome it!
- If you want to pull request to this project, please be sure to browse the contribution process in advance
// multi-line comments, use /* ..*/ for shorter code blocks to represent the comment scope with blank lines, and use /*------ start: ------*/ /*-------- end: -------*/Java Programming Specification (Third Edition) Baidu Cloud Download (.pdf): https://pan.baidu.com/s/1Di5VN-FfFPate-_fBNiXqA
An overview of the ideal contribution workflow is as follows:
If you need to run golang code directly, switch the working directory to golang folder to make sure the code is correctly recognized by the compiler
└─页面置换算法(测试)
├─golang
If you need to run C++ code, switch the working directory to a C++ folder to make sure the code is correctly recognized by the compiler
If you are using CLion, please keep the version above 2023.1 or the latest, the lower version may not support single file compilation.
If you cannot use the latest version of CLion, you can also install the C/C++ Single File Execution plug-in after 2020.3 and right-click the code you need to run, and click Add executable for single c/cpp file. In this way, CLion will add the corresponding code to the CMakeLists.txt file and display the run button in the upper right corner. It is recommended to use the latest version, which is more convenient and does not require configuring CMake. You only need to click the green run button on the left side of main() to run.
If you are using VS code, you can run it by installing relevant plugins, or run related files using gcc/g++ through terminal