Summary of the eighth cycle of the Design foundation of information security system

Source: Internet
Author: User
Tags mul asymmetric encryption

Chapter1 Key Knowledge Review outline one, WEEK2

1. Learning Objectives

① can install the Linux operating system independently  ② can skillfully use the basic commands of the Linux system  ③ skilled use of Linux User management commands/system-related commands/file directory related commands/packaging compression related commands/Compare merge related commands/network-related commands ④ skilled application " Search for "Learning with extrapolate
2. Key points of knowledge

① Key Learning

Cheat/find/locate/grep/man/whereis/which/apt-get

② the commands to be mastered this semester are:

Ac,apt-get,bzip2,cat,chgrp,chmod,chown,clear,compress,cp,dd,df,diff,du,dump,evn,find,finger,free,grep,gzip, Head,kill,less,ln,locate,l,gout,ls,man,mkdir,more,mount,mt,mv,netstat,nslookup,od,passwd,patch,ps,pstop,pwd,rm , Shell,sort,ssh,stty,tail,tar,telnet,touch,tree,uname,unzip,vi,vim,whereis,which,who,write, etc.
Second, WEEK3 (Teaching Materials: Chapter one, chapter seventh;"Embedded Linux application Development Standard Tutorial" chapter III 3.1-3.5)

1. Learning Objectives

① familiar with the development environment of Linux system ② familiar with the   basic operation of VI ③ familiar with the basics   of the GCC compiler   ④ skilled use of the GCC compiler common options   ⑤ skilled use of GDB debugging technology   ⑥ familiar with Makefile basic principles and grammatical norms   ⑦ mastering the generation of static and dynamic libraries

2. Key points of knowledge

①vim
The uppercase "K" can be used to find help for the function: Look at the man page, in command mode, place the cursor on the function name, press "K" to see the mans page directly. : Set NU Display line number: Set AI auto indent: Set ts=4 set a tab equal to several spaces [[go to previous ' {'] in first column] go to the next "{" {"{"} to the last empty row in the first column} go to the next empty line GD go to the definition of the local variable referred to by the current cursor

②gcc

GNU CC (referred to as GCC) is an ANSI C-compliant compilation system in the GNU project that compiles programs written in languages such as C, C + +, and object C. GCC is also a cross-platform compiler that can develop software on the current CPU platform for a variety of hardware platforms of different architectures, so it is especially suitable for development in the embedded domain.

The process of compiling the code for GCC is as follows:

