Q1easyWhat is a Green Thread?AA thread that is encrypted.BA thread managed by a runtime library or VM (user-space) rather than the OS kernel.CA thread used for printing.DA thread dedicated to power saving.Check AnswerReveal Answer & ExplanationDiscuss on Board
Q2mediumLooking at this pseudo-code, what is the output of the variable counter if two threads increment it concurrently? thread_race.c // Shared variable int counter = 0; void thread_func() { int temp = counter; AAlways 1.BAlways 2.CCan be 1 or 2 (Race Condition).DError.Check AnswerReveal Answer & ExplanationDiscuss on Board
Q3mediumWhy is context switching between Threads significantly faster than switching between Processes?AThreads don't need a CPU.BProcesses have too many registers.CThreads share the same address space; context switching doesn't require switching the memory management unit (MMU) state.DThreads use a different hardware scheduler.Check AnswerReveal Answer & ExplanationDiscuss on Board
Q4easyWhich structure is unique to each individual thread?AGlobal Variable section.BOpen file table.CStack and Program Counter.DHeap memory.Check AnswerReveal Answer & ExplanationDiscuss on Board
Q5easyWhat is Thread Cancellation?ARe-starting a thread.BSharing resources between threads.CTerminating a thread before it has finished its task.DSending a message to the printer.Check AnswerReveal Answer & ExplanationDiscuss on Board
Q6easyWhich of the following is shared by all threads within the same process?AProgram CounterBCPU RegistersCHeap memory and Global variablesDStack pointerCheck AnswerReveal Answer & ExplanationDiscuss on Board
Q7easyWhat is the primary advantage of Kernel-Level Threads over User-Level Threads?AThey use less memory.BThey are faster to create.CThey do not require a stack.DIf one thread blocks (e.g., waits for I/O), the kernel can schedule another thread from the same process to run.Check AnswerReveal Answer & ExplanationDiscuss on Board
Q8easyWhat are Thread-Local Variables (or TLS)?AGlobal variables that every thread can read.BVariables that are visible only to the thread that created them, providing thread- safe storage. counter = temp + 1; }CVariables stored in the hard drive.DVariables that exist only for one millisecond.Check AnswerReveal Answer & ExplanationDiscuss on Board
Q9easyIn the Many-to-Many threading model, what is the role of the LWP (Lightweight Process)?AIt tracks the mouse cursor.BIt acts as an intermediate data structure (virtual processor) between user threads and kernel threads.CIt is the same as the kernel.DIt deletes temporary files.Check AnswerReveal Answer & ExplanationDiscuss on Board
Q10mediumIn the Many-to-One threading model, what happens if one thread performs a blocking I/O operation?AThe thread is suspended, but others continue.BThe thread is migrated to a new kernel.CThe entire process is blocked because the kernel only sees one process.DThe OS ignores the block.Check AnswerReveal Answer & ExplanationDiscuss on Board