*****************************************************************************************************************************
Chapter 3. Processes 只记录了一些记忆有点模糊的和不太懂的
*****************************************************************************************************************************
there is an upper limit on the PID values; when the kernel reaches such limit, it must start recycling the lower, unused
PIDs. By default, the maximum PID number is 32,767 (PID_MAX_DEFAULT - 1);
//进程号是有限度的,默认最大值为32767!
Linux associates a different PID with each process or lightweight process in the system.
On the other hand, Unix programmers expect threads in the same group to have a common PID. For instance, it should be
possible to a send a signal specifying a PID that affects all threads in the group.
//线程是共用一个PID的!且共享内存空间!
a wait queue represents a set of sleeping processes, which are woken up by the kernel when some condition becomes true.
//一个等待队列 代表着许多个睡眠的进程。
Process 1
The kernel thread created by process 0 executes the init( ) function, which in turn completes the initialization of the
kernel. Then init( ) invokes the execve( ) system call to load the executable program init. As a result, the init kernel
thread becomes a regular process having its own per-process kernel data structure . The init process stays alive until the
system is shut down, because it creates and monitors the activity of all processes that implement the outer layers of the
operating system.
//内核线程建立0号进程,它执行init()函数,在这个函数中,将顺序的执行代码,初始化内核。这个初始化进程建立和管理其他所有的进程
//直到关机,初始化进程也就结束了!
************************************************************************************************************************
Chapter 4. Interrupts and Exceptions
************************************************************************************************************************
All existing IRQ lines are connected to the input pins of a hardware circuit called the Programmable Interrupt Controller,
which performs the following actions:
1.Monitors the IRQ lines, checking for raised signals. If two or more IRQ lines are raised, selects the one having the lower
pin number.
2.If a raised signal occurs on an IRQ line:
a.Converts the raised signal received into a corresponding vector.
b.Stores the vector in an Interrupt Controller I/O port, thus allowing the CPU to read it via the data bus.
c.Sends a raised signal to the processor INTR pin that is, issues an interrupt.
3.Waits until the CPU acknowledges the interrupt signal by writing into one of the Programmable Interrupt Controllers (PIC)
I/O ports; when this occurs, clears the INTR line.
4 . Goes back to step 1.
//所有的中断线都和可编程中断控制器相连,可编程中断控制器负责检查中断,然后做一系列的通知工作!
///
///
/********************************************看不下去了!!!!*******************************************************/
///
///