Summary blog assignment
(1) From the aspect of multi-thread coordination and synchronization control, analyze and summarize the design strategy and its changes from the three operations.
fifth assignment
The three elevators are three threads respectively, the input processing is one thread, and the elevator scheduling is one thread.
sixth assignment
Each monitoring task is a thread, and input processing is a thread.
The seventh homework
100 taxis each have 100 threads, the input is processed as one thread, and the scheduler is divided into three parts, each part is a thread.
All three jobs are used Lock
when operations on shared resources are required lock try catch finally unlock
.
(2) Analyze your own program structure based on metrics
fifth assignment
sixth assignment
The seventh homework
(3) Analyze the bug of your own program
fifth assignment
One less hit
if
leads to misjudgment of piggybackingUsed many times
System.currentMillis
, the method itself is time-consuming, resulting in time errors, and then use it insteadSystem.nanoTime
sixth assignment
- Typing an output
path-changed
error intosize-changed
The seventh homework
- Forgot to judge the coordinates are legal
(4) Analyze your own strategies for discovering other people's program bugs
Fate, amazing
(5) Experience
As long as everyone gives a little love, the world will become a better tomorrow