Questions tagged [user-thread]

10 questions
25
votes
4 answers

Is there something to replace the functions?

The user thread functions in are deprecated because they use a deprecated C feature (they use a function declaration with empty parentheses for an argument). Is there a standard replacement for them? I don't feel full-fledged threads…
zneak
  • 134,922
  • 42
  • 253
  • 328
6
votes
1 answer

User-threaded scheduling API on mac OSX using ucontext & signals

I'm designing a scheduling algorithm that has the following features: Have 2 user-threads (contexts) in the one process (I'm supposed to do 3 threads but that didn't work on osx yet, so I decided to make 2 work for now) preemptive using a SIGALRM…
JJ Adams
  • 481
  • 4
  • 17
3
votes
3 answers

What are user threads?

What are user threads? Below explanation says they are managed by userspace... Please explain how? Threads are sometimes implemented in userspace libraries, thus called user threads. The kernel is not aware of them, so they are managed and…
0
votes
0 answers

Kernel thread and user thread and their mechanism

I having confusion with understanding kernel thread, user thread, thread model due to 'kernel mode', 'user mode', 'User threads and Kernel threads are exactly the same.'. Can anyone clarify this? Kernel thread A kernel thread is a "lightweight"…
0
votes
1 answer

regarding user threads requesting I/O with pthreads library

Suppose there is no kernel level support for threads. A process has 10 threads running and one of them requests I/O. Does the phread library declares the I/O request to the kernel right away or starts executing threads in it's ready queue? (If it…
haltTm
  • 534
  • 1
  • 6
  • 25
0
votes
1 answer

Which type of threads are better for computation-intensive parallel applications and I/O intensive parallel applications?

Multi threading at the kernel level means that multiples processes can be executed on different threads at the same time. User level threads reside in the processes which do not share same address space. So, which type of thread is better for…
0
votes
1 answer

__lll_lock_wait_private () when using malloc/free

I have a user level thread library and I changed a benchmark program to use mythreads instead of pthreads, but it always gets stuck somewhere in the code where there is a malloc or free function. this is output of gdb: ^C Program received signal…
zmeftah
  • 148
  • 1
  • 2
  • 10
0
votes
0 answers

Characteristics of user-level threads

I'm studying for an upcoming operating systems exam, and I've come across this question and would like some clarification because honestly I am not too confident on my answers. Mark the characteristics that are true of user-level threads. 1)…
Eric Smith
  • 1,336
  • 4
  • 17
  • 32
0
votes
1 answer

Implementing mutex wait in user threads

How does the wait for a lock is implemented in user threads? Say thread A is trying a acquire a lock that is used by another thread B. After A realized the lock is locked by other thread, what exactly does he do? How does it stops it's own…
dafnahaktana
  • 837
  • 7
  • 21
-1
votes
2 answers

Which one should choose user and kernel thread

For a program, I only worked with user threads or kernel threads. Which one should I choose?
mrsengineer
  • 27
  • 2
  • 8