kernel

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
kernel [2012/05/01 20:13] – [ARM specific files] adminkernel [2023/06/15 18:14] (current) admin
Line 1: Line 1:
 +https://docs.kernel.org/index.html
  
 Kernel headers should be copied into /usr/include to be used by libraries and compiled programs. These should be the headers glibc has been compiled against, and should be kept independent of the ones in the kernel source tree. New packages are compiled against these headers, otherwise, if packages are compiled against headers that do not match the headers glibc was compiled against, segfaults or other strange problems may appear. /usr/include headers should be what matches the library object files. By copying the headers instead of symlink them to /usr/src/<linux>/include, we make sure that they remain available if we upgrade our kernel. Kernel headers should be copied into /usr/include to be used by libraries and compiled programs. These should be the headers glibc has been compiled against, and should be kept independent of the ones in the kernel source tree. New packages are compiled against these headers, otherwise, if packages are compiled against headers that do not match the headers glibc was compiled against, segfaults or other strange problems may appear. /usr/include headers should be what matches the library object files. By copying the headers instead of symlink them to /usr/src/<linux>/include, we make sure that they remain available if we upgrade our kernel.
Line 17: Line 18:
  
 The Kernel may also run **kernel threads**, standard processes that exist only in kernel-space, like management threads that maintain the buffer and page caches. These processes are scheduled like normal processes and are allowed to sleep. The Kernel may also run **kernel threads**, standard processes that exist only in kernel-space, like management threads that maintain the buffer and page caches. These processes are scheduled like normal processes and are allowed to sleep.
 +
 +====== Concurrency and shared resources ======
 +  * Interrupts
 +  * Kernel preemption, causing the kernel to switch from the execution of one system call to another
 +  * Multiprocessing
 +
 +We need to keep as much local state as possible and use locking for the shared resources.
 +
 +===== Locks =====
 +  * Mutex, the main kernel locking primitive. Usable in contexts where sleeping is allowed.
 +  * Semaphores.
 +  * Spinlocks, used with code that is not allowed to sleep (interrupt handlers) or that doesn't want to sleep (critical sections). In single-core processors, it is better not to use spinlocks, as they would waist resources slowing down the lock owner (timeslice schedulers) or cause a deadlock (non-timeslice schedulers).
 +  * Alternatives:   Lock-free algorithms like Read Copy Update (RCU) and atomic operations.
  
 ====== Debugging ====== ====== Debugging ======
Line 27: Line 41:
  
 to restrict bisection to commits that touch [path]. to restrict bisection to commits that touch [path].
 +
 +http://www.av8n.com/computer/htm/kernel-lockup.htm
 +====== Porting the kernel to ARM devices ======
 +[[http://www.digipedia.pl/usenet/thread/19011/33747/|ARM11 MPCore example]]
  
 ====== ARM specific files ====== ====== ARM specific files ======
Line 46: Line 64:
                    time.h       time interrupt handlers and macros                    time.h       time interrupt handlers and macros
                                        
 +
 +====== Contributing ======
 +
 +[[http://www.youtube.com/watch?v=LLBrBBImJt4|Write and Submit your first Linux kernel Patch]]
 +
 +https://kernelnewbies.org/FirstKernelPatch
 +
 +https://kernelnewbies.org/Outreachyfirstpatch?action=show&redirect=OPWfirstpatch
 +
 +https://tapaswenipathak.wordpress.com/2014/10/11/tools-to-cleanup-linux-kernel/
 +
 +====== Testing ======
 +https://kernelci.org/
  
 ====== Useful links ====== ====== Useful links ======
Line 55: Line 86:
 http://lwn.net/Kernel/LDD3/ http://lwn.net/Kernel/LDD3/
  
 +http://sysplay.in/blog/linux-device-drivers/2013/02/linux-device-drivers-for-your-girl-friend/
  • kernel.1335903201.txt.gz
  • Last modified: 14 years ago
  • by admin