Que es la programacion con hilos POSIX en C?? es posible en C++ ?
En GNU/Linux podemos hacerla empleando pthread
¿Que es Pthread?
The POSIX thread libraries are a standards based thread API for C/C++. It allows one to spawn a new concurrent process flow. It is most effective on multi-processor or multi-core systems where the process flow can be scheduled to run on another processor thus gaining speed through parallel or distributed processing. Threads require less overhead than "forking" or spawning a new process because the system does not initialize a new system virtual memory space and environment for the process. While most effective on a multiprocessor system, gains are also found on uniprocessor systems which exploit latency in I/O and other system functions which may halt process execution. (One thread may execute while another is waiting for I/O or some other system latency.) Parallel programming technologies such as MPI and PVM are used in a distributed computing environment while threads are limited to a single computer system. All threads within a process share the same address space. A thread is spawned by defining a function and it's arguments which will be processed in the thread. The purpose of using the POSIX thread library in your software is to execute software faster.Sobre todo dice que es efecto para sistemas con multiprocesadores, por ejemplo entonces todo el software compilado para p4 ht .. si no usa el soporte de hilos este programa no aprovecha por completo el procesador?
En linux suele ocurrir asi, hay que añadir flags de compilacions para que HT pueda ser realmente HT sino entonces trabaja como un p4 normal.
Pero si tenemos un pc normal, un procesador solamente y sin HT .. este tipo de programacion es efectiva??
Esto nos da un buena idea, pero ustedes cuentenme que piensan si lo han usado o no y que es para ustedes en palabras mas directas la programacion empleando hilos
Mas informacion sobre hilos en GNU/Linux
http://yolinux.com/TUTORIALS/LinuxTutorialPosixThreads.htmlSaludos