java - A question about Thread and Process -


i read tutorial threads , processes, said processes scheduled operating system kernel, , threads can managed , scheduled in user mode.

i not understand saying "threads can managed , scheduled in user mode", example: producer , consumer problem? example "scheduled in user mode"? or can explain me?

not sure tutorial you're looking at, there 2 ways threads can scheduled.

the first user-mode scheduling, mean 1 process, using green threads or perhaps fibers, schedules different threads run without involving operating system in decision. can more portable across operating systems, doesn't allow take advantage of multiple processors.

the second kernel scheduling, means various threads visible kernel , scheduled it, possibly simultaneously on different processors. can make thread creation , scheduling more expensive, however.

so doesn't depend on problem trying solve. user-mode means scheduling of threads happens without involving operating system. java versions used green/user-mode threads, believe use native/kernel threads.

edit: coding horror has a nice overview of difference between user , kernel mode.


Comments

Popular posts from this blog

objective c - Change font of selected text in UITextView -

php - Accessing POST data in Facebook cavas app -

c# - Getting control value when switching a view as part of a multiview -