Pthread library | CS 162 Project 2
A subset of the pthread (Pintos thread) library is provided for you in lib/user/pthread.h. These functions serve as the glue between the high-level API of pthread_create, pthread_exit, and pthread_join and the low-level system call implementation of these functions. We’ll walk you through how the pthread library works by starting at the high-level usage in one of our tests, and walk down the stack until we get to the kernel syscall interface. The test we will walk through is tests/userprog/multithreading/create-simple.c. In the create-simple test, we see how the high-level API of the threading library is supposed to work. The main thread of the process first runs test_main. It then creates a new thread to run thread_function with the pthread_check_create call, and waits for that thread to finish with the pthread_check_join. The expected output of this test is shown in tests/userprog/multithreading/create-simple.ck. The functions pthread_check_create and pthread_check_join are simple wr
Pthread library | CS 162 Project 2 Skip to main content Menu Expand (external link) Document Search Copy Copied CS 162 Project 2 Pthread library Table of contents Threading User-level synchronization Threading A subset of the pthread (Pintos thread) library is provided for you in lib/user/pthread.h . These functions serve as the glue between the high-level API of pthread_create , pthread_exit , and pthread_join and the low-level system call implementation of these functions. We’ll walk you through how the pthread library works by starting at the high-level usage in one of our tests, and walk d
Explore this link on the map →related reading
- Implementation requirements | CS 162 Project 2cs162.org
- User threads | CS 162 Project 2cs162.org
- Thread functions | Pintos Documentationcs162.org
- Understanding threads | Pintos Documentationcs162.org
- The "Basics" | Putting the "You" in CPUcpu.land
- Process Control Syscalls | CS 162 Project 1cs162.org
- The thread struct | Pintos Documentationcs162.org
- LittleBookOfSemaphores.pdfgreenteapress.com
- An Intro to Threading in Python – Real Pythonrealpython.com
- CS111 Assignment 5: Dispatching and Implementing Locks/CVsweb.stanford.edu
- Unreliable Guide To Locking — The Linux Kernel documentationdocs.kernel.org
- CS111 Assignment 5: Dispatching and Implementing Locks/CVsweb.stanford.edu