-Chapter2- operating system process management - exercises

Multiple Choice

Performing a comparison, the sequence program and the concurrent program ().
A, B is substantially the same, little different
C, concurrent program execution time D generally fast, sequential program execution time is generally faster
Answer: C
2, on a single processor, the execution of several programs overlap time is called ( ).
A, the order of procedure B, multiprogramming
C, concurrent Procedures D, parallel program
Answer: D
. 3, the concurrent process refers lost closed ().
A, a plurality of independent processes to respective forward speed
B, the results of execution of concurrent processes independent of speed
C, de performs concurrent process, an error occurs at different times
D, concurrent processes shared variable, and the speed of its execution result about the
answer: D
4, the essential difference between processes and procedures are ().
A, memory and external memory B, the non-sequential order and execute instructions stored in a machine
C, and the exclusive use of time-sharing computer resources using D, dynamic and static features
Answer: D
. 5, the process control block is a data structure and characteristics of the described process state , a process ().
A, there may be a plurality of process control block B, a process control block may be shared with other processes
C, D can not process control block, there can be only a process control block
Answer: D
. 6, the following characteristics, which is not characteristics of the process ().
A, asynchrony B, concurrency C, static resistance D, dynamic
answer: C
7, each process forward speed is unpredictable, reflecting the "stop and go" feature, called the process () .
A, B dynamic, concurrency C, D schedulability, asynchronism
Answer: D
. 8, for a single CPU system, allows several processes simultaneously executed, CPU occupancy turn, call them ().
A, B sequentially performed, while performing C, D performed in parallel, concurrently
Answer: D (easily)
9, a single processor system, in the process of operating state ().
A, only one B, can have multiple
C, can not be suspended D, must be removed in order to be executed after the
answer: A
10, following the conversion process in the state, is not correct ().
A, ready to run B, ready to run C, ready to blocking D, obstruction to the ready
answer: C
11, has received all the resources needed to run the process except () other than a state of readiness.
A, memory B, printer C, CPU D, disk space is
12, a process wakes means ().
A, the process of re-occupy the CPU B, the process becomes ready state
C, its priority becomes the maximum D, which is ready to move PCB queue head of the queue
13, two travel agencies A and B for travelers to book an airline aircraft tickets, mutual repulsion of resources is ().
A, B ticket, travel
C, D airlines, travel agents, and airline
14, and time-dependent error means ().
Time A, and the length of the implementation process related to B, and the speed of the CPU related to
C, and the process was interrupted by time-dependent D, and related timeout
Answer: C
15, a process needs to wait during the run data read from the disk, the state of the process at this time is ().
A, the operation becomes ready B, become ready to run from
C, D from the operation becomes blocked, the blockage becomes ready
16, after the process required a printout on the progress status from ().
A, B operating state to the ready state, the running state to the wait state
C, D wait state to the ready state, ready state to the standby state
Answer: C (easy)
17, a primitive ().
A, a machine instruction B, consisting of a number of machine instructions
C, D a particular instruction, the instruction can interrupt midway
Answer: B (more difficult)
18, operating system, the basic unit may be operating in parallel () [1] , () [1] and also the core dispatch systems a basic unit for resource allocation, which is represented by () [2] consisting of main difference between the program () [3].
Alternative answer:
[. 1]: A, job B, function C, D process, the process
[2]: A, programs, data, and PCB B, programs, data and an identifier
C, the program identifier and PCB D, data, identifiers, and the PCB
[. 3]: A, stateful procedure, but it is not B, it has a state, and no program
C, the resources that can be consumed, but it is not D, which can be resource-intensive, and the program is not
19, the following steps, which is not a necessary step process to create ().
A, establishing a process control block PCB
B, a CPU scheduler as process scheduling CPU
C, allocate memory for the process and other necessary resources
D, and the process ready queue PCB links
20, in the operating system, P definition of primitive operations in the signal S, so that the process enters the wait condition is a respective waiting queue ().
A, S> 0 B, S = 0 C, S <0 D, S <> 0
21 is, processes that can be used with other programs co-line execution program segment first execution process, which is a system for resource allocation and scheduling basic unit. Processes with [1], [2], the scheduling of asynchronous and five basic structural characteristics. The implementation process is a process, with a lifetime reflects the process [1] features. A process block, [3], [4], where [4] that uniquely identifies the process exists in the system.
Alternative answer:
[. 1] [2] A, dynamic B, static state C, a total row of D, concurrency E, enforceability F, ease of use
[3] A, process B, and they C, the process D identifier, function
[. 4] a, B the FCB, the FIFO C, D the PCB, JCB
22 is, when the intermittent process execution decision process may have multiple states. There are three basic state of the process, in a time-sharing system, when one has a time slice to process, i.e. the process of [1] to enter the [2]. If for some reason such that when the processor is idle, the need to select a process from the ready queue, and the processors assigned to it, then the process proceeds to [3], this is done by a process [4].
Alternative answer:
[. 1] [2] [. 3] A, ready state B, the stationary state C, waiting state D, the execution state
[4] A, the process control procedure B, the resource allocation procedure C, process scheduler Procedures D, processor allocation program
23 in order to describe the dynamic process in progress, using () system and associated processes according to perceive its existence process.
A, B status word process, the process priority number C, D process control block, the process start address
24, the key process scheduling problem is a reasonable choice (), and appropriately transcoding.
A, B chip interval, scheduling algorithm C, CPU speed D, the memory space
25, using round-robin scheduling method in order to process ().
A, plurality of terminals can receive timely response of the system
B, FCFS
C, a higher priority process timely response to
D, the process requires the shortest do first CPU
26, a period of time, only allow a process to access the resource is called ().
A, shared resources B, the critical section
C, the critical resource D, shared area
answer: C
27, critical area refers to ().
A, concurrent processes for achieving mutual exclusion of block
B, the program for realizing concurrent processes sync block
C, the concurrent program for realizing the process communication block
D, concurrent program associated with the shared variables block
answer: D
28, the process is ().
A, and procedures equivalent concept B, concurrent environment program execution process
C, a system software D, stored in the program memory
answer: B
29, the process has concurrency and () are two important attributes.
A, dynamic B, the static nature of C, ease of use D, closed
30, the operating system in the control and management processes process, involving () this important data structure, which is the only sign of the presence of the process.
A, B the FCB, the FIFO C, D the FDT, the PCB
31 is, from the following statements about the process management, properly selected five described.
The synchronization between A, process, mainly due to competition for resources between processes, refers to the coordination of multiple related processes on the execution order;
B, the critical resource is a time only allows a process to access the resource;
C, signal amount mechanism is an effective tool to achieve process synchronization and mutual exclusion. Semaphore operation can only be changed by the PV;
D, V is a semaphore operation plus 1 performs operation, means to release a resource unit, if the value of the signal after adding an amount of less than zero, from a waiting queue wakeup process, now the process waiting state, otherwise the current process continues;
E, messaging, mail communications are advanced means of communication;
F, deadlock is the result of competing resources so that the system has multiple block the process of the case;
G, if systems meet between concurrently running processes and resources exclusive use, hold and wait, deprivation and non-cycle wait can be determined that there is a deadlock system;
H, in the policy to deal with deadlock, a deadlock is usually released and detect deadlocks are supporting the use of;
the I, the cause of deadlock can be attributed to competition for resources and processes to promote improper sequence;
J, the solution to the deadlock, a deadlock due to avoid static resource allocation strategies, so resources the utilization rate is not high.
32, refers to the concurrent occurrence of certain events in ().
A, B the same time, the same time interval
C, D at different times, in different time intervals
post 33, the introduction of multi-channel programming technique, processor utilization ().
A, reduced to B, improved
C, D greatly improved, no change, but to facilitate the execution of the program
34, the program executed on a single processor, a multi-channel program execution is in () is performed.
A, same time B, the same time interval
C, a fixed time D, at a fixed time interval
35, if a process gets all the resources needed to run in addition to the CPU, scheduled, assigned to it CPU, the process will enter ().
A, ready state B, the operating state
C, wait state D, the active state
36, if a process is running, paused for some reason, this time will run out of state, and into ().
A, a free state B, the stopped state
C, D wait state, rest state
37, the process from the operating state to the waiting state reason is ().
A, B event input or output, to the time slice
C, D input or output events is completed, a process is awakened
38, the presence of multiple processes in the operating system, they are ().
A, not shared system resource
B, can not be called with a program code for
C, can be shared to allow shared system resources
D, may share all of the system resources
39, the operating system has a set of normally called special system call, it can not be interrupted system , in the operating system called ().
A, the initialization procedure B, primitive
C, D subroutine, the control module
of the steps under the class () is not necessary to create a process.
A, establishing a process control block (PCB) B, a CPU scheduler for CPU scheduling process
C, the process of allocating the necessary resources such as memory D, and links the process ready queue PCB
Answer: B (more difficult)
40, interprocess the basic relationship ().
A, independently of each other with mutual restraint B, synchronization and mutual exclusion
C, parallel execution and resource sharing D, information transmission and information buffer
41, synchronization and mutual exclusion between processes, respectively show (among processes).
A, independently of each other with mutual restraint B, coordination and competition
C, different states of D, dynamic and independence
42, two processes cooperate to complete a task, in concurrent execution, a process to wait for their partners sent a message, or and then forward the establishment of a conditional execution, this relationship is () the relationship between processes.
A, sync B, mutex C, competition D, cooperation
Answer: A
43 is, the operation is the PV ().
A, two lower-process communication primitives B, two different sets of machine instructions
C, D two system call instruction, the process advanced two communication primitives
Answer: A
44 is, the initial value of the signal S 8, in the S 10 P operation performed after the operation 6 V, S value ().
A, B 10,. 8 C, D. 6,. 4
45, operation may utilize PV ().
A, to achieve synchronization process B, deadlock detection C, releasing the deadlock D, prevent deadlock
Answer: A
46 is, the reason is the system deadlock ().
A, the computer system has undergone major fault
B, the blockade of multiple processes simultaneously exist
C, several processes due to compete for resources and endless waiting, no release has occupied resource
D, the number of resources considerably less than the number of processes, or processes At the same time the number of resources greatly exceed the total number of application resources
47, two processes compete for the same resources ().
A, certain deadlock B, not necessarily a deadlock
C, will not deadlock D, none of the above statement
48, is the way to resolve the deadlock ().
A, immediately shut down troubleshooting
B, immediately shut down and then restart
C, do not share resources, increase resources exclusively
D, design method deadlock prevention, detection and recovery operation
49, the process P1 use of resources: application resource S1, application resource S2, Sl release of resources; resources using process P2: application resource S2, the application resource S1, resource release S2, the system concurrently executing processes P1, P2, the system ().
A, B must be deadlock, a deadlock may arise
C, D will deadlock, unable to determine whether a deadlock
50, in the process of communication, the exchange of information in the mailbox is ().
A, B low level communications, advanced communications C, D shared memory communications, the communication pipe
Answer: B (Normal)
51, on the process, the following description is not correct ().
A, and the process comprising a program running on the data
B, and a set of programs running on the same data in a different form in different processes
C, a process is created, it die before, always three kinds one of the basic state
D, a number of processes to be performed sequentially in a single-CPU system, after a process that is completed, another process can start work.
The answer: D (hard)
at 52, multiprogramming environment, the operating system allocates resources () as the basic unit.
A, procedure B, instruction C, Process D, job
Answer: C (more difficult)

