Operating System - Chapter 2 Problem resolved

Chapter analytical exercises

1. What is the predecessor graph? Why introduce predecessor graph?

A: The predecessor graph (Precedence Graph) is a directed acyclic graph, denoted by DAG (DirectedAcyclic Graph), for the implementation of context between description of the process.

2. Draw the following four statements before the predecessor graph:

S1=a: =x+y;

S2=b:=z+1;

S3 = c: = a-b;

S4 = w = c + 1;

A: its predecessor Pictured:

3. What program concurrent execution will produce intermittent feature?

A: The program when executed concurrently, because they share the system resources to complete the same task requires cooperation, resulting in concurrent execution between these processes, forming a relationship of mutual restraint, so that the process occurs intermittently during execution.      

4. Why lose the closeness and the reproducibility of the concurrent execution of the program?

A: When running concurrently, multiple programs to share resources in the system, and thus change the status of these resources by a plurality of programs

Change, resulting in the loss of running the closure will lead to the loss of reproducibility can be.

5. Why in the operating system to introduce the concept of the process? It will produce what kind of impact?

A: In order to make the program can execute concurrently in multiprogramming environment, and to control and concurrent execution of the program description, the process of introducing the concept of the operating system.

Impact : the concurrent execution of the program to be implemented.

6. Compare the processes and procedures from the dynamic, complicated and independence.

A: (1) the dynamics of the process is the most basic features, performance generated by the creation, performed by the scheduling, due to lack of resources

While suspended, and die by the revocation. There are certain processes of life, and the program is just an ordered set of instructions, it is a static entity.

(2) Concurrency is an important feature of the process, but also an important feature of the OS. The purpose of introducing process precisely in order to make the program and the program can perform other processes concurrently, and the program can not be executed concurrently.

(3)  independence refers to the process entity is a basic unit can operate independently, the system is independent and independent access to basic unit of resource scheduling. For the program does not establish any process and can not participate in the run as a standalone unit.  

7. Explain the role of the PCB, PCB is why the only sign of the presence of the process?

A: PCB is part of the process entity, the operating system is the most important record type data structure. Role is to make one

Multi-channel programming environment can not run independently, become a basic unit can operate independently, the process can become complicated by other processes executing. PCB OS is based on the control and management of processes executed concurrently.

8. PCB which provides process management and process scheduling information needed?

A: Process Management : general purpose registers, instruction counter, program status word, the user stack pointer  

Process scheduling : process state, process priority, events, other information

9. Process control block of the organization, which has several ?

A: linear fashion, linking, indexing

10. What is the operating system kernel ? What are the main features of the kernel is?      

A: The operating system is now generally 0S divided into several levels, different functions and then 0s are set in a different hierarchy. Some modules are usually closely related to hardware (such as interrupt handlers, etc.), the driver of a variety of common devices and operating frequency than Gao modules (such as clock management, process scheduling, and many modules are common to a number of basic operations), are arrange 0S kernel software level close to the hardware, they were permanent memory, commonly referred to as the.

Support functions : interrupt handling, clock management, primitive operations  

Resource management : process management, memory management, device management

11. Explain typical process between the three basic reasons for state transitions.

A :( 1) a ready state execution state: CPU resources allocated to the process

       ( 2) performing a state ready state: time slice expires

       ( 3) a blocked state execution: I / 0 request

       ( 4) a blocked state ready state: I / 0 completion

12. Why introduce a suspended state? What are the nature of the state ?

A: The introduction of suspended state in five different needs: the end-user needs, requires the parent process, the operating system needs, and the need for exchange required load regulation. In the suspended state can not receive processor scheduling process.

 

Guess you like

Origin www.cnblogs.com/dpSolitude/p/11862940.html