Modern Operating Systems (Ⅰ)--2014.12.15

Source: Internet
Author: User

ProcessProcess Model  

     A process is an instance of a program that is executing

It is worth noting that if a program runs two times, it counts as two processes

Create a process     

      In a common system, there are four main events that cause process creation

Initialization of the ① system

② executes a running process called City to create a system call

③ user request to create a new process

④ initialization of a batch job

Status of the process

      Run state (the moment the process actually consumes the CPU)

Ready state (can be run, but temporarily stopped because other processes are running)

Blocking state (the process cannot run unless an external event occurs)

New,terminated two states are mentioned in operating Systems concept.

※ Implementation of the process (PCB)     

      

PCB (Process Control block)
Process State Running,waiting
Program counter Indicates the address of the next instruction that the process will execute
CPU Registers Accumulator (accumulators), index registers, stack pointer (stack pointers), universal register (general-purpose registers), etc.
CPU Scheduling information Process priority, dispatch queue pointers, and other scheduling parameters
Memory-management Information Value of base and limit registers, page table or Segment table (page tables, or segment)
Accounting Information CPU used, clock time elapsed since start, time limits
I/O status information The list of I/O devices allocated to this process, a list of open files, and so on
Use of thread threads

       Why use threads under a process?

Because of the abstraction of the process, we were able to avoid the interruption of the timer context switch. Just because of the abstract concept of threading we were able to join a new element. Parallel entities share the same address space and all available data And this is a multi-process model (they have different address spaces) that cannot be expressed

Modern Operating Systems (Ⅰ)--2014.12.15

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.