Skip to main content

System Programming MCQs with Answers

Practice important System Programming MCQs with answers and explanations.

Chapter: 122
Q2641:
The Windows kernel automatically handles ________ of worker subtasks to processors.
A. scheduling
B. merging
C. debugging
D. serialization
Correct Answer: A
Chapter: 123
Q2642:
A thread is an ________ unit.
A. execution
B. memory
C. storage
D. process
Correct Answer: A
Chapter: 123
Q2643:
In multithreading, a single procedure can have ________ threads.
A. one
B. several
C. no
D. two
Correct Answer: B
Chapter: 123
Q2644:
Each thread needs data that is ________ and not shared with other threads.
A. unique
B. common
C. static
D. global
Correct Answer: A
Chapter: 123
Q2645:
To create a thread with unique data, the creating thread uses the ________ function.
A. CreateThread
B. BeginThread
C. ExitThread
D. WaitForSingleObject
Correct Answer: A
Chapter: 123
Q2646:
The parameter lpvThreadParm points to a ________ structure unique for each thread.
A. data
B. process
C. global
D. shared
Correct Answer: A
Chapter: 123
Q2647:
Thread Local Storage (TLS) provides each thread with an ________ of pointers.
A. array
B. stack
C. buffer
D. list
Correct Answer: A
Chapter: 123
Q2648:
In the TLS arrangement, columns correspond to ________.
A. thread numbers
B. TLS indexes
C. functions
D. processes
Correct Answer: A
Chapter: 123
Q2649:
TLS index rows can be allocated and deallocated ________.
A. only once
B. at any time
C. never
D. once per thread
Correct Answer: B
Chapter: 123
Q2650:
Every thread can access TLS, but the ________ thread is a logical choice for TLS management.
A. primary
B. secondary
C. worker
D. helper
Correct Answer: A
Chapter: 123
Q2651:
The API used to allocate a TLS index is ________.
A. TlsAlloc
B. TlsFree
C. TlsGetValue
D. TlsSetValue
Correct Answer: A
Chapter: 123
Q2652:
TlsAlloc returns the TLS index as a ________.
A. DWORD
B. BOOL
C. VOID
D. HANDLE
Correct Answer: A
Chapter: 123
Q2653:
The API to free a TLS index is called ________.
A. TlsFree
B. TlsAlloc
C. TlsGetValue
D. TlsSetValue
Correct Answer: A
Chapter: 123
Q2654:
The API used to get a value from TLS is ________.
A. TlsGetValue
B. TlsFree
C. TlsAlloc
D. TlsSetValue
Correct Answer: A
Chapter: 123
Q2655:
TLS allows memory access that is global within a ________ but inaccessible to other threads.
A. thread
B. process
C. program
D. system
Correct Answer: A
Chapter: 123
Q2656:
Global storage in a program is accessible by ________ threads.
A. all
B. single
C. no
D. only primary
Correct Answer: A
Chapter: 123
Q2657:
Each thread's TLS space is managed using simple ________ APIs.
A. GET/SET
B. OPEN/CLOSE
C. READ/WRITE
D. CREATE/DESTROY
Correct Answer: A
Chapter: 123
Q2658:
TlsFree returns a ________ indicating success or failure.
A. BOOL
B. DWORD
C. VOID
D. INT
Correct Answer: A
Chapter: 123
Q2659:
The parameter type for TLS APIs such as TlsAlloc and TlsFree is ________.
A. DWORD
B. HANDLE
C. LPVOID
D. BOOL
Correct Answer: A
Chapter: 123
Q2660:
Thread local storage provides a way to store data that is ________ to a specific thread.
A. unique
B. shared
C. global
D. accessible to all
Correct Answer: A

Test Your Knowledge

Take a timed quiz on System Programming

🚀 Start Quiz Now