Opened 16 years ago
Last modified 14 years ago
#9 new enhancement
Current fibril model can confuse kernel's view on threads
Reported by: | Jakub Jermář | Owned by: | Jakub Jermář |
---|---|---|---|
Priority: | minor | Milestone: | |
Component: | helenos/lib/c | Version: | mainline |
Keywords: | Cc: | ||
Blocker for: | Depends on: | ||
See also: |
Description
Since the times of HelenOS 0.2.0, the fibril (formerly pseudo threads) scheduling uses a task-global queues for inactive fibrils. Thanks to this arrangement, fibrils can migrate among kernel threads. The problem here is that also kernel threads with userspace context (userspace threads) have some fibril characteristics and can migrate just as any other fibril. This is a potential problem: imagine the userspace context of a kernel thread is migrated to another thread. The migrated thread then calls thread_exit(). From the kernel's point of view, a wrong thread is terminated; its userspace context will however survive and will be migrated to another thread, deepening the confusion. Note that this behaviour also negatively impacts thread cycle accounting.
A possible solution is to turn the global queues into thread-local queues and enable migration only per explicit request. That would demand other changes in userspace thread/fibril cleanup.
Another solution might be to selectively disable migration of thread contexts, i.e. coexistence of the task-global and thread-local fibril queues.
Change History (2)
comment:1 by , 14 years ago
Component: | → helenos/uspace/libc |
---|---|
Owner: | set to |
comment:2 by , 14 years ago
Type: | defect → enhancement |
---|