Thoughts on Operating System Course Design completion
Source: Internet
Author: User
Operating System Course Design-general Linux technology-Linux programming and kernel information. The following is a detailed description. Author: Chrysanthemum fragrance
After nearly three weeks of vacation, I finally completed the operating system curriculum design. This course design is one of the most difficult and time-consuming course designs I have ever encountered, for the first time, I wrote a 64-page experiment document with over 60% words (of course, is code ).
The design of the course was first started in December. At that time, the I/O device project of the Windows platform was completed in scattered time. At that time, we had to complete the experiment of the principle course, so we didn't have enough time to finish and think about the content of the question.
On the eve of the last semester's examination, after listening to instructor Yin's instruction, I decided to use Linux as the main development environment and select the file system project.
I would like to thank Mr. Yin for making suggestions on my selection and lend me some references. He suggested that I do two things: one is to modify the Linux kernel and delete the functions of the EXT2 file system; the other is to manually create the simplest file system.
At first, I planned to complete the former and thought it could be completed one week before the holiday. But it turns out that this is not feasible. This week is only enough for me to discuss with my teammates how to refine the selection and how to divide the work. However, due to the differences between my teammates and I, the integrity of the file system and the inconvenience of communication during the holidays make it difficult for us to work together to complete a file system. Teammates finally completed the kernel timer part. I think this is the biggest defect of this course design.
In the first week, I learned the overall framework of the EXT2 file system and some important kernel code, and completed the example in the document. Although the kernel compilation can be completed successfully, it may be because the system kernel in the document is 2.4.18 and 2.6.15 on my machine, the files and statements required in the instance, I cannot find it in my kernel code. For example, you need to modify include/linux/ext2_fs_sb.h In the instance, but this file does not exist in my kernel. More importantly, the instance needs to "struct ext2_inode_info…" in fs. h ..." Then add the statement, and the kernel code does not have this statement at all and cannot be inserted. After half of the work, I had to stop. Although not successful, I also learned about the EXT2 file system and what concepts of the principle course corresponding to the super block and I node. This is a combination of theory and practice and will be of great help to the subsequent work. More importantly, this made me interested in Linux kernel programming and hoped to participate in the study of typical operating system design and analysis.
Then, I decided to do it myself and complete a minimal File System by referring to the tutorial guide corresponding to the teaching material. This will encounter two difficulties: First, such a system (the system is designed with nearly 20 modules), requiring multi-file structure for programming, in order to make the program readable and modular, but I don't know how to make and makefile. This requires learning (in fact, I also want to learn how to program in a "simple" Linux ); second, no matter how small a file system is, it involves some basic typical algorithms and typical data structures. This file system involves the second-level file directory management method, the Group link method, the index structure, the system has opened the file table ......
Therefore, I learned how to use and make in Linux by referring to online materials. The most impressive thing is that due to the absence of tabs in makefile, make often says that there is a lack of delimiters; while reading the reference code, I also reviewed the discussion in the teaching material.
After a week, I understood the reference code, completed the design work, and started debugging. Debugging is a difficult task, especially in the "simple" environment of Linux, because there is no Debug for VC. I rely on gdb and print some important information to "live. Debugging was also the happiest during this time, although it had been debugging for nearly two days for an error. An error is often caused by multiple errors. One problem can be found, solved, and solved again ...... There is a kind of "interlocking" and "getting deeper and deeper" pleasure. I think debugging is a very interesting job. like Sherlock Holmes, we narrow down the inspection scope step by step until the problem is solved. Sometimes we have to go back to the document to check the overall design of the entire system.
Of course, my work still has some problems. These problems are still being corrected. For example, when you type read filename in the SHELL mode of the file system, an error occurs when the pointer is null ("segment error"). Due to technical issues and time issues, this error has not been resolved yet. It is estimated that some parameters have changed before the read function is called, for example, the Operation flag f_flag. In addition, the time is also improperly controlled throughout the completion process, resulting in a "loose before and after" situation, in the early stage of work did not hurry up, but the deadline for completion is imminent, just hurry up. However, it seems that the work efficiency is very high during this period of time, and sometimes people may have to force it out.
Through this course design, I am interested in further learning. I think this is the greatest achievement!
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.