Skip to main content

One Process, Multiple Threads

  • Chapter
  • First Online:
Raspberry Pi for Arduino Users
  • 2543 Accesses

Abstract

The ability to add processes, especially to load different applications in them (which you can with commands we didn’t talk about last chapter), is a useful capability. But there are some downsides. Getting one process to communicate with another, for example, involves an outside mechanism. You can write to a file and have the second process read that file in, so long as you have some kind of file locking in place, so reads and writes don’t happen at the same time. You can use a standard UNIX/Linux tool called a pipe, which looks like a file that is write-only to one process and read-only to the other. There are ways around the communication problem, many well established from the dinosaur UNIX days.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Author information

Authors and Affiliations

Authors

Rights and permissions

Reprints and permissions

Copyright information

© 2018 James R. Strickland

About this chapter

Check for updates. Verify currency and authenticity via CrossMark

Cite this chapter

Strickland, J.R. (2018). One Process, Multiple Threads. In: Raspberry Pi for Arduino Users. Apress, Berkeley, CA. https://doi.org/10.1007/978-1-4842-3414-3_8

Download citation

Publish with us

Policies and ethics