We know that information transmission means through the Ethernet consist of unicasting, multicasting, anycasting and broadcasting. The following table show differen forms of addressing.
Type | IPv4 | IPv6 | TCP | UDP | #IP interfaces identified | #IP interfaces delivered to |
Unicast | . | . | . | . | One | one |
Anycast | * | . | Not yet | . | A set | one in set |
Multicast | opt | . | | . | A set | All in set |
broadcast | . | | | . | All | All |
** The disadvantage of broadcasting
When a computer node A broadcasted information in application level, it will be tranlated into physical level with use the dest Enet = ff:ff:ff:ff:ff:ff to transmit. The all nodes that are in same subnet with A will recevie the datagram in physical level and translate it to high level. This means that the all computers in the subnet will cached the datagram until the high level such as transmission level to discard if the destination is not match. But in unicasting style, they will not cache the datagram at all if the destination is not match.
** Race codition
A /race condition/ is usually when multiple processes are accessing data that is shared among them, but the correct outcome depends on the execution order of the processes.
Q: when a process is blocked at a function, a signal reaches which will interrupt the function. After the signal handler function return, will process return to execute that blocked function?
A: will not.
#include <stdio.h>
#include <signal.h>
#include <unistd.h>
static void do_alarm(int);
/* static had_alarm = 0; */
int main(){
signal(SIGALRM, do_alarm);
alarm(1);
/* for( ; ; ){ */
/* if(had_alarm == 1)
break;
*/
sleep(100);
printf("Hello, world!\n");
fflush(stdout);
//}
return 0;
}
static void do_alarm(int signo){
printf("do alarm \n");
fflush(stdout);
/* had_alarm = 1; */
return;
}
/*
* When redirect the output to a file, the
* string 'do alarm' will partly missing,
* why? The reason is that i have not flush
* the stdout buffer. when added fflush(stdout),
* it works correctly.
*/
The above program will only exec 1 second which proves the above conclusion.
分享到:
相关推荐
The Digital Video Broadcasting Project (DVB) is an industry-led consortium of over 300 broadcasters, manufacturers, network operators, software developers, regulatory bodies and others in over 40 ...
The Power Features of AngularJS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 Download and Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ...
广播电视名词术语中英文对照通用部分广播broadcasting节目输入.pdf
这个是我写的linux下udp广播和接受的例子。 记住:在linux下一定要关闭sexlinux和防火墙! 或者 在防火墙里设置允许udp中相应的端口,允许通信!
Controlling the Number of Streams Section 10.7. Controlling Termination Section 10.8. Summary Exercises Chapter 11. Name and Address Conversions Section 11.1. Introduction Section 11.2....
本教程将深入探讨NumPy中的三个核心概念:NDArray、Broadcasting和Indexing,这些是理解和使用NumPy进行高效数据操作的基础。 一、NDArray(N-Dimensional Array) NDArray,全称N维数组,是NumPy库中的核心数据...
广播(broadcasting)是指通过无线电波或有线网络向广大地区或特定用户群体传播声音和图像的通信方式。广播分为声音广播和电视广播两大类。 声音广播包括调幅广播(AM broadcasting)和调频广播(FM broadcasting)...
"Everyone will want this book because it provides a great mix of practical experience, historical perspective, and a depth of understanding that only comes from being intimately involved in the field....
for the Digital Engineer Fourth Edition Chapter 1 • Introduction 1 Contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ...
The need for better communications in editing, writing, broadcasting, advertising, and teaching. New York: Cowles Education Corporation, 1967, 220 p., [dollar]5.95 HOOK NOTES ASL) HEVIEWS 191 h a...
The field of learning disabilities. Anderson, R. P. The child with learning disabilities and guidance. Boston: Houghton Mifflin, 1970, 83 p., [dollar] 1.80. Golick, M. Learning disability. Toronto: ...
The six volume set of Encyclopedia of RF and Microwave Engineering illustrates how this field has been the key to enabling technology responsible for the phenomenal growth of wireless communications....
and executed on a computer system, for exclusive use by the purchaser of the work. Duplication of this publication or parts thereof is permitted only under the provisions of the Copyright Law of the ...
For the server, you can modify the list of services supported on the right-hand side, while for the client you can enter a service name and get a list of the servers available on your LAN to support ...
and it was developed in response to the growing need for higher compression of moving pictures for various applications such as videoconferencing, digital storage media, television broadcasting, ...
On the Density of Regular and Context-Free Languages.- Extensions of the Minimum Cost Homomorphism Problem.- The Longest Almost-Increasing Subsequence.- Universal Test Sets for Reversible Circuits.-...