Preprocessing: Gcc–e hello.c–o hello.i;gcc–e call cpp compile: Gcc–s hello.i–o hello.s;gcc–s Call CCL Assembler: Gcc–c hello.s–o hello.o;gcc-c Call a S link: gcc hello.o–o hello; gcc-o call ld
③GDB recommends using CGDB, better than GDB, familiar with the VC debugging methods, you can use DDD. Note Use GCC to compile with the "-G" parameter.
GdB Programm (start gdb) b set Breakpoints (to set 4 breakpoints: Line breakpoint, function breakpoint, conditional breakpoint, temporary breakpoint) run starts the program BT print function call stack p view Variable value c Continue running from current breakpoint to next breakpoint N step run s step up quit GDB
Display tracking variable value change until jump out of the loop finish jump function help
④ Search Ability:
1 man:man-k  (equivalent to apropos)  2 CHEAT3 find  locate4 which whereis5 Apt-cache search
⑤ Requirements:
The first chapter: P1 Understanding information is a bit + context P2 View source files can be used OD command: od-tc-tx1 HELLO.CP5 von Structure, understand the operation of the P6 CPU execution instructions (loading, storage, operation, jump) p9 The core idea of the storage System: Cache P10 Operating system core abstraction ( File, virtual storage, process, virtual machine): Can guide you to learn the operating system of the seventh chapter: P450 linker Two tasks, the target file of three forms, the target file format (a.out coffpe ELF): These four formats, especially pe,elf format is the letter Ann Professional students to master, Is the basis for studying malicious code such as viruses p451:elf file format: Try readelf command p455: Understand the parsing of global symbols: learn multiple modules. p473: Tools for working with target files
Iii. Week4 (chapter II, "Representation and processing of information") 1. Learning Objectives
① Understanding the importance of binary in computer ② mastering the application of Boolean operation in C language ③ understanding signed integers, unsigned integers, floating point representation ④ Understanding the importance of complement ⑤ avoids overflow in C, traps in data type conversions, and vulnerabilities that can result
2. Key points of knowledge
P20: Three kinds of numbers: unsigned number, signed number (2 complement), floating point, the cause of the vulnerability (reverse) P22: binary conversion, take binary production intermediate results P25:gcc-m32 can generate 32-bit code P26 on 64-bit machines (such as the Lab Building environment): Byte order is the basis of network programming, remember that the small end is "high-to-high, low-to-low", the big-endian opposite it can be. P32: Distinguishes between logical operations (the result is 1 or 0) and bitwise operations (the result is a bit vector), all the logical operations can be used with, or, non-expression (maximum, minimum), and or can not be used "and non" or "or non" expression, so as long as a and non-gate, you can complete all the logical operation P33: Mask is an important application of bit operations, can be placed on a specific bit, can clear 0 P38: To use the "long Long" type in C99, compile is to use the GCC-STD=C99P39: complement of the use of the length of the register is a fixed feature to simplify the mathematical operation. Think of clocks, 12-1 is equivalent to 12 + 11, the use of complement can be used to unify mathematical operations into addition, as long as an adder can achieve all the mathematical operations. P44: Note The conversion rules for signed and unsigned numbers in C, and the bit vectors do not change. Think of the message in Chapter one is "bit + context" P48: negative and positive (reverse thinking of information Security) p49:0 extension and symbol extension P54: integer arithmetic Overflow and avoidance method P67: The last thought on integer arithmetic p67: floating-point numbers and scientific notation, IEEE standard 754P68: Imprecision of floating-point arithmetic and rounding p70:ieee floating-point standard, float/double type p74: integers and floating-point numbers represent the same number of relationships p78: integer and floating-point conversion rules
Iii. Week5 (Third chapter of the textbook, machine-level representation of the program) 1. Learning Objectives
① understand the concept of reverse and ② master the X86 compilation basis, be able to read (reverse) Assembly code ③ Understanding of ISA (instruction set architecture) ④ understand the concept of function call stack frame, and can be debugged with GDB
2. Key points of knowledge
p104, p105:x86 addressing way of the definition of the three generations of P106:isa, Isa needs everyone to summarize the law, extrapolate, such as can be compared to learn arm isa;pc register to understand well; P107:gcc-s xxx.c-o xxx.s Get assembly code, can also use objdump-d XXX disassembly; Note that the first two and the last two assembly code, all functions have, build function call stack frame, should understand, memorize. p108: Binary files can be viewed with the Od command, or by GDB's X command. Some of the output is too much, we can use the more or less command in conjunction with a pipe view, or you can use output redirection to view OD CODE.O | More;od CODE.O > Code.txtp109:gcc-s produced by the Assembly can be put in "." The beginning of the statement was deleted and then read p110: Understanding the Linux and Windows assembly format is a bit different: ATT format and Intel format p111: assembly code suffix for different data in the table p112: These registers need to be understood in depth and know their usefulness. ESI EDI can be used to manipulate arrays, esp EBP is used to manipulate stack frames. For registers, especially the Eax,ebx,ecx,edx in the General register, we should understand that the ah,al of the ax,8 bits of the 32-bit eax,16 bits are independent, and we illustrate p113 by the following example: Combining tables, in-depth understanding of the various addressing modes; understanding three types of operands: immediate , register, memory, master effective Address calculation method Imm (eb,ei,s) = Imm + R[eb] + R[ei]*sp114:mov equivalent to the C language Assignment "=", pay attention to the ATT format in the direction, note that can not from the memory address direct MOV to another memory address, Use register to relay. Can distinguish Mov,movs,movz, master push,popp115/p116: Stack frame and push pop; Note that the address of the top element of the stack is the lowest of all the element addresses in the stack. p117: The pointer is the address, and the local variable is stored in the register. p119: To understand the arithmetic and logic operations in conjunction with the table, notice what the purpose operand is. Special attention is paid to the subtraction who subtracts who. The shift amount can be an immediate number or a number in the%CL p123: in conjunction with the C language to understand the control section, that is, the branch (If/switch), the Loop statement ( When, for) how it is implemented. Test everyone extrapolate learning ability. The core of the control is the jump statement: Conditional jump p128 (Implementation if,switch,while,for), unconditionally jump to JMP (realNow Goto) p124: conditional jump condition See status register (textbook is called Conditional Code Register) Note Leal do not change the condition code register think about it: where CMP and sub are used P125:set instructions to set conditional codes based on t=a-b results p127: jump and label p130/ The assembly structure of the P131:if-else is p132/p133:do-whilep134/p135:whilep137/p138:forp144/p145:switchp149:ia32 to implement the procedure call through the stack. Master the stack frame structure and pay attention to the stacking order of function parameters. P150/p151:call/ret; function return value exists in%eax p174:bt/frame/up/down: gdb command on stack frame

