The operating system is also a computer professional must learn one of the specialized course. The same for a lot of postgraduate examinations of students are also required to test the course. This post is the basic knowledge point of the operating system I organized during my college years. Enough to meet the final exams of the college age.
1. Four aspects of storage management research topics:
(1) Storage allocation problem: The focus is on storage sharing and various allocation algorithms
(2) Address relocation problem: Research address transformation mechanism, and dynamic and static repositioning method
(3) Storage protection issues: research and protection of various programs. Methods of the data area
(4) Storage expansion problem: Research Virtual storage area and scheduling algorithm
2. A space in a program that consists of a symbol name is called a namespace.
3. The relative address is also called a logical address or a virtual address. A space in a program that consists of a relative address is called a logical address space. The logical address space is converted to an absolute address space by an address relocation mechanism.
The absolute address space is also called the Physical address space.
4. When a program for a logical address space is loaded into the physical address space. Because two spaces are inconsistent. The address transformation is required. or address mapping. That is, the relocation of the address.
5. Address relocation Two ways:
(1) Static repositioning
(2) Dynamic repositioning
6. Static repositioning is the relocation of the address before the program runs.
The assembly process is usually complete.
No hardware support is required.
7. Static repositioning Disadvantages:
(1) The program can no longer move after repositioning. Memory cannot be allocated again.
(2) Storage space can only be allocated continuously. cannot be distributed across different areas of memory.
(3) It is very difficult for users to share the same program.
8. Dynamic address relocation is during program operation. Before each storage visit. to hardware support.
9. Dynamic repositioning Strengths:
(1) The program can move in the memory.
(2) The program does not need to be stored continuously, can be in different areas of memory.
(3) Ability to share programs.
10. Self-Override: Large operating program at run time. Some of the address space is in main memory, and part of it is in the secondary storage. When the information is not in main memory, the operating system from the secondary storage transferred into main memory.
11. Virtual storage is actually an address space.
12. The maximum capacity of a virtual memory is determined by the address structure of the computer.
13. The virtual storage capacity can be larger than the real deposit, and can be smaller than the real deposit.
A system can create a virtual memory for each user, and each user can program within their own address space (maximum capacity is virtual memory capacity).
14. Early Storage Management:
(1) Single continuous distribution
(2) Partition allocation
15. Page: Logical address space divided by equal slices.
16. Block: The physical address space is divided into slices of the same size.
17. The entire page of the logical address space for a job is contiguous, and the blocks that are transformed into physical storage space are not contiguous.
18. Address Change mechanism:
(1) Dynamic address change mechanism DAT
(2) Fast page transform register
(3) Lenovo register (fast table)
19. The page table is in main memory. Managed by the operating system.
Each instruction must be run with an address transform.
20. In Lenovo memory, store the page number and corresponding block number that are most frequently used by the executing job. have parallel query capability.
21. Paging Management table (data structure) to be established:
(1) Activity Table JT
(2) Storage of block table MBT
(3) Page conversion Table PMT
22. Work table. The entire system is a table, each job in the job table corresponding to a table, containing the Job page table start, page table length and status information.
23. Store the chunked table. A table for the entire system. A table that corresponds to a storage block that records whether the block is assigned.
24. Page Transform table: A job a table. A table with a corresponding page.
25. Paging storage management does not address storage expansion issues. When a job cannot be fully loaded into memory, it cannot be executed.
26. Virtual page: page for job address division
27. Real page: Main memory is called the real memory, the real memory block.
28. Request Paging Storage Management: Paging storage Management loads the required pages according to the request.
29. The hardware generates a missing pages interrupt. Transfer to interrupt handler.
30. When the handler is running an instruction, the valid address of the operand is formed first, then the page number is calculated, and the page table is checked for the actual memory. As in. The address transformation is performed. The operand is taken out by the transformed address. The function of the command is finished, and then the next instruction will continue to run.
If not, cause a missing pages interrupt, into the interrupt handler.
31. Page out: A page is moved to a secondary store
32. Entry: A page is transferred from the secondary to the existing
33. Jitter, System bumps, repeat out page and enter page. Waste a lot of processor time.
34. Various page replacement algorithms. Do the problem!
35. The program should have a high degree of localization. This allows the program to run with a focus on several pages. Reduce the number of pages broken.
36. To implement the program effectively, it should not be less than half the total number of pages in main memory.
37.2 Visits: Paging storage management, request paging storage management, segmented storage management
38.3 Visits: Segment-page Storage Management
39. Understanding Segmented Storage Management, Segment-page storage Management
Windows NT uses page scheduling algorithms that request paging storage management and FIFO.
The page size of Windows NT is 4K.
The Windows NT virtual Storage hypervisor is one of the important components of the NT runtime. is the basic storage management system for Windows NT.
Windows NT executes on more than 386 of the 32-bit microcomputer. So each process has a virtual address space of 4GB (2 of 32 times).
44.4GB of the virtual address space is divided into two parts.
The 2GB of the high address is reserved for use by the system. The low-address 2GB is the user's storage area, which can be visited by the user-State and nuclear-minded threads.
45. The system area is divided into three parts:
(1) The top part of the fixed page area. Called a non-paging area for storing pages that never swap out memory.
(2) The second part is the paging area, which holds the system code and data of the memory-resident.
(3) Finally, the direct mapping area is directly exchanged by hardware. The resident memory of these pages will never expire.
46. The implementation of virtual storage management consists of two aspects:
(1) Address change mechanism
(2) Page scheduling policy
1. A file is an ordered sequence of a set of associated elements with a symbolic name.
2. The "element" in the file is the smallest information item (Word or byte) that can be addressed.
3. A file consists of a number of minimum units called logical records. A record is a meaningful collection of information that acts as the basic unit for accessing files.
4. The length of each record of a file can be equal or unequal.
5. The slow-speed character device is also a file. such as keyboard input files, printer files
6. The software organization responsible for managing and accessing file information in the operating system is called a file management system, referred to as file system.
7. The file system consists of three parts
(1) Software related to file management
(2) Managed documents
(3) Data structures required for the implementation of file management
8. After adding the File Management section to the operating system, the user benefits:
(1) Ease of use: Access is achieved by name.
(2) Data security: Provide protection measures to prevent unintentional destruction of documents.
(3) The unity of the interface: the ability to use unified generalized instructions or system to access files on a variety of media.
9. Documents are classified by nature and use:
(1) System files
(2) Library file
(3) User files
10. System files: The user is not directly open, only through the system call for the user Service.
11. library File: Consent to user calls, but do not agree to user changes.
12. User files: Files saved by the user entrusted to the operating system.
user files are classified according to usage:
(1) Temporary documents
(2) Archive file
(3) Permanent files
13. The form of protection according to the document is divided into:
(1) Read only documents
(2) Read and write files
(3) Do not protect files
14. The flow of information by file is divided into:
(1) Input file: such as keyboard input file. can only enter
(2) Output file: such as printer file, can only output
(3) Input and output files: Files on disk, tape. Readable and writable
15. The important role of the file system is to establish a mapping between the user's logical files and the physical files on the corresponding device, to achieve the conversion between the two.
16. The file access method is determined by the nature of the document and the requirements of the user's use of the document.
17. Two logical structures of the file:
(1) structured, documented documents
(2) Non-structured streaming files
18. Recorded documents are divided into:
(1) Fixed length record file
(2) Variable length recording file
19. Each block is called a physical block. The information in a block is called a physical record.
20. Physical structure of the file
(1) Continuous structure
(2) Series structure
(3) Index file
(4) Hash file
21. If the information of a logical file is stored in an adjacent physical block on the file memory, it is said that the file is a continuous file (also known as a sequential file), which is a continuous structure.
22. The tandem structure is also called the link structure. The disadvantage is that it is only suitable for sequential access and is not easy to access directly.
23. The index file requires the creation of an index table for each file, each of which indicates the physical block number where the logical record of the file resides.
24. The index table is created by the system itself when the file is established and placed on the same file volume as the file.
25. The physical block that holds the index table is called the Index table block.
26. How multiple indexed blocks are organized:
(1) Serial file mode
(2) Multi-index method
the physical structure of a. UNIX file is a multi-index structure. The logical structure is a streaming file.
Hash method , also known as hash method, hash method
the hash method has different key values after the calculation. You might get the same key value, which is called an "address conflict."
30. The solution to address conflicts is called overflow processing technology. This is the main consideration in designing the Hash file. Methods are: Sequential exploration method, two-time hashing method and so on.
31. The file access method refers to the method of reading and writing a physical block on the file memory.
32. File access Method:
(1) Sequential access method
(2) Direct access method
(3) Key access method
33. In a system that provides a record-file structure. Sequential access methods are accessed strictly in the order in which the physical records are arranged.
Assuming that the record currently being accessed is i, the next record to be accessed is the active i+1.
34. The direct access method is suitable for the index table.
35. Key access method is accessed according to the contents of each record in the file.
36. The physical structure of the file depends on:
(1) Characteristics of file memory
(2) Access method
37. Assuming the direct access method, the index file efficiency is highest, the continuous file efficiency is centered, the series file efficiency is lowest.
38. Multilevel folder structure is also called Tree folder structure.
39. In the tree folder, the root node is called the root folder, and the minor points are called sub-folders, and the leaf nodes are called information files.
40. Both the root folder and the subfolder are files, called folder files.
41. Two ways to represent file names in a tree folder structure:
(1) Absolute path name
(2) Relative path name
42. Absolute path names always start from the root folder and are unique.
Assuming that the first character of the pathname is a delimiter, then this path is the absolute path.
43. Note the "point" and "dot" notation.
each folder entry in the folder structure used by UNIX includes: A file name and an I node number.
45. The basic idea of a bit diagram is to compose a graph with several bytes, one physical block in each byte of the corresponding file memory.
46. The bit diagram can reflect the allocation of disk blocks. Also known as a disk diagram.
47. The bit diagram is saved in memory.
48. Ways to implement file sharing:
(1) Sharing with the same name
(2) sharing with another name
49. Share with the same name: Each user uses the same file name (including its path) to access a file.
50. Different name sharing: Each user visits a file using their own file name.
51. The method used for sharing the name is called the hook of the file.
52. Two ways to implement hook:
(1) Share based on the index node (hard connect)
(2) sharing based on symbolic chain (soft connection)
53. Read your own book P155
54. Piping is a special file that is a special open file.
55. Piping components:
(1) A external memory index node
(2) The corresponding Memory index node
(3) Two system Open File table
56. After the process creates a pipeline file, it then creates one or more child processes.
The child process inherits all the open files of the parent process, and the pipeline files created by the parent process are shared by the child process.
57. The pipeline file is a temporary file that implements inter-process communication with disk as an intermediary, compared to memory. The communication speed is relatively slow. Only suitable for communication between parent-child processes.
58. Pipeline file to solve two special problems: Pipeline file read and write synchronization and mutual exclusion.
59. When the process writes data to the pipeline. When the data being written is greater than the specified length, the write process is suspended until the data is taken away by the read process and then the process is awakened. When the read process reads data from the pipeline, the read process should be suspended when the data in the pipeline is read, and the read process is woken when the write process is writing data to the pipeline again.
60. When reading and writing are mutually exclusive. Prevent several processes at the same time to read and write to the pipeline files, the implementation of the first lock before operation.
61. Access control matrix. In memory. Compare the access rights of the file to the user's access. If inconsistent, access is denied.
62. System calls that the file system provides to the user:
(1) Create / Delete
(2) Open / close
(3) Read / write Files
1. The IO device is divided by the usage characteristics:
(1) Storage device
(2) input
(3) Terminal equipment
(4) Offline equipment
2. The IO device is divided by its affiliation:
(1) System equipment: printer, disk, clock
(2) User equipment
3. The IO device is divided by the resource allocation angle:
(1) Exclusive devices: Most low-speed IO devices. Printer
(2) shared device:
(3) Virtual appliance: Theoriginal exclusive device is transformed into a device that can be shared by several processes through spooling (spooling) technology.
4. IO devices are divided by the number of data transfers
(1) Character device: Data transfer in bytes.
Printer
(2) block device: Data transmission is in block units.
Disk
5. A disk with only one platter is called a diskette.
A disk consisting of several platters is called a hard disk.
6. The disk consists of two parts:
(1) Rotating body
(2) reading and writing pen
7. Track: The access arm moves to a fixed position, and the corresponding head is drawn on the disk in a circle.
8. Each track has the same number of sectors, and each sector has the same number of bytes.
9. The physical address of the physical block consists of three parts:
(1) Cylinder number
(2) Track number
(3) Physical record number
10. The time to read and write each sector is the same.
One. IO control mode:
(1) Cyclic IO test mode
(2) Program interrupt IO mode
(3) DMA mode
(4) Channel mode
12. Cyclic IO test mode,CPU time is used in waiting for input, output and cyclic detection, the efficiency is very low.
13. Program Interrupt IO mode. interrupts the CPU only if the IO operation is normal or ends unexpectedly . Achieve a certain degree of parallelism.
DMA Mode , the block device supports DMA mode.
15. The device controller consists of three parts:
(1) Device controller and CPU Interface: Data cable, Address line, control line
(2) Device controller and device interface: data signal, control signal, status signal
(3) IO logic
16. A computer system with a channel structure. Main memory, channel, controller, equipment between the use of four-level connection, three-level control.
17. Take the io operationafter the channel: when theCPU runs the user program, if it encounters an IO request, it uses io The command launches the selected device on the specified channel, once it has started successfully. The channel starts to control the device for operation.
When the device IO operation is complete, the channel issues io, ends the interrupt,theCPU stops the current operation, and turns to the interrupt service program.
18. The channel is divided into three categories according to the information Exchange Mode and the connecting device:
(1) byte multi-channel
(2) Select Channel
(3) Array multichannel
19. Byte multichannel: Set up to connect a large number of slow devices. Cross work in bytes. When a device transmits a byte, it goes right away to send a byte to a device.
20. Select the Channel: Connect the high-speed device. Work in a group way. Serve only one device at a time.
21. Array Multichannel: Run one channel command for one device, then self-convert, and run a channel command for a single device.
22. Because of the high cost of the channel, the channel is far less than the equipment.
the instructions for the. IO processor are called Channel commands.
A channel command is called a channel command word (CCW). A program written with a channel command is called a channel program, also called an IO program. The process of writing channel programs is called Channel programming or IO programming.
24. Access to two fixed memory units during channel input and output: Channel address word (CAW), channel status word (CSW)
25. The input and output instructions are the central processor's instructions. Such directives are privileged directives and can only be executed in a tubular state.
26. When the user program requires the transfer of data between main memory and IO devices, the IO requirements are presented to the operating system in the form of generalized instructions or system calls in the user program . In this way, the status of the processor is entered into the Tube state by the calculation state, the System program executed under the control can use the IO instruction.
between the CPU and the channel is a master-slave relationship. the CPU is the primary device, and the channel is from the device.
the method of communication between the CPU and the channel is:
(1) The IO instruction is sent by the CPU to the io channel . The command channel works. And check the status of their work.
(2) The channel is reported to the CPU in interrupt mode . Wait for CPU processing.
objectives of the IO software design:
(1) Device independence
(2) Error handling
(3) Synchronous asynchronous transmission
(4) handling the IO Operations of exclusive devices and shared devices
30. Errors should be handled in a location close to the hardware.
Only when the underlying software can not handle the situation to notify the high-level software.
The IO system should be organized into 4 levels:
(1) Interrupt handling procedure (minimum)
(2) device driver
(3) device-independent IO software
(4) User space IO Software (max)
32. The interrupt handler is located at the very bottom of the IO system.
When an IO operation is required by the process , the operating system hangs the process, which is plugged in. The interrupt is raised until the IO operation ends.
When a fault occurs, the interrupt handler runs the corresponding operation to remove the blocking state of the corresponding process.
33. Each device driver handles only one device or a class of closely related devices.
34. The blocked driver must be awakened by an interrupt.
35. Device-independent IO software:
(1) Device naming
(2) Equipment protection
(3) device-independent block size
(4) Data buffering
(5) Allocation of data blocks
(6) Allocation and release of exclusive equipment
(7) Error handling
36. Buffering technology includes input buffering and output buffering.
37. Input buffering: The operating system has read data from the device into the system store before the user process needs data.
38. Output buffering: The operating system first writes the data to be output to the system buffer, and when the process continues execution, the data is sent to the device output.
39. The buffer is divided by the mode of use:
(1) Dedicated buffer
(2) Universal buffers
40. Buffer pool: Common buffering technology
41. The buffer pool should have four working buffers:
(1) working buffer for hosting input data
(2) working buffer for extracting input data
(3) working buffer for hosting output data
(4) working buffer for extracting output data
42.4 ways to work with buffer pools
(1) Admission input
(2) Extract input
(3) Reception output
(4) Extract output
43. The operating system's management of block devices typically uses buffer pool technology.
In order to improve the reading and writing efficiency of block equipment, the operating system adopts pre-reading and delay writing technology extensively.
44. Disk drive scheduling is the first to move the arm scheduling. And then the rotation schedule.
45. Focus: ARM scheduling algorithm!
46. 4 types of data structures for device allocation:
(1) Device control block (UCB)
(2) Controller control block (CUCB)
(3) channel control block (CCB)
(4) System Equipment table (SDT)
47. Once a channel procedure is started, it continues until the end. There is no interruption until it is finished.
So IO Scheduling cannot use the time slice rotation method.
48. device allocation steps for single-channel IO Systems:
(1) Allocation equipment: According to process N proposed process name (from the logical device name to the physical device name), to retrieve SDT, from which to find the physical device UCB, based on UCB The state of the device, I know the busy idle. If busy. the process that requires IO is inserted into the wait queue waiting for the device. If not busy, can be assigned.
(2) Assigning the controller: When the system assigns the device to the process of the required IO , the controller table pointer from the UCB is found to the controller table CUCBconnected to the device. Check the status information for the table again. If busy. Inserts a process into the queue that waits for the controller, if not busy. The controller is assigned to the process.
(3) Allocation channel: Through CUCB find the channel table connected to this controller, from which to understand the status information of this channel.
If busy. The process is inserted into the channel and waits, if not busy. Assigns a channel to a process.
(4) Therefore, the process requested by the IO device, controller, channel has been obtained, it is able to carry out information transmission.
GitHub home: https://github.com/chenyufeng1991. Welcome to visit us!
Summary of basic concepts of operating system learning