欢迎光临
我们一直在努力

鼻梁骨发热怎么回事 鼻梁骨疼怎么回事

为什么我发烧了 鼻子鼻梁会肿的 会疼呢 那是怎么回事

可能是鼻炎,常常表现为鼻塞引起的不通气,流鼻涕,打喷嚏,头晕头痛,鼻痒版,喉部不适,咳嗽等症状。可权在医生指导下用1%***生理盐水滴鼻或服用鼻炎康,如不见效,建议到医院行封闭疗法,亦可进行冷冻疗法或激光疗法。

建议去正规医院检五官科查一下,明确诊断,积极治疗。

我鼻子透气但是发烧是怎么回事

CP3003 Tutorial Week 3 – Solutions

Question 1

It is a relationship between two computer hosts in which one host takes on the role of requesting services and the other the role of responding to service request.

——————————————————————————–

Question 2

The server starts life with a single thread which we will call the main thread. This thread creates a socket, binds an address, sets the connection queue length then sits in an infinite loop accepting connection requests. Each time a client connects, the operating system creates a new socket for the new connection. The main thread returns from the accept system call and a newly created socket is returned. The main thread creates a new thread to handle the new connection. In a multithreaded environment, the new thread operates concurrently with the main thread. While the new thread is handling the connection, the main thread continues in its loop accepting new connections and creating a new thread to service each new connection. If all threads run concurrently, a single server process can be handling multiple client connections concurrently.

——————————————————————————–

Question 3

Consider the action of maintaining a count of the total number of clients serviced or of creating a unique, monotonically increasing sequence number. If two client threads both try to increment an integer at the same time, the result may be unpredictable: both read the value (N, say) into a register, both increment the value in the register (le***ing N+1) and both store the incremted value into memory. The result is N+1 instead of the desired N+2.

——————————————————————————–

Question 4

N + 1, one main thread and N threads for processing those N clients.

——————————————————————————–

Question 5

IP address, port number, protocol

——————————————————————————–

Question 6

Recall that, while UDP and TCP are both transport protocols, they h***e different semantics. TCP is connection-oriented and provides a reliable byte stream; UDP is connectionless and does not guarantee in-order delivery or even delivery at all. A consequence of the connection aspect is that it takes time to set up a TCP connection and time to tear it down.

Consider a server that has two modes of interaction. One mode is a simple request-response interaction (such as getting the time of day). The amount of data that is transferred is minimal; it fits in one packet. Setting up and tearing down a TCP connection for this type of quick interaction would more than double the time required and the benefit would be in-order delivery of a single packet. It makes sense to use UDP for this style of interaction.

Conversely, an interaction that requires transfer of large amounts of data would benefit from TCP’s sliding window. The window mechanism makes the transfer so much more efficient that it is well worth the overhead of an initial connection setup and a final connection tear down.

——————————————————————————–

Question 7

Part 1

The TCP protocol layer receives segments from the IP layer below. When a segment arrives, the TCP layer has to identify the application (regardless of whether it is the client or the server) to which the segment is addressed. Since TCP uses the port number to identify the target application, if the application hasn’t registered a port number with TCP, then TCP will be unable to deliver the segment. Consequently, TCP requires that both servers and clients register a port number with it before any segments are sent.

Part 2

The server port number gets registered when the server is created, the port number to be used is specified explictly.

Part 3

The client port number is usually assigned by system (at random, not in use, and other than special port number).

——————————————————————————–

Question 8

ServerSocket is created to wait and listen on a specific port. When request from client arrive, the ServerSocket wakes up and creates another Socket for handling the request and performing read/write.

——————————————————————————–

Question 9

ServerSocket. If no client request arrives, accept() blocks. When request arrives, it returns a Socket object that connects the client with the server.

——————————————————————————–

Question 10

The client request is rejected because the queue is full. If queue length is not specified, it is determined by system.

——————————————————————————–

Question 11

SeverSocket() creates an unbound server socket, you need to call method bind() to bind it to a specific port. When IP address is supplied, the server socket is created for that address. A host can h***e many network interfaces, ServerSocket(port,qlen) creates server sockets for every network interfaces, but ServerSocket(port,qlen.addr) creates socket for that interface only.

——————————————————————————–

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址
赞(0) 打赏
分享到: 更多 (0)

轻博客

联系我们联系我们

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

微信扫一扫打赏