adplus-dvertising
frame-decoration

Question

Why does a thread in Windows need two stacks?

a.

Because it needs to run multiple programs at the same time

b.

Because it needs to switch between user-mode code and kernel-mode code

c.

Because it needs to manage multiple memory address spaces

d.

Because it needs to manage multiple data structures at the same time

Posted under Reverse Engineering

Answer: (b).Because it needs to switch between user-mode code and kernel-mode code Explanation:A thread can run in both user mode and kernel mode, and must have two stacks: one for when it’s running in user mode and one for when it’s running in kernel mode.

Engage with the Community - Add Your Comment

Confused About the Answer? Ask for Details Here.

Know the Explanation? Add it Here.

Q. Why does a thread in Windows need two stacks?

Similar Questions

Discover Related MCQs

Q. What are the components responsible for managing threads in Windows?

Q. Can a thread be interrupted while running in kernel mode in the Windows architecture?

Q. Are all Win32 APIs interruptible?

Q. What is the process of achieving concurrency with multiple threads in a multithreaded kernel?

Q. Why do threads frequently give up the CPU on their own volition?

Q. What is one example of a common Win32 API that causes a program to wait?

Q. What happens when a program calls the GetMessageWin32 API and there are no messages in the queue?

Q. What does the kernel do when an application performs a slow I/O operation?

Q. What is preemptive scheduling?

Q. What is a thread's quantum?

Q. How does the operating system monitor how long a thread has been running?

Q. What happens when a thread's quantum is up?

Q. How does the kernel ensure that a thread has no idea that it was ever interrupted?

Q. What is the main challenge of synchronizing multiple threads in the same program?

Q. What do synchronization objects allow two or more threads to do?

Q. What is the purpose of putting blocked threads in a special wait state?

Q. Why must the scheduler be aware of synchronization objects?

Q. What are synchronization objects used for in multithreaded programming?

Q. What is an event in multithreaded programming?

Q. How does a mutex work in multithreaded programming?