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

Source: Internet
Author: User

20145311 "The basis of information security system design" 13th Week study summary Textbook Learning content summary 11th Chapter Network programming

Client-Server programming model

一个应用是由一个服务器进程和一个或多个客户端进程组成服务器进程 -> 管理某种资源 -> 通过操作这种资源来为它的客户端提供某种服务基本操作:事务一个客户端-服务器事务由四步组成:    当一个客户端需要服务时,向服务器发送一个请求,发起一个事务。    服务器收到请求后,解释它,并以适当的方式操作它的资源。    服务器给客户端发送一个相应,并等待下一个请求。    客户端收到响应并处理它。

Both the client and the server are processes

Internet

对主机而言,网络是一种I/O设备:从网络上接收到的数据从适配器经过I/O和存储器总线拷贝到存储器,典型地是通过DMA(直接存储器存取方式)传送。物理上,网络是一个按照地理远近组成的层次系统:最低层是LAN(局域网),最流行的局域网技术是以太网。以太网段    包括一些电缆和集线器。每根电缆都有相同的最大位带宽,集线器不加分辩地将一个端口上收到的每个位复制到其他所有的端口上,因此每台主机都能看到每个位。    每个以太网适配器都有一个全球唯一的48位地址,存储在适配器的非易失性存储器上。    一台主机可以发送一段位:帧,到这个网段内其它任何主机。每个帧包括一些固定数量的头部位(标识此帧的源和目的地址及帧长)和数据位(有效载荷)。每个主机都能看到这个帧,但是只有目的主机能读取。    使用电缆和网桥,多个以太网段可以连接成较大的局域网,称为桥接以太网。这些电缆的带宽可以是不同的。    多个不兼容的局域网可以通过叫做路由器的特殊计算机连接起来,组成一个internet互联网络。互联网重要特性:由采用不同技术,互不兼容的局域网和广域网组成,并能使其相互通信。其中不同网络相互通信的解决办法是一层运行在每台主机和路由器上的协议软件,消除不同网络的差异。协议提供的两种基本能力    命名机制:唯一的标示一台主机    传送机制:定义一种把数据位捆扎成不连续的片的同一方式

IP Address

The HTONL function converts a 32-bit integer from host byte order to network byte order.
The Ntohl function converts a 32-bit integer from network byte order to host byte.
The Htons function and the Ntohs are 16-bit integers to perform the corresponding conversions.
You can use Hostname-i to determine your own host's dotted decimal address

The network's hierarchical system is the lowest layer of LAN (LAN), and its technology is Ethernet, each Ethernet adapter has a globally unique 48 address.

12th Chapter Concurrent Programming

Concurrent programming

并发:逻辑控制流在时间上重叠并发程序:使用应用级并发的应用程序称为并发程序。三种基本的构造并发程序的方法:    进程,用内核来调用和维护,有独立的虚拟地址空间,显式的进程间通信机制。    I/O多路复用,应用程序在一个进程的上下文中显式的调度控制流。逻辑流被模型化为状态机。    线程,运行在一个单一进程上下文中的逻辑流。由内核进行调度,共享同一个虚拟地址空间。

Synchronizing Threads with semaphores

共享变量引入了同步错误的可能性。线程i的循环代码分解为五部分:    Hi:在循环头部的指令块    Li:加载共享变量cnt到寄存器%eax的指令,%eax表示线程i中的寄存器%eax的值    Ui:更新(增加)%eax的指令    Si:将%eaxi的更新值存回到共享变量cnt的指令    Ti:循环尾部的指令块。

Thread Safety

Four disjoint thread unsafe function classes and Countermeasures:

A function that does not protect shared variables--a function that maintains a state that spans multiple invocations with synchronous operations such as P and V--overrides a function--① that returns pointers to static variables, and ② uses lock-copy technology.

Competition

The reason for the competition: The correctness of a program relies on the x point of one thread to reach its control flow before another thread reaches the y point. That is, the programmer assumes that the thread will follow a particular trajectory through the execution state space, forgetting a guideline that the threaded program must work correctly for any viable trajectory. Elimination Method:
Dynamically assigns a separate block to each integer ID, and passes to the thread routine a pointer to the block

Deadlock: A set of threads is blocked, waiting for a condition that will never be true.

This week code hosting other (sentiment, thinking, etc., optional)

This week's study mainly is the network this aspect as well as the thread knowledge, the network programming knowledge in the Web programming This course has learned many,

The thread looks a little bit, feels a bit abstract, the concept of things more.

Learning progress Bar new/cumulative) /cumulative)
lines of code (new/cumulative) Blog Volume (Learning time (new
Goal 5000 rows 30 Articles 400 hours
First week 100/100 1/2 10/10
Second week 150/200 2/4 8/18
Third week 200/250 1/5 5/23
Week Five 50/300 1/6 9/32
Week Six 20/320 1/7 8/40
Seventh Week 20/340 1/8 6/46
Eighth Week 60/400 2/10 6/52
Nineth Week 80/480 1/11 8/60
Tenth Week 60/540 2/13 6/66
11th Week 80/620 1/14 6/72
12th Week 50/670 1/15 5/77
13th Week 50/720 1/16 6/83
Resources
        • "In-depth understanding of computer system V2" Learning Guide
        • Teaching material reading and weekly exam focus
        • 2016-2017-1 the teaching process of the basic design of information security system
        • ...

20145311 "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.