Multithreading Program & Linux Kernel Module
Two threads which increment a by 1 are given. Protect the critical section with spin lock.
Two threads which increment a by 1 are given. Protect the critical section with spin lock. Using xchg instruction to complete the spin lock and spin unlock by yourself.
Complete the matrix multiplication with single thread.
Complete the matrix multiplication with two threads.
Through proc_read, Show process ID, thread ID, priority and state
1.Through proc_read and proc_write, show string, process ID, thread ID and time(ms) in 1 thread. 2.Through proc_read and proc_write, show string, process ID, thread ID and time(ms) in 2 threads.