
ipc
yzx41099296
这个作者很懒,什么都没留下…
展开
-
pipe_lat.c
/* Measure latency of IPC using unix domain sockets Copyright (c) 2010 Erik Rigtorp Permission is hereby granted, free of charge, to any person obtaining a copy of this software and a转载 2011-12-31 10:02:00 · 402 阅读 · 0 评论 -
unix_lat.c
/* Measure latency of IPC using unix domain sockets Copyright (c) 2010 Erik Rigtorp Permission is hereby granted, free of charge, to any person obtaining a copy of this software and a转载 2011-12-31 10:06:54 · 321 阅读 · 0 评论 -
tcp_lat.c
/* Measure latency of IPC using tcp sockets Copyright (c) 2010 Erik Rigtorp Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associate转载 2011-12-31 10:04:26 · 480 阅读 · 0 评论 -
计算时间相关
structtimespec{__time_ttv_sec; /*seconds 秒*/longint tv_nsec; /*nanoseconds 纳秒*/}与struct timeval 不同,将结构体内成员微秒变换成纳秒 : struct timeval { time_t tv_sec; /* seconds */ suseconds_t tv_use转载 2011-12-31 10:09:12 · 423 阅读 · 0 评论 -
unix_thr.c
/* Measure throughput of IPC using unix domain sockets. Copyright (c) 2010 Erik Rigtorp Permission is hereby granted, free of charge, to any person obtaining a copy of this software a转载 2011-12-31 10:07:25 · 293 阅读 · 0 评论 -
tcp_thr.c
/* Measure throughput of IPC using tcp sockets Copyright (c) 2010 Erik Rigtorp Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associ转载 2011-12-31 10:06:19 · 323 阅读 · 0 评论 -
tcp_remote_lat.c
/* Measure latency of IPC using tcp sockets Copyright (c) 2010 Erik Rigtorp Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associate转载 2011-12-31 10:05:42 · 413 阅读 · 0 评论 -
tcp_local_lat.c
/* Measure latency of IPC using tcp sockets Copyright (c) 2010 Erik Rigtorp Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associate转载 2011-12-31 10:05:03 · 410 阅读 · 0 评论 -
shm.c
/* Measure latency of IPC using shm */#include #include #include #include #include #include #include int main(void){ int pfds[2]; char c; int shmid; key_t key; struct timespec *shm; struc转载 2011-12-31 10:03:52 · 605 阅读 · 0 评论 -
pipe_thr.c
/* Measure throughput of IPC using pipes Copyright (c) 2010 Erik Rigtorp Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated d转载 2011-12-31 10:02:44 · 324 阅读 · 0 评论 -
mmap实现进程间共享内存
采用共享内存通信的一个显而易见的好处是效率高,因为进程可以直接读写内存,而不需要任何数据的拷贝。对于像管道和消息队列等通信方式,则需要在内核和用户空间进行四次的数据拷贝,而共享内存则只拷贝两次数据[1]:一次从输入文件到共享内存区,另一次从共享内存区到输出文件。实际上,进程之间在共享内存时,并不总是读写少量数据后就解除映射,有新的通信时,再重新建立共享内存区域。而是保持共享区域,直到通信完毕为止,转载 2012-04-13 14:09:47 · 1059 阅读 · 0 评论