Interview Questions

1. While viewing activity on SQL Server, for example, sp_who2 – the status column displays different states – RUNNABLE – SUSPENDED – RUNNING. Could you explain the difference?

Some background information on the SQL Schedulers, will make understanding the RUNNABLE – SUSPENDED – RUNNING model clearer.

Schedulers are made up of three parts. A thread cycles though these three parts

1) Processor

2) Waiter list – threads waiting for resources. Use Sys.dm_os_waiting_tasks to view resource waits for the resources

3) Runnable – thread has all the resources and waiting for the processor. Explore runnable status with

the sys.dm_os_schedulers and sys.dm_exec_requests DMVs

This leads us into the RUNNABLE – SUSPENDED – RUNNING

1) RUNNING – thread is executing on the server

2) SUSPENDED – thread is waiting for resources to become available.

3) RUNNABLE – the thread is waiting to execute on the processor

By Hena Parveen 2 0
Is this helpful? Yes No

Submit an interview question

Submitted questions and answers are subject to review and editing, and may or may not be selected for posting, at the sole discretion of w3Sniff.

Get Started

Comments

Leave a Comment


Check out more interview questions

Based on your skills

MS SQL Server

2567540 1720 50 859

Angular

67721 92 0 46

Wordpress

57027 72 1 36