ProcessThreads and Synchronisation
10 Questions
12 Views

Choose a study mode

Play Quiz
Study Flashcards
Spaced Repetition
Chat to lesson

Podcast

Play an AI-generated podcast conversation about this lesson

Questions and Answers

If a thread opens a file for reading with read privileges, then …

  • Question 6Select one: a. no other thread can read from that file.
  • b. other threads in other processes can also read from that file.
  • c. other threads in the same process can also read from that file. (correct)
  • Which of the following memory segments are not shared between threads of the same process?

  • a. text segment
  • b. stack segment (correct)
  • c. heap segment d. data segment
  • d. data segment
  • Which of the following statements about process control blocks are correct?

  • Processes have a unique numeric identifier, which is stored in the process control block and commonly used to refer to a specific process. (correct)
  • b. Process control blocks are usually organized into a binary tree, reflecting at which time processes were created.
  • c. On many operating systems, it is impossible to print a consistent snapshot of the list of running processes while the operating system is running. (correct)
  • The content of processor registers can be saved in the process control block if a process got interrupted by the operating system kernel. (correct)
  • Which of the following statements about process states are correct?

    <p>The state of a process is stored in its process control block. (A), Processes stay in the terminated state until all resources have been released and the exit status code has been delivered to the parent process. (B)</p> Signup and view all the answers

    Which of the following statements about processes are correct?

    <p>b. Every process maintains its own heap and stack memory segments. (B), c. A process has at least one control flow and it owns an internal and external state. (C), d. The operating system kernel isolates processes: data managed by a process is protected from access by other processes. (D)</p> Signup and view all the answers

    Which of the following system calls initialize the stack of the calling process?

    <p>a. exec() (A)</p> Signup and view all the answers

    A proper solution of the critical section problem must satisfy the following requirements.

    <p>a. Bounded waiting (A), b. Progress (B), c. Mutual exclusion (C)</p> Signup and view all the answers

    Which of the following statements are proper definitions of critical sections?

    <p>a. A critical section is a part of the program code where only one thread may execute at the same point in time. (A)</p> Signup and view all the answers

    Which of the following statements are true about semaphores?

    <p>(B), b. A down operation on a semaphore with the value 0 will block the thread performing the down operation. (C), c. Semaphores can be used to solve both mutual exclusion and coordination problems. (D)</p> Signup and view all the answers

    Which of the following statements are true about the semaphore pattern?

    <p>b. The multiplex pattern is a generalization of the mutual exclusion pattern. (B), c. In the double barrier pattern, each thread passing through the turnstile opens the turnstile for the next threat. (C)</p> Signup and view all the answers

    More Like This

    Use Quizgecko on...
    Browser
    Browser