Unit 3. Multithread programming

After leaning the basics of concurrent programming and learn how processes can be used to do multitasking, in this unit we are going to look into a single process.

We are gonna make use of threads and the eay they are programmed to do concurrent task into a process.

key differences between processes and threads are:

  • Threads share process memory space
  • Threads share file descriptors
  • Threads share program code.

As they run into the context of a process, the TCB (Tread Control Block) is smaller than the PCB (Process Control Block) because they share part of PCB. That's why sometimes threads are so called lightweight processes.

All previous features simplify threads communication, thus coordination and synchronization becomes harder to program and manage.

Goals

The goals for this unit are:

  • To know thread characteristics in Java
  • To Learn how to create and manage threads
  • To debug multithread applications
  • To use synchronization methods for processes and sub-processes
  • To share information between threads on a process
  • To learn about shared memory problems
  • To use different programming approaches to synchronize threads execution
Last updated:
Contributors: Vicente Martínez