True or False

(×) 1, multi-user operating system leaves the multi-terminal hardware support, can not be used.
(×) 2, an operating system with multi-channel function must be multiuser operating system.
(√) 3, multiuser operating system can still work in a single hardware terminal hardware support.
(√) 4, multi-user operating system, the operating system must be a multi-channel function.
(√) 5, the relative speed of the process can not be controlled by themselves.
(×) 6, concurrently executing process referring to the same time there are two or more programs are executed on the same processor.
(×) 7, concurrent processes when accessing a shared resource, time-related errors can not occur.
(×) 8, different concurrent parallel representation, the same principle.
(√) 9, the critical resource is a time only allows a process to access the resource.
Mutex (×) 10, the synchronization process is the basic content and process communication.
Mutex (×) 11, process synchronization and mutual restraint generally do not occur simultaneously.
Mutex and (×) 12, the process is always synchronized with each other due to the constraints caused by the same time.
(√) 13, a job synchronizing user-oriented and process synchronization for computer internal resource management control.
Synchronous coordination, mainly due to competition for resources between processes, refers to a number of related processes on the execution order between (×) 14, process.
(√) 15, P and V operations are operation primitive operations.
(×) 16, PV operation using the semaphore may exchange a lot of information.
(√) 17, semaphore mechanism is an effective tool to achieve process synchronization and mutual exclusion. Semaphore operation can only be changed by the PV.
(×) 18, V semaphore operations is added by '1, meaning that the release of a resource unit, add 1 if the value of the semaphore is equal to zero, from the waiting queue wake a process, the process is now waiting state, otherwise now the process continues. .
(×) 19, the deadlock is the result of competing resources, such that the system has a plurality of blocked processes.
(√) 20, causes a deadlock can be attributed to competition for resources and processes to promote improper order.
(√) 21, deadlock refers to two or more processes are in a reciprocal state can not continue to work.
(×) 22, commonly known as a deadlock computer "crash."

