码迷,mamicode.com
首页 > 其他好文 > 详细

[Operating System] {Udacity} P2L1: Processes and Process Management

时间:2019-05-20 09:15:13      阅读:111      评论:0      收藏:0      [点我收藏+]

标签:line   bsp   use   tps   gem   des   form   clu   .com   

 技术图片

 

 技术图片

 

 技术图片

 

技术图片

 

 

 技术图片

 

技术图片

 

V0-Vmax => max size of the process address space

 heap and data may not be contiguous

stack: last in first out

 

 技术图片

 

 any access of the process to x will access the correct physical location where x is stored.

 

 

技术图片

 

not all processes requires the entire address space from V0 to Vmax

 

There may be portions of this address space that are not allocated. 

Also we may simply not have enough physical memory to store all this state.

 

the operating system must maintain information where these virtual addresses actually are in memory, on disk, since it maintains the mapping between the virtual addresses and the physical location of every part of the process address space.

 

https://blog.csdn.net/macrossdzh/article/details/5954763

 技术图片

技术图片

 

 技术图片

 

 

技术图片

 

 

PC: at any point of time, cpu needs to know where in the instruction sequence the process currently is 

regs: pc is also maintaining the pc by part of regs

MM: stack pointer/top of the stack of the process

 and other information

 

OS maintains the Process Control Block, including the information above

 

 
 

Process Control Block is a data structure that OS maintains for every one of the processes.

 

技术图片

 

cpu has a dedicated register, used to track the current program counter for the currently executing process.

PC register will get automatically updated by the cpu on every new instruction 

 

 技术图片

 

 

技术图片

技术图片

 

  

 技术图片

 

 技术图片

 

 

技术图片

 

 技术图片

 

root processes:

技术图片

once the initial boot process is done, and the OS is loaded on the machine, it will create some number of initial processes.

 

and then when the user types in commands, like list or emacsm, then the new processes get spawned from that shell parent process.

 技术图片

 

技术图片

 

 

技术图片

 

Being efficient means that it‘s important to have both efficient designs as well as sufficient implementations of the various algorithms that are used, for instance in scheduling.

As well as efficient data structure that are used to representing things like the waitinig process, or any information that‘s relevant to making scheduling decisions.

 information => priority, history (how long ran in the past)

 

 

 

 技术图片

 技术图片 

 技术图片

 

 

 技术图片

 

技术图片

 

 

 

 

技术图片

 技术图片

 

技术图片

Because the OS is out of the way, it no longer supports fixed and well-defined APIs how this particular shared memory region is used.

For that reason, the usage sometimes becomes more error prone, or developers simply

 

 

技术图片

 

 

 技术图片

 

[Operating System] {Udacity} P2L1: Processes and Process Management

标签:line   bsp   use   tps   gem   des   form   clu   .com   

原文地址:https://www.cnblogs.com/ecoflex/p/10889085.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!