OS Concepts: Chapter 4

OS Concepts: Chapter 4 - Student #: 22902100 Handin name:...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
Student #: 22902100 Handin name: pb5 Chapter 4 Ex 4.7 In modern operating systems, a thread is the smallest unit of execution which generally results from a fork of a program. Although different OSs treats threads differently, for all OSs a thread is contained within a process and share resources among themselves. On a single-processor system, multithreading occurs by means of multitasking where the processor context-switches between different threads and the user gets the impression such that the threads are running at the same time. On the other hand, on a multiprocessor or a multi-core system, the number of processors or cores determines the number of threads it can handle at once. Therefore, if more than one thread is performing an I/O operation on the same device then there is no point in using a multithreading because the process would have to wait indefinitely for the device to respond. Similarly, because more while a process is performing a read/write operation on a data it has to be locked so no other task can change it and therefore in a multithreading environment other threads would have to wait until the data has been freed. In this case, multithreading would come to no effect too. Reference: http://en.wikipedia.org/wiki/Thread_(computer_science) Ex 4.8 A thread library provides the developers an application programming interface (API) for creating and managing threads. There can be two ways to provide this service - user threads and kernel threads.
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This document was uploaded on 03/22/2011.

Page1 / 5

OS Concepts: Chapter 4 - Student #: 22902100 Handin name:...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online