Filed under: Operating systems, OS, vista
February 23, 2007 • 12:52 pm 0
For All OS Geeks.
February 16, 2007 • 1:31 pm 0
Of IPC
#include
#include
#include
volatile int i; /* i is global, so it is visible to all functions.
it's also marked volatile, because it will change in
a way which is not predictable by the compiler (here:
from a different thread.) */
/* t1 uses spin lock to wait for i to change from 0. */
static void *f1()
{
while (i==0)
{
/* do nothing - just keep checking over and over. */
}
printf("i's value has changed to %d.\n", i);
return;
}
static void *f2()
{
sleep(60); /* sleep for 60 seconds. */
i = 99;
printf("t2 changing the value of i to %d.\n", i);
return;
}
int main()
{
int x;
pthread_t t1, t2;
i = 0; /* set global int i to 0. */
x = pthread_create(&t1, NULL, f1, NULL);
if (x != 0)
{
printf("pthread foo failed.\n");
}
x = pthread_create(&t2, NULL, f2, NULL);
if (x != 0)
{
printf("pthread bar failed.\n");
}
pthread_join(t1, NULL);
pthread_join(t2, NULL);
printf("all pthreads finished.\n");
return 0;
}
Filed under: IPC, Operating systems
February 8, 2007 • 5:19 am 0
Running Ubuntu
I am fully up and running on Ubuntu. As is my nature I tend to learn things on an on-need basis and I need to do some web development on ubuntu so I have caught on linux really quick, but i am still a toddler.
I am fully up and running on Ubuntu. As is my nature I tend to learn things on an on-need basis and I need to do some web development on ubuntu so I have caught on linux really quick, but i am still a toddler.
Anyone who has manually installed and configured php/apache/mysql knows the hassle involved and that’s just on windows. Now try it on linux!!! Luckily I found out about xampp by the Apache Friends, how? I need only say that ‘Google is your friend’!
Filed under: linux, Operating systems
February 6, 2007 • 5:03 am 0
Do U Ubuntu?
I installed the latest Ubuntu release on my laptop. I am in the process of getting acquainted with it. Pretty neat actually. There is some PHP development I want to do on it so I have a functional use for it. Check it out here.
Filed under: linux, Operating systems, ubuntu
January 13, 2007 • 1:07 pm 0
OS Class
Today I started one of the classes which I have been looking foreward to in a while – Computer Operating Systems. Now I have the added motivation to pursue my ambitions for OpenSolaris. i get my laptop back soon so that way I can get started on some aspects. Also i plan to buy a desktop cos I am also doing and will get more and more involved in some personal and business projects that will require proper processing power. The PC at home currently does not exactly fit the bill. I also need to get a permanent internet connection… hmmm! I had better find ways of generating other income cos internet aint exactly cheap in Kenya.
Anyway mes amis… c’est la vie! What can i say.
Filed under: class, internetm PC, OpenSolaris, Operating systems, OS












