Saturday, 17 April 2021

OS Thread Assignment S P SHARMA CLASSES

 

1.)    A process can be ___________

A).    Single threaded

B).    Multithreaded

C).    Both single threaded and multithreaded

D).   None of the mentioned

2.)    Which one of the following is not shared by threads?

A).    Program counter

B).    Stack

C).    Both program counter and stack

D).   None of the mentioned

3.)    The time required to create a new thread in an existing process is ___________

A).    Greater than the time required to create a new process

B).    Less than the time required to create a new process

C).    Equal to the time required to create a new process

D).   None of the mentioned

4.)    Termination of the process terminates ___________

A).    First thread of the process

B).    First two threads of the process

C).    All threads within the process

D).   No thread within the process

5.)    Which one of the following is not a valid state of a thread?

A).    Running

B).    Parsing

C).    Ready

D).   Blocked

6.)    Thread synchronization is required because ___________

A).    All threads of a process share the same address space

B).    All threads of a process share the same global variables

C).    All threads of a process can share the same files

D).   All of the mentioned

7.)    A thread is also called ___________

A).    Light Weight Process(LWP)

B).    Heavy Weight Process(HWP)

C).    Process

D).   None of the mentioned

8.)    A thread shares its resources(like data section, code section, open files, signals) with ___________

A).    Other process similar to the one that the thread belongs to

B).    Other threads that belong to similar processes

C).    Other threads that belong to the same process

D).   All of the mentioned

9.)     A heavy weight process ___________

A).    Has multiple threads of execution

B).    Has a single thread of execution

C).    Can have multiple or a single thread for execution

D).   None of the mentioned

10.) A process having multiple threads of control implies ___________

A).    It can do more than one task at a specific time

B).    It can do only one task at a time, but much faster

C).    It has to use only one thread per process

D).   None of the mentioned

11.) Multithreading an interactive program will increase responsiveness to the user by ___________

A).    Continuing to run even if a part of it is blocked

B).    Waiting for one part to finish before the other begins

C).    Asking the user to decide the order of multithreading

D).   None of the mentioned

12.) Resource sharing helps ___________

A).    Share the memory and resources of the process to which the threads belong

B).    An application have several different threads of activity all within the same address space

C).    Reduce the address space that a process could potentially use

D).   All of the mentioned

13.) Multithreading on a multi – CPU machine ___________

A).    Decreases concurrency

B).    Increases concurrency

C).    Doesn’t affect the concurrency

D).   Can increase or decrease the concurrency

14.) The kernel is _______ of user threads.

A).    A part of

B).    The creator of

C).    Unaware of

D).   Aware of

15.) If a kernel thread performs a blocking system call, ____________

A).    The kernel can schedule another thread in the application for execution

B).    The kernel cannot schedule another thread in the same application for execution

C).    The kernel must schedule another thread of a different application for execution

D).   The kernel must schedule another thread of the same application on a different processor

16.) If the kernel is single threaded, then any user level thread performing a blocking system call will ___________

A).    Cause the entire process to run along with the other threads

B).    Cause the thread to block with the other threads running

C).    Cause the entire process to block even if the other threads are available to run

D).   None of the mentioned

17.) Which of the following is FALSE?

A).    Context switch time is longer for kernel level threads than for user level threads

B).    User level threads do not need any hardware support

C).    Related kernel level threads can be scheduled on different processors in a multiprocessor system

D).   Blocking one kernel level thread blocks all other related threads





Answer:


1.      C

2.      C

3.      B

4.      C

5.      B

6.      D

7.      A

8.      C

9.      B

10.   A

11.   A

12.   D

13.   B

14.   C

15.   A

16.   C

17.   D

 

 

1 comment:

  1. 1)c 2)c 3)b 4)c 5)b 6)d 7)a 8)c 9)b 10)a 11)a 12)d 13)b 14)c 15)a 16)c 17)d

    ReplyDelete