The first part is compiled (40 ') 1, (1/01) * 0 * Description What is the language drawing DFA (10') Second, S → Procedure calling statement / array assignment statement (10 ') process call statement: ID (ID, ID, ..., ID) assignment statement: ID (ID, ..., id): = ID (ID, ..., ID) (a) Write a LR (1) method (generated is not more than 6) (B If the semantic analysis is completed in LR analysis, the intermediate code generation is difficult based on your literary law? Third, E → E * E / E / -E / UNSIGNED-ITEGER (10 ') For the above expressions, the coded machine code is generated, the code is executed, and the expression value is left on the stack, and the designed stack machine command is designed. And write the meaning of the command. Fourth, C language, a represents the initial address of the array, and & A also also represents the initial address of the array, but sometimes it is not the same, please write A and & A type expressions (10 ') (1) file 1: Tgpedef INT A [10] [20] A a a a; a * func () {return (a);} Compile reports on Linux: Chapter 6 Warning: Return from Incompatible Pointer Type
(2) TYPEDEF INT A [10] [20] a a; a * func () {return (& a);} None type error
(3) TYPEDEF INT A [10] [20] TypedEf Int B [20] a a; b * func () {RETURN (A);} There is no type of error
(4) TYPEDEF INT A [10] [20] a a; func () {Printf ("% D,% D,% D / N, A, A 1, & A 1);} main () {func ();} Results: 134518112, 134518192, 134518912
The second part of the operating system (40 ') 5. 1, the operating system core has a strong kernel and a micro-kernel. Unix is the former. Windowsnt is the latter, brief introduction to the advantages of the microner. (4 ') 2, if only process control, its independence is expressed? After the thread is introduced, the independent changes (4 ') 3, request the page storage system to determine the size of the page size (4')
Sixth, 1. Death locks in M similar resources, the n process share it, each process can only get or release up to one resource, ask if you will stop, if: (1), set each process The number of resources required is RI 1 <= ri <= m (6 ') 2, the Windows NT page size is 4KB, using two-level page table organization, to improve the Windows NT address transformation process for increasing Cache set up 32K or 64K Page scheduling policy. (10 ') 3, assuming there is a new disk technology, that is, the disk and memory access time is on the same order, which modifications are made below to adopt a faster disk access speed. (12 ') (1) Process Scheduling (4') (2) Memory Management (4 ') (3) Disk Driver (4')
The third part of the data structure (70 points) Seven. Select (5 × 2 ') 8. Simply answer (10 × 2') Description: Seven and eight questions are very simple, mostly the small problems of the tree, eight The question and fill the blanks are similar, very simple, no copy. Nine, (5 × 5 'points) 1, a general meter, set H Represents Get Head, t means that Get Tail disserted atomic A from the following table, please give H, T operation sequence. L = ((()), (b, c), ((B, (C, A)), (C, D)), ((e), d)) 2, serial sequence T = "abcabcabca" mode String W = "abca" with KMP algorithm, seek NEXT [1:10] 3, no direction map, side non-negative weight, ask DIJKSTRA shortest path algorithm to give a spanning tree? Is this tree be a minimum spanning tree? Explanation. 4. What kind of data structure should I choose when the problem is to increase the problem in the chart? (A simple answer) This judgment is required when using this data structure. 5. Insert the keyword sequence into [45, 24, 12, 62, 70, 50, 10, 38], which is inserted into the [45, 24, 12, 62, 70, 50, 10, 38], after the one inserting a keyword, if On this basis, the keyword 62 is deleted, and the state diagram after the deletion is given.
Ten, (15 points) has N pad, there is an array A (1: N) consisting of records, each record has three domains, where N0 is the initial number of each poker, once given, COR Represents each poker flower, plum