Fill in the blank

1, the three basic process is the status ________ ________ and ________.
2, ________ program execution is one of the basic features of a modern operating system, in order to better describe the features of the introduced
________ this concept.
3, there is a process marked by ________.
4, a program running on different data sets constitute different ________, different results were obtained.
5, the process is a ________ entity, it has its own life cycle. It is generated by ________, operate by ________, which is blocked by ________ (enter the wait state), is undone by ________.
6, the process continues to ________ during operation, but at some point, if and only if the process is in one of three basic states.
7, static entity process consists of three parts ________ ________ ________ and composition.
8, for process control primitives mainly ________ ________ ________ and ________.
9, after the process is created, initially in ________ state, then after entering ________ ________ selected by the state.
10, the process of application resources are not met in the operation, it becomes a state from ________ ________ state.
11, in the process of waiting for the state to end its peripherals work, then it becomes ________ state.
12, the process becomes ready to run state from the state, mainly due to ________ and ________.
13, there are multiple processes while waiting for allocation CPU, according to a certain system of ________, in a ready state from the process of selecting a ________ process, it occupies a CPU, and it becomes a state ________ state.
14, the main features of the process of ________, ________, independence, and structural constraints.
15, the meaning of the PCB is ________.
16, ________ operating system based on process control and management.
17, the main process creates the work done is to create a process control block, and to hook it up to ________ queue.
18, a process after the completion of their task, the operating system will have to take back the possession of the process and undo the progress of ________ ________.
The number 19, if the system has N processes, the processes in the ready queue up to ________.
20, the operating system used to perform specific functions, the process can not be interrupted is called ________.
21, primitives used to control the process have created primitive, to undo the original language, ________ and ________.
22, there are two basic process queue: ________ and ________.
23, the process scheduler is responsible for allocating CPU, which according to some ________ ________ select a process from the process, the information related to their field of ________ into the corresponding registers in the processor, so that it occupies the processor is running.
24, commonly used in the process of scheduling algorithm is first come first serve, and ________ ________.
25, first-come, first-served scheduling algorithm in accordance with the process into the ready queue of ________ to choose their occupation of the CPU, always ready to allocate CPU to process ________ lined up in the scheduling process.
26, time slice refers to a process to allow a one-time processor-intensive ________. Round-robin algorithm commonly used in ________ operating system.
27, we have a process to let the CPU, CPU occupied by another process is called ________.
28, a process executed when the order of the exclusive processor, and having ________ ________.
29, when the concurrent process execution, execution and results of its implementation of the relevant ________; concurrent execution process will destroy ________ and ________.
30, we block concurrent processes associated with ________ called the critical zone.
31, must be mutually exclusive execution of several critical area ________, and ________ is a critical area of need not be mutually exclusive.
32, at most once a ________ process can enter the critical section, when there is a process in ________ critical areas, while others want to enter the critical section of the process must ________.
33, either enter a critical section of the process must ________ ________ time in the critical region.
34, Each time V operation, the semaphore value S 1 plus. If ________, then the process continues; otherwise, a removal process and the process from imparting ________ state corresponding ________ queue.
35, using the ________ semaphores realize the process, set a semaphore MUTEX the critical zone, its initial value is 1, indicating that the resource has not been used between ________ and ________ primitive critical areas should be placed.
36, the operating system and the value of the semaphore concerned ________ use, its value can only be changed by ________.
37, ___ management requirements can be realized in a critical region.
38, PV and operated by ________ ________ composition, ________ is operated.
39, the value of P ________ operation signal, if the result is less than 0, then the process is ________ state. V value of the semaphore operation ________ ________ if a result, the process is released a wait semaphore.
40, when there is competition between concurrent processes must ________ use of resources; when there is collaboration between concurrent processes must ________. They are called ________ and ________.
41, ________ means that when there are a number of processes have to use a shared resource, at any time up to allow only ________ to use a process, other processes to use only the data must ________ until footprint by _______ _ the resource.
42, the synchronization process refers to the relationship between ________ perform a concurrent process, a process dependent on ________ another process when a process that it should not ________ ________ until.
43, process synchronization and mutual exclusion reflects the relationship between ________ and ________ process.
44, operating with PV is an effective tool to achieve ________ and ________, but if used improperly and will not only ________ ________.
45, ________ switching between concurrent processes through a small amount of information, which is a communication mode ________; large amount of information to be transmitted ________ achieved, which is a way of communication of ________, called ________.
46, in fact, ________ is the process of synchronizing a special case.
47, the currently used communication scheme has advanced shared memory, ___, ___ like.
48, the cause of deadlock are formed and ________ ________.
49, to avoid deadlock algorithm is a well-known ________.
50, four necessary conditions for deadlock is generated ________ ________ ________ and ________ four.
51, after the deadlock detection process can be deprived of possession of resources, ________ and ________ and other ways to relieve the deadlock.
52, in actual use, the operating system for the safe and reliable, often using deadlock ________, ________ and ________ of mixed strategy, both to ensure that the entire system deadlock does not occur, but also can improve resource utilization as much as possible rate.
53, generally, the definition of the thread is ____________________________________. In modern operating systems, resource allocation unit is __________________, and processor scheduling unit is ________________, a process can have ___________ thread.
54, when using the process scheduling priority scheduling algorithm, i.e. a high priority process selected from the ready queue, there are two different approaches: and ________ ________.

