Beijing Institute of Electronic Technology (BESTI)
Real Inspection report
Course: Information Security system Design Basic class: 1352 classes
Name: Zilleson He Weizin
Study Number: 20135203 20135217 20135223
Score: Instructor: Lou Jia Peng Experimental Date: 2015.11.17
Experimental classification: No preview degree: Experimental time: 15:30~18:00
Instrument Group: Compulsory/Elective: compulsory Test number: 2
Experiment Name: Firmware design
Objectives and Requirements: Objective: To understand the basic principles of multi-thread programming.
Learn the use of Pthread library functions.
Content: Read the source code of PTHREAD.C, familiar with the use of several important pthread library functions. Learn how to use shared locks and semaphores. Enter the/arm2410cl/exp/basic/02_pthread directory, run make to generate the Pthread program, and use NFS to connect to the development host to run the experiment.
Experimental instrument:
Name |
Model |
Number |
Pc |
Association |
1 |
Embedded experimental Platform |
Up-tech s2410/p270 DVP |
1 |
Experiment contents, steps and experience:
- The understanding of the experiment process, the understanding of the knowledge point in the experiment instruction book.
(1) The concept of multithreading? Why do you want to propose multithreading?
In a program, these stand-alone program fragments are called "threads", and the concept of programming with it is known as "multithreading." Use multi-threading to improve application responsiveness, make multi-CPU systems more efficient, and improve program structure.
(2) What is the key to the successful control of the two processes in the experiment?
The producer first obtains the mutex, and determines whether the write pointer is equal to the read pointer after +1, if the equality goes into the wait state, waits for the condition variable notfull, if not equal writes an integer to the buffer, and sets the condition variable to Notempty, and finally releases the mutex. The consumer thread is similar to the producer thread, so the key to the control process is the mutex.
(3) Understanding the functions in the experimental code, and fully understand the purpose and content of the code.
- The problems encountered during the experiment and the solutions.
According to the steps of the experiment instruction, basically no problem, when testing the second code TTY, because of the configuration environment variable input error, unable to compile the run, re-modify the environment variables, to achieve the experimental purpose.
The basic design of information security system--Experiment two experiment report