A Process control block is a data structure that describes the state and attributes of a process, and a process can have only a single process control block.
Compile: Make grammar check, function allocate space, compile each function into binary code, generate target file according to specific target file format. Connection: Connect the target file compiled by each file in the program, and connect it with the resources provided by the system (such as function library) as a whole to get the executable file. Run: Perform a connected program. Relocation: The process of changing the logical address space of a program into an actual physical address space in memory, that is, the process of modifying instructions and data in the target program when loading. There are 8 printers in a computer system, competing with the K process, which requires up to 3 printers per process. The minimum value of K for which the system may be deadlocked is due to the fact that each process requires a maximum of 3 printers to end normally, freeing up the occupied resources. So now there are k processes, the worst case is that the K process each process assigned two printers, then the process is deadlocked here each is waiting to allocate a third printer, as long as there is a printer, the process can be released in succession, does not produce a deadlock, so the condition is not to create a deadlock is 2k+1<=8 K <3.5, so the minimum value (integer) of the k that may occur is the 4 program link in a total of three ways: 1. Static link mode (static linking) 2. Dynamic Link loading (load-time dynamically linking) 3. Runtime dynamic linking ( Run-time Dynamic Linking)
Class A: 1.0.0.1~126.255.255.254 first byte range 1~126 (0000 0001~0111 1110) ' 0 ' starts with Class B: 128.0.0.1 to 191.255.255.254 First byte range 128~191 (1000 0000~1011 1111) ' 10 ' starts with Class C: 192.0.0.1 to 223.255.255.254 the first byte range 192~223 (1100 0000~1101 1111) ' 110 ' begins
1. Class A Address ⑴ Class A address 1th byte is the network address, the other 3 bytes is the host address. The top bit of the 1th byte is also fixed to 0. ⑵a class address range: 1.0.0.1 to 126.255.255.254. Private address and reserved address in ⑶a class address: ①10.0.0.0 to 10.255.255.255 is a private address (the so-called private address is not used on the Internet, but is used in the local area network address). ②127.0.0.0 to 127.255.255.255 is a reserved address for use as a cyclic test. 2. Class B Address ⑴ class B address the 1th and 2nd bytes are network addresses, and the other 2 bytes are host addresses. The first two bits of the 1th byte are also fixed to 10. ⑵b class address range: 128.0.0.1 to 191.255.255.254. The private address of the ⑶b class address and the reserved address ①172.16.0.0 to 172.31.255.255 are private addresses ②169.254.0.0 to 169.254.255.255 are reserved addresses. If your IP address is automatically getting an IP address and you do not find a DHCP server available on the network, you will get an IP address from 169.254.0.0 to 169.254.255.255. 3. Class C Address ⑴c class address the 1th byte, the 2nd byte, and the 3rd byte are the network addresses, and the 4th bytes are the host addresses. The first three bits of the 1th byte are also fixed to 110. ⑵c class address range: 192.0.0.1 to 223.255.255.254. Private address in ⑶c class address: 192.168.0.0 to 192.168.255.255 is a private address.
123 |
SMTP:定义了简单邮件传送协议,现在很多邮件服务器都用的是这个协议,用于发送邮件。 如常见的免费邮件服务中用的就是这个邮件服务端口,所以在电子邮件设置中常看到有这么SMTP端口设置这个栏, 服务器开放的是 25 号端口。 |
---
123456 |
FTP:
21
端口用于连接,
20
端口用于传输数据
进行FTP文件传输中,客户端首先连接到FTP服务器的
21
端口,进行用户的认证,认证成功后,要传输文件时,服务器会开一个
端口为
20
来进行传输数据文件。 也就是说,端口
20
才是真正传输所用到的端口,端口
21
只用于FTP的登陆认证。我们平常下载文件
时,会遇到下载到
99
%时,文件不完成,不能成功的下载。其实是因为文件下载完毕后,还要在
21
端口再行进行用户认证,而下载文
件的时间如果过长,客户机与服务器的
21
端口的连接会被服务器认为是超时连接而中断掉,就是这个原因。解决方法就是设置
21
端口
的响应时间。
|
255,255,240,0 corresponding binary is 11111111|11111111|11110000|00000000, we know the last 1 is the subnet, then the corresponding remaining position is the number of hosts can be placed, so is 2 of 12 power, 4096
The number of bits in the subnet mask is the number of bits in the host, a total of 12 bits, so there can be 2 12 parties, a total of 4,096, but to remove all 0 and 1, and finally only 4,094
If the recv function is raised on a socket that establishes a TCP connection, the return value is 0, indicating that the connection is closed on the peer
Return Description:
When executed successfully, returns the number of bytes received.
0 is returned when the other end is closed.
Failure returns-1,
When the server is more static content, the keep-alive is turned on to increase transmission efficiency. Dynamic requests, resources that have been consumed are not released and inefficient.
We know that now we use the small plastic box broadband router, you can configure a WAN port IP address, or by PPPoE to obtain an IP address, LAN port can be set up an IP address, so that the maximum can only access two network segments. Because it does not have a virtual interface (also called a sub-interface) feature. A high-end carrier-class router that can set up a virtual interface (sub-interface) on a physical port and configure IP addresses and routing policies for each sub-interface. Its on/Xia Lian link is accessed using standard 802.1Q VLAN trunking, and we know that according to IEEE specifications, there can be a maximum of 4,096 VLANs, so that the trunk link can contain up to 4,096 network segments. And if two physical interfaces respectively access 4,096 VLANs, and each VLAN through a variable length mask and so on each network segment address is not directly interlinked, then a two-port router on both sides have 4,096 network segments, the two sides add together is 8,192 network segment, of course, more than 4.
Crontab is composed of six chunks, as follows:
Min (min) HOUR (Hours) day (date) month (month) DAYOFWEEK (week) command (command)
/etc/services files are records of the network service names and their corresponding port numbers and protocols. /ETC/NSSWITCH.CONF specifies which channels and in what order to find specific types of information. You can also specify what action the system will take if a method works or fails. The/etc/hosts is a file that configures the IP address and its corresponding hostname, where you can log the IP of the machine or other host and its corresponding host name. Different Linux versions, this configuration file may also be different file/etc/nsswitch.conf (Name Service switch configuration, name Services switch config) Specify which channels and in what order to find specific types of information. You can also specify what action the system will take if a method works or fails.
Each row in the Nsswitch.conf configuration indicates how to search for information, with each line configured in the following format:
Info:method[[action] [method[[action]] [...]
where info specifies the type of information that the line describes, and method is used to find the information, and the action is the response to the previous method return state. Action should be placed in square brackets. A hard link to Linux cannot be linked to a directory because the introduction of a hard connection to a directory might introduce loops in the directory, and the system would be stuck in an infinite loop when the directory was traversed, which would result in the inability to navigate to the directory. Hard link: Creates a new file name for the original file, but only adds a directory entry in its essence and uses the same inode as the original, pointing to the original file's area. The data area is shared with two names. Usage restrictions: Source files and linked files must be within the same file system, and catalog files cannot create hard links. Command: LN a b//create a link file for a B you can use Ls-i to see the two inode is exactly the same. Also note the connection count count. The meaning of count is the number of hard links for a file, and for a directory, general (COUNT-2) is the number of sub-files that the directory contains. Note: The permissions for both are exactly the same. Read and write to one of them, and the other one will be updated. But deleting one of them only deletes the catalog entry and does not delete the store data. The use and operation of another file is completely unaffected. The data area is not deleted unless you count-1 result 0. Role: Save space, two files can be updated synchronously, to prevent important files are "mistakenly deleted." Soft Links: Also called Symbolic links. The essence is to create a new file that holds the path name of the source file. Therefore, the inode is not the same as the inode of the source file. There are no file system restrictions, and there are no file and directory restrictions. Command: Ln-s A b Note: The resulting file permissions and source files are not the same. Because soft links use more flexible, may break the chain, also can self-cycle, often need to find more steps to increase the file operation and reduce efficiency. Use as little as possible and avoid loops. Symbolic links are also called soft connections.
A hard link is a file that has one or more filenames.
A soft connection is a point where another file exists within a file. 1, hard connection for the same volume at the file level, not allowed to create a hard link to the directory;
2. Hard connections cannot span volumes, and links can only be created between files in the same file system. wc-l only output file lines the function of the WC (Word Count) command in a Linux system is to statistically specify the number of bytes, words, and lines in the file, and display the output of the statistics. 1. Command format: WC [options] File ... 2. Command function: Counts the number of bytes, words, and lines in the specified file, and displays the output of the statistic results. This command counts the number of bytes, word count, and number of lines in the specified file. If the file name is not given, it is read from the standard input. The WC also gives the president count of the files specified. 3. Command parameters:-C counts bytes. -L counts the number of rows. -M counts the number of characters. This flag cannot be used with the-C flag. -W count words. A word is defined as a string separated by a blank, a jump, or a newline character. -L Prints the length of the longest line. -HELP Display Help Information--version display version information 4. Usages: Instance 1: View the number of bytes, words, and lines of a file command: WC test.txt output: [[email protected] test]# cat test.txt Hnlinuxpeida.cnblogs.comubuntuubuntu linuxredhatredhatlinuxmint[[email protected] test]# WC test.txt 7 8 test.txt[[email protected] test]# wc-l test.txt 7 test.txt[[email protected] test]# wc-c test . txt 70 test.txt[[email protected] test]# wc-w test.txt 8 test.txt[[email protected] test]# wc-m Test.txt 70 test.txt[[email protected] test]# wc-l test.txt 17 test.txt Description: 7 8 Test.txt line number of words number of bytes file name Instance 2: How to do with WC command Print statistics not print file name command: output: [[Email proTected] test]# wc-l test.txt 7 test.txt[[email protected] test]# cat test.txt |wc-l7[[email protected] t EST] #说明: Use pipe lines, which is especially useful when writing shell scripts. Example 3: Used to count the number of files in the current directory command: ls-l | Wc-l output: [[email protected] test]# CD test6[[email protected] test6]# ll Total 604---xr--r--1 root mail 30210 8 11-30 08:39 linklog.log---xr--r--1 mail users 302108 11-30 08:39 log2012.log-rw-r--r--1 mail users 61 11 -30 08:39 log2013.log-rw-r--r--1 root mail 0 11-30 08:39 log2014.log-rw-r--r--1 root mail &N Bsp 0 11-30 08:39 log2015.log-rw-r--r--1 root mail 0 11-30 08:39 log2016.log-rw-r--r--1 root mai L 0 11-30 08:39 log2017.log[[email protected] test6]# ls-l | Wc-l8[[email protected] Test6] #说明: The number contains the current directory linux execution LS, which system calls the shell command execution mechanism is fork+exec, Fork is a fen, and Execve is a change of body. The LS command lists the files under the directory, so read is also called. Note that the problem is that system call is not a library function, it is the interface provided by the Linux kernel to the outside world, the library function just encapsulates these interfaces, and ls reads the folder so it uses read to call LSThis program will use EXECV, the title is not called LS in the shell, so there is no fork, perhaps your code manually through the EXEC system function call Ls nmap is the network Mapper, The first is the network scan and sniffer toolkit under Linux.
Nmapis a network connection-side scanning software, used to scan the Internet computer Open network connection. The EXECVE function is the lowest implementation of all the executing program functions
Death Throes-1