Short answer

1, why should the operating system into the process? Relationship processes and procedures What?
A: Modern computer systems concurrent execution of program and resource sharing needs, making the operation of the system becomes very complicated, and the program as a set of machine instructions, this concept has still not accurately reflect the dynamic nature of concurrent execution of the program, therefore, the process of introducing the concept to describe the dynamic process of execution of the program. This is our understanding, description and design of the operating system is important.
Process is defined as the execution of the program in a concurrent environment, it is a completely different concept of the program. The main difference is: (1) program is a static concept, is a permanent software resources; and the process is a dynamic concept, is staging resources dynamically generated perish. (2) process is a unit capable of independent operation can be executed concurrently with other processes, CPU allocation system is based on the process as a unit; and the program can not be run as an independent unit. (3) program and the process is not one to one relationship. A program can work by multiple processes at work, a process corresponding to the at least one program at work. (4) each process will have when executed concurrently restrictive relationship, so that the speed of their advance unpredictable; and the program as a static concept, this asynchronous nature does not exist.
Processes and procedures similar relationship in life and cooking recipes. The same recipes, but everyone taste fried dishes but very different. The reason is basically a static recipe described, it is not possible to perform all the dynamic process, the time and space involved with environmental factors such as eleven instructions clearly described.

2. What is the process of synchronization and mutual exclusion?
A: mutual restraint and mutual exclusion refers to the relationship between the sync process process when advancing. In multiprogramming system, due to the process of cooperation and sharing of resources, constraints between this process is called possible. We called the former process synchronization, which is called mutual exclusion.
Synchronization is the process of direct interaction occurs when the relationship between processes together to complete a task. Is a direct relationship between the constraints of the process. In the multi-channel environment, inter-process coordination in the implementation of this order is essential. As the relationship between the synchronization process in the relay Runners, each process or production line.
Mutual exclusion is an indirect relationship between the constraints of the process. In the multi-channel system, allows only one process to access the resource known as the critical resource, mutual exclusion is to ensure that only one process uses critical resources. The relationship between mutually exclusive processes as car lane at the intersection of contention, both sides rebounding the basketball game.

Published 375 original articles · won praise 634 · views 40000 +

Guess you like

Origin blog.csdn.net/weixin_43896318/article/details/104087414