kernel can schedule only one thread at a time Fig 2 Many to One thread B One to

Kernel can schedule only one thread at a time fig 2

This preview shows page 4 - 6 out of 6 pages.

kernel can schedule only one thread at a time. Fig. 2 Many to One thread B. One to one: W here each user thread is mapped to the kernel thread. Such mechanism provides concurrency operation than the many-to – many model where other threads are allowed to even when one of these threads makes a blocking system call. Also such system allows multiple threads to run in parallel on multiprocessors. Since such model creates a corresponding kernel thread with every creating of user thread, on overhead of creating kernel threads can affect the performance of an application and as such this implementation can be restricted with the number of threads that can be supported be the system. number of user threads onto an equal or many to one models. Users have no restrictions on the number of threads created .Blocking kernel system calls do not block the entire process. Processed can be split across multiple process. Individual processes may be allocated variable number of kernel threads. Fig. 4 Many to many Thread Fig. 3 One to One Thread
Image of page 4
V. THREAD LIBRARIES Thread libraries provide programmers with API for creation and management of threads. Thread libraries may be implemented either in user space or in kernel space. The user space involves API functions implemented solely within the user space, with no kernel support. The kernel space involves system calls, and requires a kernel with thread library support. Three types of Thread Libraries 1. POSIX Pitheads may be provided as either a user or kernel library, as an extension to the POSIX standard. 2. Win32 threads are provided as a kernel-level library on Windows systems. 3. Java threads : Since Java generally runs on a Java Virtual Machine, the implementation of threads is based upon whatever OS and hardware the JVM is running on, i.e. either Pitheads or Win32 threads depending on the system. VI. ADVANTAGES Threads are very useful in modern programming whenever a process has multiple tasks to perform independently of the others This is particularly true when one of its task may block, and it is desired to allow the other tasks to proceed without blocking. For example in award processor, background thread may check spelling and grammar while a foreground thread processes a user input , while yet a third thread loads images from the hard drive , and the fourth does periodic automatic backups of the file being edited. Another example is a web server- Multiple threads allow multiple requests to be satisfied simultaneously, without having to service requests sequentially or to fork off separate processes for every incoming request.
Image of page 5
Image of page 6

You've reached the end of your free preview.

Want to read all 6 pages?

  • Fall '16
  • Sir Adnan
  • Central processing unit, Computer program, Computer multitasking

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern

Stuck? We have tutors online 24/7 who can help you get unstuck.
A+ icon
Ask Expert Tutors You can ask You can ask You can ask (will expire )
Answers in as fast as 15 minutes
A+ icon
Ask Expert Tutors