20145306 "Information Security system Design Fundamentals" 13th Week Study Summary

Source: Internet
Author: User

20145306 "Fundamentals of Information Security system design" 13th Week study summary Textbook Learning contents Summary 11th Chapter Network Programming Client-server model:

Each network application is based on the client-server model. An application consists of a server process and one or more client processes. The server manages a resource and provides the client with some kind of service by manipulating resources. Both the client and the server are processes.

The client server thing consists of four steps:

When the client needs a service, it sends a request (transaction) to the server, interprets it when the server receives the request, and operates its resources in the appropriate way; The server sends a response to the client and waits for the next request; The client receives the response and processes it.

Internet

For a host, the network is an I/O Device: Data received from the network is copied from the adapter through the I/O and the memory bus to the memory. In physics, the network is a hierarchical system of geographical distance: the lowest layer is LAN (LAN), the most popular LAN technology is Ethernet.

Ethernet segment: Includes some cables and hubs. Each cable has the same maximum bit bandwidth, and the hub replicates each bit received on one port to all ports, so each host can see each bit. Each Ethernet adapter has a globally unique 48-bit address stored on the adapter's non-volatile memory. A host can send a bit (frame) to any other host in this network segment. Each frame consists of a fixed number of head bits (identifying the source and destination address and frame length of this frame) and data bits. This frame is visible to each host, but only the destination host reads the frame. Multiple Ethernet segments can be connected to a larger LAN, known as bridged Ethernet. The bandwidth of these cables can be different. Multiple incompatible LANs can be connected by a special computer called a router to form an Internet internetwork.

Important features of the Internet: the use of different technologies, non-compatible LAN and WAN composition of the Internet, and to achieve mutual communication. The solution to communication between different networks is a layer of protocol software running on each host and router, eliminating the differences between different networks. The protocol provides a single host delivery mechanism that defines the same way that data bits are bundled into discrete slices.

Global IP Internet

Each Internet host is running software that implements the TCP/IP protocol. The Internet's client and server mix uses socket interface functions and UNIX I/O functions to communicate. Consider the internet as a world-wide host collection that meets the following features: The host collection is mapped to a 32-bit IP address that is mapped to an Internet domain name, and processes on the Internet host can connect to processes on other hosts.

Internet domain Name: The user-friendly name for the IP address.

Internet links

Internet clients and servers communicate by sending and receiving byte streams on the connection.

On Unix machines, file/etc/services contains a comprehensive list of services provided by this machine and their port numbers.

A link is uniquely determined by the socket address at its ends, called a socket pair.

Socket interface

Function:

    • Socket function
    • Connect function
    • OPEN_CLIENTFD function
    • Bind function
    • Listen function
    • OPEN_LISTENFD function
    • Accept function

sockaddr_in 16-byte structure: The in_family member is a af_inet Sin_port member is a 16-bit port number SIN_ADDR member is a 32-bit IP address. The IP address and port number are always stored in network byte order (big-endian). _IN is an abbreviation for the internetwork, not an abbreviation for inputting input.

Web server

The Web server communicates with each other using the HTTP protocol (hypertext Transfer Protocol, Hypertext Transfer Protocol) and their clients (browsers, etc.). A WEB client (that is, a browser) opens an Internet connection to the server and sends out the requested content (the browser requests static or dynamic content from the server) and then closes the connection after the server responds to the requested content. The browser reads the content and displays it on the screen. The request to the static content is served by taking the file from the server disk and returning it to the client, and the request to the dynamic content is serviced by running a program in the context of the server's previous child process and returning its output to the client.

The CGI standard provides a set of rules to manage how clients pass program parameters to the server. How the server passes these parameters and other information to the child process, and how the child process sends its output back to the client.

Web content can be written in a language called HTML (hypertext Markup Language, Hyper-text markup language). An HTML Program (page) contains directives (tags) that tell the browser how to display various text and graphics objects on this page.

12th Chapter Concurrent Process

Concurrency: Logical control flows overlap in time.

Concurrent programs: Applications that use application-level concurrency are called concurrent programs.

Three basic ways to construct concurrent programs:

Process, with the kernel to invoke and maintain, there is a separate virtual address space, explicit inter-process communication mechanism.

I/O multiplexing, an application that explicitly dispatches a control flow in the context of a process. The logical flow is modeled as a state machine.

A thread that runs a logical stream in a single process context. Dispatched by the kernel to share the same virtual address space.

Code link

20145306 "Information Security system Design Fundamentals" 13th Week Study Summary

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.