CS FundamentalsHardGATE CS
Statement 1: A context switch between two threads of the same process need not flush the TLB. Statement 2: A context switch between two processes on a CPU without address-space identifiers must flush (or invalidate) the TLB. Which is correct?
- A. Only statement 1
- B. Only statement 2
- C. Neither statement
- D. Both statements
Correct answer: D. Both statements
Threads of one process share one address space, so their translations remain valid. Different processes map the same virtual pages to different frames, so without ASID tags the old entries would be wrong and must be invalidated.
More Operating Systems questions
- A process's page table has valid entries for pages 0-5 only. With 1 KB pages, which logical address causes a trap instead of a translation?
- A machine has 46-bit virtual addresses, 16 KB pages and 4-byte page-table entries. Lower page-table levels are full 16 KB pages; the top…
- A machine has 48-bit virtual addresses, 4 KB pages and 4 GB of physical memory and uses a hashed inverted page table. Each IPT entry (one…
- A 3-level paging system has TLB lookup 20 ns and memory access 100 ns. On a TLB miss the three page-table levels are read from memory and…
- A system with a single-level page table has a TLB (lookup 10 ns, done before every access, hit ratio 90%) and a 100 ns memory; a TLB miss…
- Shared integer x = 1. Thread T1 executes x = x + 1; x = x + 1; and thread T2 executes x = x 2;. Each statement is compiled to a LOAD into…