Operating system concepts learning process 1

Source: Internet
Author: User
1. Differences between jobs and processes the concepts of processes and jobs are also different. A running process is called a job and can contain one or more processes, especially when pipelines and redirection commands are used. for example, the job "nroff-man ps.1 | grep kill | more" starts three processes at the same time. 2 process control block PCB Process status Program Counter CPU register CPU scheduling information memory management information accounting information including CPU time, actual use time, time limit, accounting quantity, job or process quantity I/O status information 3 scheduling queue process Entry System, will be added to the Job Queue, which includes all processes in the system. Processes that need to wait for running to reside in the memory are saved in the queue table. This queue is usually stored in the form of a linked list. Its header node includes pointers pointing to the first and last PCB blocks of the linked list. A queue diagram is a commonly used method for device queue process scheduling. 4. The scheduling program process will be migrated between various scheduling queues in its life cycle. For the purpose of scheduling, the operating system must select a process from these queues in a certain way. Process selection is completed by the corresponding scheduler. The difference between short-term scheduling program (CPU scheduling program) and long-term scheduling program (job scheduling program): the short-term scheduling program must frequently select a new process for the CPU. B. Long-Term Scheduling programs can use more time to select process processes. Generally, they can be divided into I/O-dominated or CPU-dominated processes for optimal performance, the system requires a reasonable CPU-based and I/O-based process combination. UNIX usually does not have a long-term scheduler. in UNIX, the medium-term scheduler exchange will temporarily remove non-running processes from the memory and load them into the memory when execution is required. 5. to switch the CPU to another process, you need to save the status of the original process and load the Save status of the new process. This task is called context switching. Process Association is represented by PCB, which includes the CPU register value, Process status, and memory management information. When context switching occurs, the kernel stores the association status of the old process in its PCB, and then loads the saved association status of the new process to be executed by scheduling. 6. inter-process communication logic implements direct or indirect communication between lines and sending/receiving Methods symmetric or asymmetric communication automatic or display buffer copy Copy send or reference send fixed-size or variable-size messages direct communication: send (p, message); receive (ID, message); indirect communication: Send (A, message); receive (A, message ); A indicates that no matter whether it is direct or indirect during communication, the information exchanged by the communication process will reside in the temporary queue. In short, there are three methods to implement a queue: the maximum length of the queue is 0, because no message in the line is waiting. In this case, the sender must block and know that the recipient has received the message. B limited capacity C unlimited capacity 8 Socket socket can be defined as the communication endpoint, a pair of processes through network communication requires a pair of sockets, that is, each process has. A socket is composed of an IP address and a port number. Generally, the socket uses a client-server structure. The server listens to a specified port to wait for incoming client requests. Once the request is received, the server accepts the link from the client socket to complete the connection. All links are unique. 9 Remote Procedure Call rpc10 remote method call

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.