1. Home
  2. Explore
  3. Computer Science
  4. Process States and Lifecycle

Study methods

Flashcards
Quiz
Fill in the blanks
Written test
Lesson
Notes
Podcast
Content

Process States and Lifecycle

  • 44Unfamiliar
  • 0Learning
  • 0Familiar
  • 0Mastered
Topic: Core Lifecycle

What does the process life-cycle model represent, and why is it used?

44 questions

  1. 1

    What does the process life-cycle model represent, and why is it used?

    Model answer

    It is a model that explains the states a process passes through from creation to completion. It helps users understand how a process’s status changes during its life cycle.

    Explanation

    The content presents process states as an explanatory model rather than a literal description of what the kernel knows.

  2. 2

    What are the five primary process states described in the life-cycle model?

    Model answer

    The primary states are new, ready, running, waiting or blocked, and terminated.

    Explanation

    These are described as the mandatory, default states in the model.

  3. 3

    What does the new state mean, and what example illustrates it?

    Model answer

    The new state represents a process that has been created. For example, a program that has been written and stored but not yet run is in this state.

    Explanation

    The content also uses starting an application as an example of creating a process.

  4. 4

    How does a process move from the new state to the ready state?

    Model answer

    After it is created, the process is brought into RAM and becomes ready to be scheduled for execution.

    Explanation

    The process changes from being stored in secondary memory to being available in the ready state.

  5. 5

    What is the ready state, and where is a ready process held?

    Model answer

    A process in the ready state is prepared to run but is waiting for CPU time. It is held in RAM in the ready queue.

    Explanation

    A ready process has not yet been dispatched to the CPU.

  6. 6

    How does the content describe the order in which processes enter the ready queue?

    Model answer

    It describes processes as entering the ready queue in first-in, first-out order.

    Explanation

    This refers to the stated queue-entry order, not necessarily the rule used by every CPU scheduling algorithm.

  7. 7

    What happens to a process when it enters the running state?

    Model answer

    It is dispatched to the CPU, which executes its instructions while the process remains in RAM.

    Explanation

    The running state indicates that the process is currently receiving CPU execution.

  8. 8

    What does termination involve in the process life cycle?

    Model answer

    The process has finished executing, and the resources and memory addresses allocated to it are deallocated.

    Explanation

    Deallocation frees limited resources for other processes.

  9. 9

    Why can’t all processes stored in secondary memory necessarily be brought into the ready state at once?

    Model answer

    The content treats secondary memory as comparatively large but RAM as limited, so only some processes can be brought into RAM and the ready queue.

    Explanation

    The number of processes admitted to the ready state is constrained by available memory.

  10. 10

    What is the long-term scheduler’s role in the process life cycle?

    Model answer

    It selects processes from the larger pool and brings some of them into the ready state.

    Explanation

    This controls which processes are admitted to the set of processes in RAM awaiting CPU time.

  11. 11

    How does the content relate the long-term scheduler to multiprogramming?

    Model answer

    The long-term scheduler supports multiprogramming by bringing multiple processes into the ready queue so they are available for execution.

    Explanation

    The content describes multiprogramming as bringing more processes into the ready queue.

  12. 12

    What is the short-term scheduler responsible for?

    Model answer

    It selects a process from the ready state and dispatches it to the running state.

    Explanation

    The short-term scheduler determines which ready process gets CPU execution next.

  13. 13

    What does dispatching a process mean?

    Model answer

    Dispatching means scheduling a process from the ready queue to run on the CPU.

    Explanation

    Dispatching is the transition from ready to running.

  14. 14

    What determines how many processes can be in the running state at the same time?

    Model answer

    The number of available processors determines how many processes can execute at the same time; the content assumes one processor for its basic explanation.

    Explanation

    A uniprocessor runs one process at a time, whereas a multiprocessor system can run multiple processes in parallel.

  15. 15

    What is the medium-term scheduler’s general responsibility?

    Model answer

    It manages suspending and resuming processes, including moving processes between RAM and secondary memory when memory pressure requires it.

    Explanation

    The content associates medium-term scheduling with managing RAM use through swapping.

  16. 16

    What is the difference between multiprogramming and multitasking as described in the content?

    Model answer

    Multiprogramming involves bringing multiple processes into the ready queue, while multitasking involves sharing CPU execution among processes, including by interrupting one process so another can run.

    Explanation

    The distinction is between having processes available for execution and switching CPU execution among them.

  17. 17

    In a uniprocessor system, how many processes can execute on the CPU at one time according to the content?

    Model answer

    Only one process can execute on the CPU at a time.

    Explanation

    The content uses a uniprocessor system as its assumption for explaining process scheduling.

  18. 18

    How does the content contrast uniprocessor and multiprocessor execution?

    Model answer

    A uniprocessor executes one process at a time, while a multiprocessor system can execute multiple processes in parallel.

    Explanation

    Parallel execution is associated with having multiple processors.

  19. 19

    What makes a scheduling approach non-preemptive?

    Model answer

    It is non-preemptive when a process continues running to completion without being interrupted in the middle for another process.

    Explanation

    In the content’s contrast, there is no intervening priority-based interruption or time-quantum expiration.

  20. 20

    What makes a scheduling approach preemptive?

    Model answer

    It is preemptive when a running process can be stopped before it finishes so another process can run.

    Explanation

    The content gives a higher-priority process arriving and a time quantum expiring as reasons for preemption.

  21. 21

    What happens to a running process if a higher-priority process arrives and is selected to run?

    Model answer

    The currently running process is interrupted and returned to the ready queue so the higher-priority process can use the CPU.

    Explanation

    This is an example of preemption based on priority.

  22. 22

    How does round-robin scheduling use a time quantum?

    Model answer

    It allows a process to run for a fixed time quantum; if the process has not finished when the quantum expires, it returns to the ready queue.

    Explanation

    The process can receive another turn later, while another process runs in the meantime.

  23. 23

    In the content’s example, what happens if a process finishes before its time quantum expires?

    Model answer

    The process terminates rather than returning to the ready queue.

    Explanation

    A process is returned to the ready queue after quantum expiration only if it has not finished.

  24. 24

    Why does a process make a transition from running to waiting or blocked?

    Model answer

    It makes this transition when it requests an input/output operation, such as reading a file or accessing hardware, and must wait for that operation.

    Explanation

    The process blocks instead of continuing to occupy the CPU while waiting for I/O.

  25. 25

    Why does the content say that a process waiting for secondary-memory I/O should not keep the CPU occupied?

    Model answer

    Secondary memory is slow compared with CPU execution, so waiting for its I/O on the CPU would prevent other processes from running.

    Explanation

    The process is moved to a waiting state so the CPU can execute other work.

  26. 26

    Where is a process held while it is in the waiting or blocked state in the basic model?

    Model answer

    It remains in RAM in the wait or block queue while its I/O operation is pending.

    Explanation

    Waiting does not by itself mean that the process has been moved to secondary memory.

  27. 27

    What happens to a blocked process when its I/O operation completes?

    Model answer

    It returns to the ready queue, where it waits for another opportunity to run on the CPU.

    Explanation

    It does not move directly from waiting to running because it must be scheduled again.

  28. 28

    Give two examples of operations that can cause a process to request I/O and block.

    Model answer

    Reading a file from secondary memory and accessing a device or other hardware can cause a process to block.

    Explanation

    The content identifies both file access and hardware access as possible I/O requests.

  29. 29

    What does the wait queue represent, and why can it create a memory problem?

    Model answer

    It holds processes waiting for I/O. If many processes block at once, the queue can fill and consume limited RAM.

    Explanation

    The content uses this situation to motivate suspended states and swapping.

  30. 30

    What is a suspended wait or suspended block state?

    Model answer

    It is a state for a blocked process that has been moved out of RAM to secondary memory, typically because the wait queue or available RAM is full.

    Explanation

    Suspending the process frees RAM while it waits for its I/O work.

  31. 31

    What does swapping out a process mean in this life-cycle discussion?

    Model answer

    Swapping out means moving a process from RAM to secondary memory for a period of time.

    Explanation

    The process may later be brought back into RAM when conditions allow.

  32. 32

    How does the medium-term scheduler respond when processes waiting for I/O put too much pressure on RAM?

    Model answer

    It can swap some waiting processes out to secondary memory and place them in the suspended wait state.

    Explanation

    This reduces the number of processes occupying RAM while waiting.

  33. 33

    What can happen to a suspended waiting process after its I/O operation completes?

    Model answer

    It can return to the wait queue if space is available; otherwise, it may remain suspended until it can be brought back.

    Explanation

    The process must return to RAM before it can rejoin the usual path toward the ready state.

  34. 34

    Why might a process be placed in the suspended ready state?

    Model answer

    It may be suspended when the ready queue is full, or when room must be made for a higher-priority process that needs to enter the ready state.

    Explanation

    A suspended-ready process is not currently in the RAM-based ready queue.

  35. 35

    How can a suspended-ready process return to the ready state?

    Model answer

    When space becomes available in the ready queue, the process can be resumed and brought back into the ready state.

    Explanation

    The medium-term scheduler manages this suspension and resumption.

  36. 36

    How does a suspended waiting process ultimately reach the ready state after its I/O is complete?

    Model answer

    It must first return to the wait state when possible, then move to the ready state after the I/O completes and it can rejoin the normal scheduling path.

    Explanation

    A suspended waiting process does not move directly into the running state.

  37. 37

    What does the content mean by backing storage in the discussion of suspended processes?

    Model answer

    It refers to storing a process in secondary memory when it cannot currently return to a RAM-based queue.

    Explanation

    The process can be brought back when the relevant queue has space.

  38. 38

    What criteria might be used to decide which processes to move out of RAM?

    Model answer

    The content says the medium-term scheduler may use a selection policy such as least-frequently-used, most-frequently-used, or priority-based selection.

    Explanation

    The particular policy determines which processes are selected to free space.

  39. 39

    What kinds of memory pressure can lead to suspension?

    Model answer

    Suspension may be used when the ready queue or wait queue is full, or more generally when processes are filling RAM.

    Explanation

    The medium-term scheduler uses suspension and swapping to make room for other processes.

  40. 40

    Where can a user view a list of processes in Windows, according to the content?

    Model answer

    A user can view processes in the process tab of Windows Task Manager.

    Explanation

    The tab displays a list of processes running in the system.

  41. 41

    What kinds of processes does the Windows Task Manager process list distinguish in the content?

    Model answer

    It shows system processes and user processes.

    Explanation

    The content identifies these as categories visible in the process list.

  42. 42

    Which command does the content identify for viewing process information in Unix or Linux?

    Model answer

    It identifies the ps command.

    Explanation

    The content also mentions variations such as ps -e and ps -u.

  43. 43

    What information about a process can the ps command provide, according to the content?

    Model answer

    It can show a process ID, the command the process is executing, and information about how long it has been running on the CPU.

    Explanation

    The content describes ps as a way to inspect process information.

  44. 44

    What are two variations of the ps command mentioned in the content?

    Model answer

    The content mentions ps -e and ps -u.

    Explanation

    These are given as examples of variations of the general ps command.

1 of 44
Question 1 of 44

Ask anything

We've read this whole study set, so questions about it get the best answers.

FlashcardsQuizFill in the blanksWritten testLessonNotesPodcastContent