编程知识 cdmana.com

Level 4 computer network engineer - Summary of notes on some topics of operating system [31 ~ 36 questions]

Computer level 4 notes

The operating system part :(31~36 topic )

Because the length is too long , To ensure the quality of learning , Then it is divided into four parts ( Four blogs )
Every time 10 Entitled an article , Other topics are in my Level 4 computer network engineer Columns can be found in

The first 31 topic :

  1. What information , Stored in the process control block structure : Process identifier 、 The current state of the process 、 Code snippet pointer

  2. The operating system provides users with a variety of interfaces : Icons and menus ( GUI interface )、 Command line 、 system call ( Program interface )

  3. What are the names of the operating system :Ubuntu,Windows,UNIX,Linux,BSD,DOS

  4. Which are not the names of the operating system :SNMP,Eclipse,TCP/IP,Tivoli

  5. What terms refer to a type of operating system : The batch batch, Interactive interactive, real time realtime, Distributed distributed

  6. Android Operating system is widely used , Which of the following features does it have : Mobile application 、 Support network

  7. There are many perspectives on operating systems , They are : Software point of view 、 From the perspective of resource management 、 Process perspective 、 View of virtual machine 、 The service provider's point of view

  8. What are the typical operating system types : Personal computer operating system 、 Network operating system 、 Distributed operating system 、 Embedded operating system

  9. Microkernel ( Customer / The server ) Which of the following advantages does a structured operating system have : high reliability 、 High flexibility 、 Suitable for distributed processing

  10. stay UNIX In the system , If document File4 The permissions for are 736, said : The file belongs to the master executable File4; The file is primary readable File4; Users in the same group can write File4; The same group of users can execute File4; Other users can read it File4;

  11. It is an abnormal event : Arithmetic overflow 、 Missing page interrupt in virtual memory 、 Divide by zero

  12. Batch operating system Is characterized by : Batch processing of jobs submitted by users 、 The user cannot interfere with the operation of the job 、 The utilization rate of system resources is high

  13. Time-sharing operating system Is characterized by **: Multiple users use online at the same time ** Computer 、 Easy to debug program 、 Be able to respond to the information entered by the user in time 、 When users use the computer, they don't feel that the computer is serving people at the same time

  14. Distributed operating system Is characterized by : All hosts in the system use the same operating system 、 Deep sharing of resources within the system 、 Users do not need to understand the differences between local hosts or remote hosts in the system , Transparent 、 Each host in the system On an equal footing , No distinction between primary and secondary 、 system The system has high reliability

  15. Real time operating system Characteristic is : have High reliability 、 Zai Yan Within the time frame of the grid , Respond to user requests in real time 、 It has good overload protection ability

  16. Which jobs belong to Storage management : Complete virtual Address Conversion to physical address 、 management Memory Distribution table 、 Check whether the process address space is out of bounds 、 Call the code on the disk into memory 、 memory expansion

  17. Which jobs belong to Processor management category : by process Assignment CPU、 Provide Lock and unlock primitives 、 management process Data structure of 、 complete process Context switch

  18. Which jobs belong to Scope of document management : management disk Space 、 Disk defragmentation 、 establish file Catalog 、 Set file access permissions

  19. Which jobs belong to Equipment management and user interface : Provide system call interface for user program 、 Provide buffering technology 、 Manage channels 、 Network card and other related data structures 、 Provide virtual device technology

  20. constitute CPU The main part of : Arithmetic unit 、 controller 、 register 、 Cache

