Q90.Marks: +2.0UGC NET Paper 2: Computer Science17th June 2023
Given below are two statements: one is labelled as Assertion A and the other is labelled as Reason R.
Assertion A: A process involves a library function to create a thread.
Reason R: The threads make system calls to convey their resource and I/O requirement to the Kernel.
In the light of the above statements, choose the correct answer from the options given below.
1.Both A and R are true and R is the correct explanation of A
2.Both A and R are true but R is NOT the correct explanation of A✓ Correct
3.A is true but R is false
4.A is false but R is true
Solution
The correct answer is Both A and R are true but R is NOT the correct explanation of A
Key Points
Assertion A is true because a process can indeed use a library function to create a new thread. Libraries like the Pthreads library in C and Java's built-in multi-threading functionality offer such methods.
Reason R is also true since threads, like processes, can make system calls to request services from the operating system's kernel, which include tasks related to resource allocation and I/O operations.
However, Reason R is not the correct explanation of Assertion A. The reason for using a library function to create a thread doesn't directly relate to threads making system calls. In other words, threads making system calls to the kernel is a thread behavior and not a direct justification or explanation for why a process would use a library function to create a thread.