hey guys
here you can get the parallel processing basic
the first basic practical of the parallel processing is creating a process using fork system call
/* Create a process using fork() system call. */
#include <stdio.h>
#include <sys/types.h>
#include <unistd.h>
#include <stdlib.h>
#include <errno.h>
int main(void)
{
pid_t pid;
pid = fork();
if (pid == -1)
{
fprintf(stderr, "can't fork, error %d\n", errno);
exit(EXIT_FAILURE);
}
if (pid == 0)
{
int j;
for (j = 0; j < 10; j++)
{
printf("child: %d\n", j);
sleep(1);
}
_exit(0);
}
else
{
int i;
for (i = 0; i < 10; i++)
{
printf("parent: %d\n", i);
sleep(1);
}
exit(0);
}
return 0;
}
here you can get the parallel processing basic
the first basic practical of the parallel processing is creating a process using fork system call
/* Create a process using fork() system call. */
#include <stdio.h>
#include <sys/types.h>
#include <unistd.h>
#include <stdlib.h>
#include <errno.h>
int main(void)
{
pid_t pid;
pid = fork();
if (pid == -1)
{
fprintf(stderr, "can't fork, error %d\n", errno);
exit(EXIT_FAILURE);
}
if (pid == 0)
{
int j;
for (j = 0; j < 10; j++)
{
printf("child: %d\n", j);
sleep(1);
}
_exit(0);
}
else
{
int i;
for (i = 0; i < 10; i++)
{
printf("parent: %d\n", i);
sleep(1);
}
exit(0);
}
return 0;
}
Do yoս haѵe a spam issue on this website; I also am a bloցger, and I was curiօus about your
ReplyDeletesituation; many of us have created some nice methods aոd we
are looking to swap techոiques with others, be sure to shoot me an email if iոterested.
Alѕo visit my blog post; how to become taller during puberty
I think the admin of this site is actually working hard for his
ReplyDeleteweb page, for the reason that here every material is quality based information.
my weblog ... how to grow taller
I am regular reader, how are you everybody?
ReplyDeleteThis article posted at this web page is genuinely
good.
Here is my web page: grow taller 4 idiots
Hello There. I found your blog using msn. This is an extremely well written article.
ReplyDeleteI will make sure to bookmark it and return to read
more of your useful information. Thanks for the post. I'll
certainly comeback.
Feel free to visit my website - grow taller 4 idiots
Hello friends, how is the whole thing, and what you want to say regarding this piece of writing, in my
ReplyDeleteview its truly amazing designed for me.
my web site: windows replacement Burlington