Iv. Week6 (Sixth chapter "Memory Hierarchy")

1. Learning Objectives

① understand the role of ISA Abstraction ② Master Isa and can extrapolate learn about other architectures ③ understand pipelining and implementation patterns
2. Key points of knowledge
The content of this chapter is processor architecture, focusing on Isa, and can extrapolate, design and implement a processor Y86, a class IA32 system that combines CISC and RISC thought, ISA provides an abstraction between compiler writer and processor designer.
V. Week7 ( Sixth chapter "Memory Hierarchy"

1. Learning Objectives

① Understanding common Storage technologies (RAM, ROM, disk, SSD, etc.) ② Understanding the local principle ③ understanding the caching idea ④ understanding the local principle and the application of the cache thought in the storage hierarchy ⑤ caching principle and application

2. Key points of knowledge

6.1 Sections understand three common storage technologies: ram/rom/disks, RAM with SRAM and DRAM, features and applications, ROM with Prom,eprom,e2prom,flash, disk is the focus, involves the back I/O and file system, do the relevant practice disk structure: platters, Track, sector, Gap, cylinder; disk drive disk capacity access time: Seek, rotate, transmit Logical disk Block: Memory can be considered as byte array, disk can be regarded as block array bus data bus, control bus, address bus system bus, storage bus, i/ O Bus: p395 figure to understand read and write transactions: P389 map to understand the 6.2 section of the principle of local: Time locality, spatial locality, the ability to understand p429 the last section of the "Memory Mountain" data reference locality take instruction locality 6.3 Section storage hierarchy: System view (1+1>2) (Extrapolate: Symmetric asymmetric encryption forms a hybrid encryption system, hybrid car ... Central idea: Each tier of storage devices is the next level of "cache" against p408 table Understanding 6.4-Section Cache structure (S,E,B,M): Cache group, cache line, block map hit cache management
Review of the first and fourth weeks of chapter2 test centers
2.4, 2.6, 2.8, 2.11, 2.13, 2.14, 2.18, 2.19, 2.21, 2.23, 2.24, 2.25, 2.27, 2.29, 2.33, 2.34, 2.39, 2.40, 2.42;
2.43, 2.44, 2.45, 2.47, 2.50, 2.52, 2.54

Second, week five:

3.1,3.3,3.5,3.6,3.9,3.14,3.15,3.16,3.22,3.23,3.27,3.29,3.30,3.33,3.34

Third, sixth week

4.1 4.2 4.5 4.6 4.8 4.10 4.11 4.12  4.16 4.17 4.19 4.21 4.24

Four, Seventh week

6.2 6.3 6.4  6.8 6.9 6.10 6.11 6.12 6.13
Chapter3 Consolidation Section

One, the emphasis of the class part

1. Find

Search for files of the specified file name under the specified directory:

/etc/ -name interfaces

Note the path to the Find command is the first parameter, and the basic command format is find [path] [option] [action]

Time-related command parameters:

Parameters Description
-atime Last Access time
-ctime Creation time
-mtime Last Modified Time

The following are -mtime examples of parameters:

    • -mtime n: N is a number, expressed as a modified file "within one day" before N days
    • -mtime +n: Lists files that have been modified before n days (not including the N-day itself)
    • -mtime -n: Lists files that have been modified before n days (containing the N-day itself)
    • newer file: File is an existing document, listing the new file name

List files in the home directory that have changed in the day (within 24 hours):

$ find ~ -mtime 0

List the new files in the user home directory than the code folder:

$ find ~ -newer /home/shiyanlou/Code

2. grep

grepCommands are powerful and fairly common commands that combine regular expressions to achieve very complex but efficient matching and lookups, but before you learn regular expressions, it's simple to use, and there will be a separate section about regular expressions that will continue to be learned grep later. Commands and some other commands.

grepThe general form of the command is:grep [命令选项]... 用于匹配的表达式 [文件]...

 -rThe parameter represents a recursive search for a file in a subdirectory that -n represents a print match line number, indicating that the -I binary file is ignored.

3, man

In a Linux environment, if you encounter difficulties, you can use the Man command, which is the abbreviation for the manual page.
Manual pages is a common form of online software documentation on UNIX or UNIX-like operating systems. The content includes computer programs (including libraries and system calls), formal standards and conventions, and even abstract concepts. The user can invoke the man page by executing the man command.
You can get a detailed description of a command and how to use it in the following ways:

Normally, the contents of the Man Handbook are in English, which requires you to have a certain foundation in English. The man manual is a lot of content, involving all aspects of the Linux use process, in order to facilitate the search, is to do a fascicle (sub-section) processing, in the UNIX, BSD, OS X and Linux, the manual is usually divided into 8 sections, arranged as follows:

Section Description 1 General Command 2 system calls 3 library functions, covers the C standard function library 4 special files (typically devices in/dev) and drivers 5 file formats and conventions 6 games and Screensavers 7 Miscellaneous 8 system administration commands and Daemons

To view the contents of the corresponding section, add a number to the corresponding section after the man, as follows:

All hand albums follow a common layout, which is optimized for simple ASCII text display, which may not have any form of highlighting or font control in this case. The following sections are generally included:

Name (name) This command or function, followed by a description of the line. Synopsis (summary) for the command, formally describes how it runs, and what command line parameters are required. For a function, describe the parameters required for the function, and which header file contains the definition of the function. A textual description of the DESCRIPTION (description) command or function function. Some examples of common use of EXAMPLES (example). See ALSO (refer to) a list of related commands or functions.

There may also be other parts of the content, but these parts are not standardized across manual pages. Common examples include the following:

Options (option), exit status (Exit), Environment (Environment), BUGS (Program Vulnerability), files (file), AUTHOR (author), REPORTING BUGS (known vulnerability), History and Copyright (copyrights)

There are usually a lot of things in the Man Handbook, and you may not be able to find the results you want, but fortunately you can use the search,/< in man to find the keyword you want to search for, and then you can use the N key to switch to the next keyword, shift+n where the previous keyword is located. Use space (SPACEBAR) to page, enter to scroll down one line, or use J,k (the VIM Editor's move key) to scroll backward one line forward. Press the H key to show use Help (because man uses less as the reader, which is actually the help of the less tool), press Q to exit.

Prediction of CHAPTER4 Test centers

① keyword Search

Man-k k1| grep K2 | grep 2

② Looking for macros

Grep-nr Stdio_fileno/usr/include

Where-R stands for recursive lookup,-n represents the number of rows

③ Print file contents: Cat

④ Display current file directory: LS

⑤ display currently logged in User: Who (Am I)

⑥cheat

⑦ generating commands for static library dynamic libraries

⑧makefile Command for Generation

⑨GCC compilation process

⑩GBD Debug Commands

Chapter5 error and forgotten knowledge point record

Third week:

Fill in the blanks: all the default system user names and Passwords are (Shiyanlou) in the lab building environment. Fill in the blanks: in Linux bash, CTRL + A shortcut key is (move the cursor to the input outfit, equivalent to the home key). Judgment: The man printf and man 1 printf functions are equivalent in Linux bash. OK fill in the blanks: in Linux You can use the (groups) command to know which user groups you belong to. Fill in the blanks: in Linux You can use the (chmod) command to modify a file's permissions.fill in the blanks: Linux does not have C drive, D drive, its file system directory is set by (FHS) standard. Judging: In Linux Bash, CD-commands can be switched to the ' home ' directory. X should be CD ~, CD-Switch to previous directory: in Linux Bash, the command to force delete test files is (rm-f test). Judgment: the Cat-n and NL command functions are equivalent in Linux bash. OK to judge: Linux Bash, source and. The command function is equivalent. OK fill in the blanks: in Linux Bash, the command to find files created in the home directory the day before yesterday is (find ~-ctime 2). Judging: In Linux bash, the command to package the home directory into Home.tar using the tar command is (TAR-CF Home.tar ~) in the blanks: in Linux bash, the zip command uses the (-e) parameter to create an encrypted compressed package.judgment: The DF and du command functions are equivalent in Linux bash. XFill in the blanks: LS in Linux bash. | The function of the Sort command is (show current directory contents and sort) fill in the blanks: in Linux bash, use grep to find the command in the current directory where the main function is in the file (grep main *.c) *.cfill in the blanks: in Linux Bash, the command for a few lines of code using WC statistics HELLO.C (wc-l hello.c)Judgment: The-H parameter of the col command can be used to build the tab to a number of equal spaces. X, Space tabfill in the blanks: in Linux bash, the LS command displays the results of the current directory ls.txt command output redirect command (ls > ls.txt)Fill in the blanks: in Linux Bash, the (tee) command can be redirected to multiple files at the same time.

Week Four:

Man-k fill in the blanks: there is a linear lookup algorithm in the data structure, the C standard library does not have this function function, but in Linux, this function is (Lfind or Lsearch)cheat Fill in the blanks: to list the content of/path/to/foo.tgz archive using tar (tar-jtvf/path/to/foo.tgz)Find in the blanks: finds all directories in the current directory The Find command is (find. -type d)grep fills in the blanks: the command to find the value of the macro Stdin_fileno is (Grep-nr xxx/usr/include)CH01 fill in the blanks: all information in a computer system is a bit-string representation, so-called (information) is a bit + context. CH01 fill in the blanks: the main idea of the memory hierarchy is that the upper memory is used as the underlying memory (cache). CH01 fill in the blanks: the most basic four abstractions in the operating system are (virtual machines, processes, virtual storage, files).CH07 Fill in the blanks: the two main tasks of the linker are (symbolic parsing and relocation). CH07 selection: Textbook p449 in Swap.c BUFP1 is (a) a global symbol B external symbol c local symbol D above is not the CH07 judgment: C language, global variables are strong symbols. (X) CH07 fill in the Blanks: (loader) Map the contents of the executable file to the memory and run the program. CH07 selection: In Linux, disassembly. The binary directives in the text section use a tool that is (d) A ar B strings C readelf D objdump1. In VI, the commands for viewing the scanf and printf man pages (Help document) are respectively? (2 min) K 3k2. commands to compile and run the above code (2 points) gcc *.c-o main./main3. Debug the above code with GDB: What is the command to compile the code? How do I set a breakpoint for the main function in MAIN.C? How do I set breakpoints on line sixth? (3 points) Gcc-g *.c-o main B main B 64. In addition to MAIN.C, the other 4 modules (ADD.C SUB.C mul.c div.c) of the source code does not want to give others, how to make a mymath.a static library? Main.c How to use MYMATH.A? (3 points) gcc-c add.c sub.c mul.c div.car rcvs libmymath.a add.o sub.o mul.o div.ogcc main.c-o main-l.-lm Ymath (or GCC main.c./libmymath.a-o main) 5. In addition to MAIN.C, the other 4 modules (ADD.C SUB.C mul.c div.c) of the source code does not want to give others, how to make a mymath.so shared library?  Main.c How to use mymath.so? (4 points) gcc-fpic-c add.c sub.c mul.c div.cgcc-shared-o libmymath.so add.o sub.o MUL.O div.ogcc-o Main Main.c-l.-lmymathlibmymath.so to be copied to/lib Or/usr/lib6. Write out the makefile to compile the above code, compile the target file is Testmymath, only with explicit rules can. (4 points) testmymath:main.o add.o sub.o mul.o div.o gcc main.o add.o sub.o m UL.O div.o-o testmymathmain.o:main.c head.hgcc-c main.cadd.o:add.c head.hgcc-c add.csub.o:sub.c head.hgcc-c SUB.CMU L.O:MUL.C head.hgcc-c mul.cdiv.o:div.c head.hgcc-c div.c

Week Five:

Man-k fill in the blanks: the command to display file properties (status) in Linux is (STAT)cheat Fill in the blanks: Use the du command to sort the directories or files in the current directory by the size of the command (Du-sk *| sort-rn) grep fill in the blanks: there are many C source files under the ~/test folder, find the command in which file the main function is in (grep main *.c VI Fill in the blanks: VI View the function qsort the shortcut key for the Help document is (K) gdb judgment: GdB in the next and step can be single-step tracking, according to the top-down principle should be preferred step. (X) ch01 fill in the blanks: abstraction is an important concept in CS, and in the out-of-box, the (instruction set structure) provides an abstraction of the actual processor. CH01 selection: Three levels in parallel do not contain (C).  A thread-level concurrency B instruction-level parallel C process-level concurrency D SIMDch07 fill in the blanks: gcc-f pic xxx.c in pic means (location-independent code or position-independent code) 2.4 Fill in the blanks: Calculate 0x503c + 100 = (0x50a0), result in 16 binary notation2.6 Fill in the blanks: Exercise 2.6 matches the binary total of 21 bits, denoted by the 16 binary is (0x159141)2.8 Fill in the blanks: A, b length is a byte, a=1,b=6, a|b = (7 or [00000111]) 2.11 judgment: The fourth line in the code "<=" replaced by ">=" can solve the code problem. X2.13 Judgment:/*compute X&y, only calls to functions bis and bic*/int Bool_and (int x, int y) {int result = BIC (x, y); ret Urn result;} (X)2.14 Fill in the blanks: A, b length is a byte, a=1,b=6, a| | b = (1 or True)2.18 Fill in the blanks: 16-bit machine, complement 0x8004 conversion equivalent decimal is ( -2044)2.19 Judgment: T2u4 ( -8) + 8 = (OK) 2.21 judgment: C: -2147483647-1u < -2147483647 (OK) 2.23 fill in the blanks: fun2 (0xed005380) = (0XFFFFFF80) 2 .24 fill in the blanks: four digits 0xC truncated to 3 digits, the truncation value interpreted as unsigned number is (4) 2.25 is judged: code for medium condition i<= (int) length-1 can eliminate program bug (OK) 2.27 Judge: function code can be Ruturn x+y &G T;= y; (OK) 2.29 fill in the blanks: [11000] + [11000] = ([110000]) 2.33 fill in the blanks: for four-digit complement 8, the complement of the non-representation of the decimal is (-8) 2.34 fill in the blanks: complement [100] * [101] = ([001100]) 2.40 fill in the blanks: K=31 Shift 2, plus/minus 1, expression ((x<<5)-X) 2.44 judgment: for title: (x>0) | | ((x-1) <0) The value is True (x) 2.45 fill in the blanks: binary decimal 1.101 is converted to decimal (1.625) 2.47 judgment: floating-point number 00111 is converted to decimal for 1.5 (x) 2.50 Fill in the blanks: binary number 10.110 rounds to the nearest One-second decimal value for (2.5) 2.54 judgment: f==-(-f) (OK)

Week Six:

Regex judgment: The regular expression r.t can match Rt. (x) Regex judgment: the regular R-expression zo* can match Z. (OK) CH03 fill in the blanks: starting with I386, the x86 architecture expands to 32 bits, adding a (flat) addressing mode CH03 fill in the blanks: on 64-bit machines, to compile 32-bit machine code with GCC, you need to use the (-m32) option to CH03 the blanks: for machine-level programming, Two important abstractions are (ISA, virtual address) CH03 fill in the blanks: in Linux, the command to disassemble the target code CODE.O is (objdump-d code.o) CH03 fill in the blanks: the three types of operands in the IA32 instruction are (immediate count, register, memory) 3.1 Fill in the blanks: for the figure in Exercise 3.1, the value of operand 8 (%eax,%ecx,4) is (0x11) CH03 judgment: Copy the word in memory where the address is 0x4050 to 0x405c (MOVW), ($0x4050) (x) $0x405c Judgment: The value of%esp is 0x10c, PUSHL%eax,%esp value is 0x108. (OK) 3.3 judge: Movb $0xf, (%eax) is the correct assembly statement. (OK)3.5 Fill in the blanks: the function of the DECODE1 function is (data exchange)3.6 Fill in the blanks: Instruction Leal 3 (%eax,%ecx,4),%edx the value stored in%edx is (3+X+4Y) 3.9 Fill in the blanks: the function of the Arith function is (~ ((x^y) >>3)-Z)3.14 Judgment: The assembly code does not log the type of the program value. (OK)CH03 fill in the blanks: conditional expressions in C are combined (conditional jumps and unconditional jumps) in the assembly. CH03 fill in the blanks: the loop structure in C can be implemented with (conditional test and jump combination). CH03 Select: Stack Used (ABCD) A to pass the parameter B to store the return information C save Register D local storage. CH03 fill in the blanks: in the Linux assembly, the statement that forms the stack frame for air conditioning is (push%ebp movl%esp%ebp) CH03 fill in the blanks: in the Linux assembly, the function has a return value in the presence (%EAX) register. Find: Fill in the blanks: Find files that have been changed 2 days before the current directory (find. -mtime +2-type F-print) CH04 judgment: In Y86, the visible state of the programmer includes the PC. (OK)CH04 judgment: In Y86, there are 5 double-byte instructions. (x)4.1 Y86 in JMP 0x100 corresponds to the machine code is (0x7000010000) 4.2 Y86 in 0xa00f corresponding Assembly statement is (PUSHL%eax) CH04 judgment: Y86, the status code ins indicates encountering illegal instructions. (OK) CH04 fill in the blanks: the only tool to create Y86 code is (assembler or YAS) 4.6 to judge: Y86, PUSHL is pressed into the stack is minus 4 of the value of%ESP. (x) CH04 fill in the blanks: Implementing a digital system requires three components (combinatorial logic, memory elements, clock signals). CH04 fill in the blanks: HCL representative (Hardware control Language, hardware-controlled language)4.8 Fill in the blanks: the HCL expression for XOR is (bool xor = (!a &&b) | | (a &&!b))CH04 fill in the blanks: HCL expression bool Eq = (a==b) function is (to determine whether the word A, B is equal) CH04 fill in the blanks: Y86, using the clock register to save the program counter PC, Condition code CC and (Program status Stat) CH04 fill in the blanks: Y86, Instruction execution is divided into six stages (refer, decode, execute, visit, write back, update pc) CH04 fill in the blanks: Y86 for the PC value p=100, the instruction includes a register designator byte and, constant 1, the increment generates the value (106) 4.17 Fill in the blanks: to implement the HCL code, you need to view the textbook (232 ) page of the diagram.CH04 Fill in the blanks: p266, Icode = = Iopl:ifun; The function is (addition and subtraction and the choice of the operation)4.24 fill in the blanks: why IRMMOVL in Mem_write (register to memory write)

Seventh Week:

CH06 judgment: SRAM is faster than DRAM. (OK) CH06 judgment: EEPROM can be wiped with ultraviolet light. (x) CH06 fill in the blanks: according to the carrying signal, the bus can be divided into (data bus, address bus, control bus) three kinds. 6.2 Fill in the blanks: Calculate disk Capacity (327.68G): 4 platters, 100,000 cylinders, 800 sectors per track, 512 bytes per sector. CH06 fill in the blanks: Access time for disk sectors includes three parts (seek time, rotation time, transfer time). 6.3 Fill in the blanks: the maximum rotational time is (4ms). CH06 fill in the blanks: the logical block number of a logical disk block can be translated into a ternary group (disk, track, sector). CH06 fill in the blanks: CPU uses (memory mapped I/O) technology to issue commands to I/O devices. CH06 fill in the blanks: there are two forms of locality (temporal locality, spatial locality). CH06 Judgment: The program accesses a vector, the greater the size of the space locality the better. (x) CH06 judgment: the cyclic statements in the program have good time locality and spatial locality. (OK) 6.8 Fill in the blanks: only modify the eighth line, so that the program has good spatial locality. Instead: (sum +=a[i][j][k]) CH06 fill in the blanks: the central idea of the storage hierarchy is (the upper layer as the underlying cache). CH06 fill in the blanks: when the cache is not alive, decide which block is the sacrificial block (substitution policy) to control. CH06 fill in the blanks: empty cache misses (mandatory misses or cold misses) CH06 fill in the blanks: the reason for the capacity misses is (the cache is too small) CH06 fill in the blanks: the cache structure can be described in tuples (s,e,b,m). 6.10 Fill in the blanks: cache capacity is 1024, the cache structure is ((32), 4,8,32) 6.11 fill in the blanks: How to calculate the hit ratio of 3/4 ((32-8)/32, or one miss every 4 times) CH06 judgment: The mountain ridge in memory represents the spatial locality. (x)

  

Summary of the eighth cycle of the Design foundation of information security system

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.