Operating system (Li Zhijun) L9 multi-process image - the most important operating system image

@ [TOC] operating system
Here Insert Picture DescriptionHere Insert Picture Description
to solve a task i.e. open a process
Here Insert Picture Description
PCB (process control block) the process control block
'W' is provided to block state
the Schedule (); switching function
pCur: current process
pNew: new process

Here Insert Picture Description
getNext (): Scheduling
FIFO: FIFO

Here Insert Picture Description
Here Insert Picture Description
here to achieve delicate operation, it requires the use of assembly code
Here Insert Picture Description
Code meaning:
the 10100b ax opposed to
the 100 to the address counter ax

1 and 2 are 100 addresses the process of accessing multiple processes can be placed in memory at the same time, cause address conflicts
resolved by the mapping table

Here Insert Picture Description
in order to achieve synchronization advance, locked reasonable counter, and then advance to a certain extent
Here Insert Picture Description
Here Insert Picture Description
the producers P advance and locked
consumption check the lock by C
P continue to promote, advance to certain programs, unlock
C advance
so that the value of maintaining the correct counter

Released four original articles · won praise 2 · Views 172

Guess you like

Origin blog.csdn.net/weixin_43135178/article/details/104803847