You can't (under any OS I know of) "assign" a thread or process to a certain CPU. All you can do is say to the OS, "Do these two things at the same time if at all possible."
Here's a simple Unix example of what you might want:
[tt]#include <unistd.h>
int main()
{
if ( fork() )
calculator();
else
writer();
return 0;
}
[/tt]
That doesn't use threads, it actually creates two running processes. The fork makes a copy the process and returns 0 in the child process and non-zero (the child's id) to the parent process. So in this case, the parent does the stuff under if, and the child does the stuff under else.
Of course, if your processes need to communicate (like yours seem to), this introduces the problem of interprocess communication... pipes, message queues, semaphores, and all kinds of messy stuff you don't have with threads.
That's why you should look at your documentation and see what kind of thread support you have. Chances are you have POSIX's pthreads. When you find out what you have access to, ask for help here on using the particular thread library you have.