paper

   
1 Overview 
A thread library provides an API for creating and managing threads. Support for threads is provided either at user-level or by the kernel, depending on the goals of the end-product. Kernel level threads are managed directly by the operating system, where each thread is viewed as an independent task, managed via system calls from user space, scheduled by the kernel, and good for applications that frequently block. User level threads, on the other hand, are managed without kernel support, are defined by the user level thread library, can be used on systems that have no kernel-level thread support, thread switching is as efficient as function calls, but the kernel knows nothing about them so any blocking affects all threads. 
2 Assignment 
You will implement a simplified version of many-to-one user level threads in the form of a library called Simple Threads. (Credit for the example code and some of the assignment parameters goes to the Operating Systems Course from Uppsala University .) 
In the many-to-one model for user level threads, all threads execute on the same kernel thread. As there is only one kernel-level thread associated with the process (the process containing threads is represented by a single context within the kernel), only one user-level thread may run at a time. 
The thread manager you will include a preemptive round-robin scheduler. If a thread does not yield during its time-slice, it will be preempted and one of the other ready threads will be resumed. The preempted and resumed threads should change state accordingly. 
2.1 Preliminaries 
To complete this assignment, there are two necessary concepts you must master: managing execution contexts and signal handlers. Examples are given for both for you to examine and reuse.
∗http://www.it.uu.se/education/course/homepage/os/vt18/module-4/simple-threads/ 
2.1.1 Execution Contexts 
The example code that will be the starting point for grasping execution context management is in the contexts.c source file. To understand the code, read the following manual pages: 
• getcontext
• setcontext
• makecontext 
• swapcontext 

WE WRITE ESSAYS FOR STUDENTS

Tell us about your assignment and we will find the best writer for your paper.

Write My Essay For Me

The post paper appeared first on Academic Pals.

Ask your questions to our best writers for quality and timely essay answers. Learn smartly and seek help from our solution library that grooms your concepts with over 150 courses.

From essays to dissertations, we have experts for all your writing needs!

PLACE YOUR ORDER

SHARE WITH FRIENDS