UC3M

Telematic/Audiovisual Syst./Communication Syst. Engineering

Systems Architecture

September 2017 - January 2018

11.2.6. Automatic self-assessment

  1. Which of the following statements is false?

    • The allocation of a thread in C means the creation of a new stack and sharing the heap space among all threads.

    • Threads can share global information via global variables.

    • Threads may receive and return information via I/O specific pointers.

    • pthread_create blocks the execution of the invoking thread until the created thread finishes its execution.

  2. Which of the following assessments is false regarding pthread_thread_join:

    • It accesses data returned from a thread, that returns a generic type with void*.

    • Data may be returned from a thread to the allocator with pthread_exit.

    • One may inhibit data returning with the pthread_attr_setdetachstate function

    • You should never use this type of mechanims becasue it is unsafe by nature