The first 32 topic :

  1. In preemptive scheduling system , Process from Running state Convert to Ready state The possible reason for this is : Processor preempted by scheduler 、 Process creation complete 、 I ran out of time ( You can't “ wait for ”)

  2. The necessary components of the process are : Process control block 、 data 、 Instruction code

  3. Which scheduling algorithms are suitable for Interactive operating system : Multistage feedback queue 、 Time slice rotation 、 High priority

  4. What are the possible opportunities for process creation : When the user logs in 、 When the system is initialized 、 When a running process creates a new process through a system call 、 When initializing a batch job

  5. In a general way , System processes Priority should be given to User process The priority of the

  6. If static priority is adopted , Even if the waiting time of the process increases , Its priority will not change

  7. If dynamic priority is adopted , If a process doesn't run for a long time , The system will additionally raise its priority

  8. Process control block **(PCB)**, Each process has its own process control block , The process control block must reside in memory , The process control block must indicate the process number of its process ; After the process is created , The system inserts its process control block at the end of the queue

  9. The state of the process lifecycle : be ready 、 function 、 wait for 、 Blocking 、 Death

  10. What are the following characteristics of multiprogramming environment : independence 、 Randomness 、 participatory

  11. Process control block (PCB) The main contents are as follows : Process number 、 Store information 、 Open file

  12. When the operating system allocates devices , Find the corresponding data structure according to the needs of the algorithm , The main contents of the data structure are : System equipment list 、 Equipment control table 、 Controller control table 、 Channel control table

  13. Typical thread implementation : User threads 、 Kernel thread 、 Mixed threads

  14. There will be mutual restriction between concurrent programs , Concurrent programs and calculations no longer correspond to each other 、 The execution results of concurrent programs cannot be reproduced 、 The corresponding user permissions can restrict 、 The program uses resources to control

  15. What kinds of environments are operating systems usually divided into : The batch 、 Interactive 、 real time 、 Time sharing environment

  16. Process control block (PCB) The main ways of organization are : The linear table 、 Index table 、 Linked list (“ Iron rope and boat ”

  17. Process control block (PCB) The main contents include : Process name 、 priority 、 current state 、 Resource list

  18. Process and program are the same : There are data and instruction codes

  19. In the seven state model of process , Possible state transitions are :( choose “…—》… Pending state ”)

  20. [ Failed to transfer the external chain picture , The origin station may have anti-theft chain mechanism , It is suggested to save the pictures and upload them directly (img-Ybj1RbHN-1652247328018)(C:\Users\86152\AppData\Roaming\Typora\typora-user-images\image-20220124141331552.png)]

  21. Process is the basic unit of resource allocation , Process is the basic unit of system scheduling , Thread is CPU Assigned base unit , Threads are the basic unit of processor scheduling , Threads cannot exist independently of processes

  22. The process has , What the program doesn't have : Process control block 、 Stack 、 Dynamic link library ( Only the process has , The process control block did not )

The first 33 topic :

  1. There is N Buffers In the problems of producers and consumers , Semaphore empty Of The initial value is N( Because there is N individual buffer ), Semaphore full The initial value for the 0; Semaphore mutex The initial value for the 1;P(full) and P(mutex) Two statements Can not be Reverse the order ,V(empty) and V(mutex) Two statements Sure Reverse the order ;(P You can't turn it upside down ,V Can be reversed )

  2. The main purpose of introducing threads is : Improve concurrency , Reduce communication overhead , The switching time between threads is short , Each thread can have a separate stack

  3. What information is stored in the process control block : Process identifier 、 The current state of the process 、 Process priority

  4. Which scheduling algorithms are time-dependent : First come, first served (FCFS)、 Short job preferred (SJF)、 Highest response ratio (HRRF)、 Time slice rotation (RR)

  5. Process scheduling belongs to low-level scheduling

  6. Any process must be scheduled to run 、 The operating system can classify and apply a variety of process scheduling algorithms according to different scenarios 、 Interactive operating system generally adopts time slice rotation scheduling algorithm

  7. The operating system is running Can not be Dynamically change the process scheduling algorithm

  8. In the system with preemptive scheduling strategy , take What causes process scheduling is : A process ends 、 The running process is blocked 、 The time slice to run the process is

  9. process ( Threads ) The main functions of scheduling are : Select the scheduled process according to a certain scheduling algorithm ( Threads ); take CPU Assigned to the selected process ( Threads ); Will replace CPU The process of ( Threads ) The field information of is saved in the process control block ; The selected process ( Threads ) The field information is sent to the corresponding register

  10. process ( Threads ) The timing of scheduling is : Running process ( Threads ) Operation completed 、 Self blocking 、 We ran out of time 、 Resource requirements are not ready 、 There is an error

  11. To run a batch job Large computing centers , Its scheduling algorithm The design goal is : more Throughput Shorter turnaround time between 、 Higher CPU utilization

  12. Which belong to interrupt event : Clock interrupt 、 Input / Output interrupt 、 Console interrupt 、 Hardware failure interrupt ( Be careful :“ Missing pages interruption ” Belong to abnormal )

  13. Real time systems , Its tone The design purpose of degree algorithm The mark is : Meet the deadline 、 Meet the reliability requirements

  14. Process behavior , It can be divided into two kinds : Computing intensive and I/O intensive

  15. What can produce process state changes is : The running process exits normally , The running process is blocked for various reasons 、 New process creation completed 、 The blocked process is awakened 、 The time slice for running the process has run out

  16. Interactive operation In the system , The process scheduling algorithms that can be used are : First come, first served 、 High priority 、 Time slice rotation 、 Multistage feedback queue

  17. High response ratio first Can only be used in Batch operating system

  18. The batch Operating system , The job scheduling algorithms that can be used are : First come, first served 、 High response ratio first 、 High priority

  19. If it is i + 1 , Calculate its maximum value , Then choose The minimum value appearing in the title To Calculated maximum Between All worth

  20. Which algorithms are designed with fairness in mind : First come, first served , Time slice rotation

The first 34 topic :

  1. The storage devices involved in the operating system are : register 、 Cache 、 Memory 、 Hard disk
  2. About readers and writers , Semaphore w The initial value of 1, Semaphore mutex The initial value of 1, Counter rc The initial value of 0,full The initial value of is also 0;P、V operation ,P It's minus one ,V It's plus one ,PV Operation cannot be deleted , Not interchangeable
  3. [ Failed to transfer the external chain picture , The origin station may have anti-theft chain mechanism , It is suggested to save the pictures and upload them directly (img-1fk6REFE-1652247328019)(C:\Users\86152\AppData\Roaming\Typora\typora-user-images\image-20220124162529921.png)] Insert picture description here

analysis :“ Toilet problem ”W=1 Lock ,W=0 It's not locked

​ A University ,ABCDE Four students are in a hurry ( I need to go to the bathroom ), They rushed to the toilet , Small A classmate , See the door locked , Just go back to the new toilet ; Small B classmate , See the door unlocked , Hey, hey, hey QAQ, Into the pit , And lock the door back ; Small C classmate , After going to the toilet , Open the lock , Left the toilet ; Small D classmate , See the door locked , In contrast, , He kicked the door open , The unreasonable bully occupied the pit ( The aborigines are confused ); Small E The classmate is a suspicious child's shoe , See the door unlocked , assume :“ So many people go to the bathroom , How can there be a vacant seat , There must be fraud , Ha ha ha , Thirty six plans , it 's politic to leave ”, I went back to the new toilet . Through observation , Smart you think , Which of the above students are normal people ?

  1. The objects used in the tube side are : Shared data structure 、 A set of operating procedures

  2. The initial value of the semaphore must be greater than or equal to zero

  3. Process is the basic unit of resource allocation , Thread is the basic unit of processor scheduling

  4. After the process is suspended , Its state is ready

  5. Introduce... Into the operating system P、V The operation is mainly to solve the problem of synchronization and mutual exclusion

  6. After semaphore initialization , It can only be implemented P、V Primitive operations

  7. First P after V

  8. The initial value of the semaphore cannot be less than zero ( Should be greater than or equal to zero )

  9. The variation range of mutually exclusive semaphores Only positive integers , It can also be 0, negative

  10. Due to the existence of... Between concurrent processes In mutual restraint system , The problems that will arise : Sync 、 Mutually exclusive 、 Deadlock 、 The problem of hunger

  11. There are... Between concurrent processes Mutual perception problem , Yes : Not aware of each other 、 Mutual indirect perception 、 Direct perception of each other

  12. To protect critical resources from destruction , Which of the following criteria should be followed when the program enters the critical area : When you are free, you will enter 、 Busy, wait 、 Limited waiting 、 Let the right waiting No, Mutually exclusive wait 、 Wait indefinitely )

  13. Interactive system , The design goal of its scheduling algorithm is : Faster response time 、 More balanced performance

  14. When using mailbox for communication ,** Receive the original receive()** In operation , The information that must be included is : Specified mailbox name 、 The memory address where the extracted letter will be stored

  15. Which processes exist Mutual constraints related to time problem : Civil aviation flight booking system 、 Online bank deposit and withdrawal 、 Automobile assembly line 、 The issue / receipt system of enterprise finished goods warehouse (“ The company's attendance card system ” It has nothing to do with time )

  16. Mutual exclusion occurs between concurrent processes due to competing resources , Which options are The correct way to solve the mutual exclusion of processes Method : Compete All parties shall negotiate on an equal footing 、 Set up Process Manager

  17. P、V operation Can achieve Synchronization and mutual exclusion between processes , its The main deficiency is : The program is not Easy to read 、 The program is not conducive to modification and maintenance 、 Correctness is difficult to guarantee

  18. use Hardware method Mutual exclusion of processes can be realized , The advantage of this method is : Wide range of application 、 It's easy to operate 、 Support multiple critical zones

  19. [ Failed to transfer the external chain picture , The origin station may have anti-theft chain mechanism , It is suggested to save the pictures and upload them directly (img-V0HKzS1i-1652247328020)(C:\Users\86152\AppData\Roaming\Typora\typora-user-images\image-20220124213113601.png)] Insert picture description here

The first 35 topic :

  1. The address mapping process is usually completed by hardware ; Address mapping is to convert virtual addresses into physical addresses ; Some contents of page table entries are determined by hardware ; Determine whether the page to be accessed is already in memory according to the significant bit of the page table item ; During address mapping A certain not always To access the page directory and page table .

  2. Among the various storage management methods of the operating system , There are external fragments Yes. : Dynamic partitioning and Paragraph style

  3. In various memory management schemes , What can be Combined with virtual storage technology Use : Page 、 Paragraph style 、 Paragraph page

  4. When using Page storage management In the system of the scheme , What can be used Method to manage free physical memory Free block linked list Location map Free page table

  5. In the storage management scenario , can Support multiprogramming Yes. : Variable partition storage management 、 Page storage management 、 Fixed partition storage management 、 Segment page storage management

  6. In the introduction of Virtual page storage management In the system , What will happen : Page jitter ( Bumpy )、Belady abnormal 、 Missing pages interruption 、 Page write error

  7. Which storage management solution is based on A process allocates a continuous set of memory units for a unit Fixed partition Variable partition ( Choose the back face belt “ Partition ” Of )

  8. In the storage management scenario , can **“ expand ”** The solution of memory capacity is : Virtual page 、 Virtual segment ( Extensible , Tape selection **“ fictitious ”** Of )

  9. In various storage management schemes , requirement The logical address and memory storage area of the process Are continuous storage management solutions , yes : Fixed partition 、 Variable partition

  10. Thread description table records the contents related to thread management , Which are The thread description table needs to record the message Rest : The value of the processor register 、 The value of the hardware device register 、 Stack site status

  11. In the variable partition storage management scheme , About Mobile technology Narration of : When using mobile technology, the number of mobile processes should be reduced as much as possible ; Mobile technology is the process of process execution “ expand ” Memory provides convenience ; Move processes in memory Meeting Increase system overhead ;

  12. In various storage management schemes , May arise Of external debris yes : Paragraph style 、 Variable partition

  13. In various storage management schemes , May arise Internal fragmentary yes : Virtual page 、 Paragraph page 、 Fixed partition

  14. In the storage management scenario , can Process part exchange Yes. : Page 、 Paragraph style 、 Paragraph page ( choose No **“ Partition ”** Of )

  15. In the storage management scenario , can Exchange the whole process Yes. : Fixed partition Variable partition ( Choose the back face belt “ Partition ” Of )

  16. The system area shall not be invaded intentionally or unintentionally by users ; The user program cannot read or write the data in the address space of the system area ; The user program cannot read or write data in the address space of other user programs

  17. How memory allocation tables are organized There are mainly : Position chart Empty page table Free block table

  18. When a program moves in memory , What needs to be done : Read out all codes and data of the program in memory 、 Perform memory relocation ( Static or dynamic )、 Write the read code and data into the target memory 、 Modify the memory allocated area table 、 Modify the free zone table

  19. want Realization Virtual page storage management Certain software and hardware conditions are required , What conditions are necessary : The system has enough external memory 、 The system has a certain amount of memory 、 Implement the mechanism of virtual address to physical address mapping 、 Missing page interrupt processing mechanism

  20. Realization Virtual page storage management scheme What conditions are needed to support : Disk with enough capacity ; A certain amount of memory ; virtual - Real address mapping mechanism 、 Missing page interrupt handler 、 A page table

The first 36 topic :

  1. Another name of the fast watch is TLB; The contents of the fast table are part of the page table ; When switching processes , Refresh the table... Faster ; The fast table is stored in the cache ; The search of the fast table is carried out in parallel according to the content

  2. In a virtual paged storage management system , Every Page table entry What must be included is : Page frame number 、 Effective bit 、 Modify bit 、 Access to a

  3. In the request segment page system , With paragraph Manage the user's for the company Virtual memory Space , With page Management by company Physical memory Space

  4. In order to improve the utilization of memory in the request paging system , operating system You can dynamically change the page size

  5. In a virtual storage system , Some programs of the process can be run after loading

  6. Virtual storage technology allows users to use more storage space than physical memory

  7. The implementation of virtual memory must be supported by hardware

  8. Divide memory, etc. into sizes of 2 Memory block to the power of , Called page box

  9. The system divides the virtual address space into several pages , The size is the same as the page frame

  10. Virtual pages do not require continuous storage in physical space

  11. The hardware mechanism realizes the dynamic conversion from logical address to physical address

  12. From simple page storage management scheme to virtual page storage management scheme , Letters that usually need to be added to page table entries Xi you : Effective bit ( Existential bit )、 Modify bit 、 Access to a ( Quote bit )

  13. In the following page replacement algorithm , Which algorithms need access bits ( Quote bit ):( The access bit is related to the time and number of times ) Most recently unused algorithm LRU、 Clock algorithm CLOCK、 Algorithm not used recently NRU

  14. In the virtual page storage scheme , When sentenced It is necessary to use page table entries when breaking whether a page has been transferred into memory Which bits of : Resident bit 、 Interrupt bit

  15. In the virtual page storage scheme , When doing Page replacement Which bits of the page table items need to be used when : Access to a 、 Modify bit

  16. In the void , Pages may be frequently scheduled between memory and external memory , There may be shaking or bumping

  17. Jitter or bumping may lead to a sharp decline in system efficiency

  18. The operating system maintains a working set for each process

  19. Processes have critical memory requirements , When the number of physical pages allocated to the process is less than this threshold , The page vacancy rate has increased

  20. Once the working set is determined No more changes

  21. Which methods can achieve Processes are mutually exclusive Peterson Algorithm 、Test-and-Set(TS) Instructions 、Swap or Exchange Instructions 、 Semaphore ( Except for the dispatcher , All choose )

  22. Bumping is a phenomenon caused by high page missing rate

  23. Worksets change over time

  24. Using the working set model can solve the bumpy problem

  25. In the virtual page storage scheme , Commonly used Page call in policy Slightly : Request page change 、 Preset page

  26. In the virtual page storage scheme ,**“ Fixed distribution 、 Local displacement ”** The meaning of strategy is : Assign... To each process Fix Number of memory pages ; Page missing during process operation , Can only be replaced in the page of this process ;

  27. In the virtual page storage scheme ,**“ Variable distribution 、 Local displacement ”** The meaning of strategy is : Assign... To each process A certain Number of memory pages ; Page missing during process operation , Can only be replaced in the page of this process ; The process is running , Its memory pages can grow or decrease dynamically ;

  28. In the virtual page storage scheme ,**“ Variable distribution 、 Global permutation ”** The meaning of strategy is : Assign... To each process A certain Number of memory pages ; The process is running , Its memory pages can grow or decrease dynamically ; When the running process has insufficient pages, it can be replaced from any process in the system

  29. When a process occurs Missing pages interruption , And select a page to eliminate , In the page table item corresponding to this page , which ** Some parameters and flag bits do not need ** modify Memory block number 、 Access to a 、 Modify bit 、 Protection position ( Resident bit To be modified )

  30. When Create a new process and schedule Runtime , The process must load a page , In the page table item corresponding to the page , Which parameters and flag bits Must be modified Memory block number 、 Resident bit 、 Access to a

  31. When After the content of a page of the process is modified , In the page table item corresponding to the page , Which parameters and flag bits Must be modified Access to a 、 Modify bit

  32. When a process is running, if Call a page from disk into memory , In the page table item corresponding to this page , Which parameters and flag bits Must be modified Memory block number 、 Resident bit 、 Access to a

  33. In a virtual paged storage management system , Which? Policy is related to page scheduling fetch policy 、 Page placement strategy 、 Replacement strategy

版权声明
本文为[HHppGo]所创,转载请带上原文链接,感谢
https://cdmana.com/2022/134/202205141324526520.html

Scroll to Top