Previous Year Questions: Process | Operating System - Computer Science Engineering (CSE) PDF Download

Q1: Consider a process P running on a CPU. Which one or more of the following events will always trigger a context switch by the OS that results in process P moving to a non-running state (e.g., ready, blocked)? (2024 set 2)
(a) P makes a blocking system call to read a block of data from the disk
(b) P tries to access a page that is in the swap space, triggering a page fault|
(c) An interrupt is raised by the disk to deliver data requested by some other process
(d) A timer interrupt is raised by the hardware
Ans: 
(a, b)
Sol: 
A: True
If a Process itself makes a block() call then it will be blocked until I/O.
B: True.
If a page is not in the physical memory, then the OS invokes the Page Fault Handler, and the process remains blocked until the page is read (i.e., disk I/O is complete).
By the way, there are two types of page faults: Minor and Major. A Minor fault occurs when a page is already in physical memory but was brought earlier using some other process, and the current process might not be aware of it. This typically happens when pages are shared. A Major Page Fault, on the other hand, occurs when we need to access the disk to retrieve the page into physical memory.
You can read more about both types of page faults here:
Since this question ask to get a page from the disk, it is considered a Major Page Fault. Therefore, the current process will be blocked until this I/O operation is completed.
C: False
That kind of request will be served by DMA and the CPU doesn't need to get involved hence the current program will keep on using the CPU.
D: False


Q2:Which of the following process state transitions is/are NOT possible?  (2024 set 1)
(a) Running to Ready
(b) Waiting to Running
(c) Ready to Waiting
(d) Running to Terminated
Ans:
(b, c)
Sol: Consider the following process state diagram:
Previous Year Questions: Process | Operating System - Computer Science Engineering (CSE)From the above process state diagram, it is clear that:

  • A process can go from running to ready.
  • A process can go from running to exit/terminate.
  • A process can not go from waiting to running and ready to wait.

Option (B, C) is correct.

Q3: Consider the following statements about process state transitions for a system using preemptive scheduling.  (2020)
I. A running process can move to ready state.
II. A ready process can move to running state.
III. A blocked process can move to running state.
IV. A blocked process can move to ready state.
Which of the above statements are TRUE?
(a) I, II and III only
(b) II and III only
(c) I, II and IV only
(d) I, II, III and IV only
Ans: 
(c)
Sol:  A blocked process cannot go to running state directly. Except (III), every option is viable.

Previous Year Questions: Process | Operating System - Computer Science Engineering (CSE)Answer-(C)

Q4:The maximum number of processes that can be in Ready state for a computer system with n CPUs is  (2015 SET 3)
(a) n
(b) n2 
(c) 2n
(d) Independent of n
Ans: 
(d)
Sol: 
(D) independent of .
The number of processes that can be in READY state depends on the Ready Queue size and is independent of the number of CPU's.

Q5: In the following process state transition diagram for a uniprocessor system, assume that there are always some processes in the ready state:  (2009)
Previous Year Questions: Process | Operating System - Computer Science Engineering (CSE)

Now consider the following statements:
I. If a process makes a transition D, it would result in another process making transition A immediately.
II. A process P2 in blocked state can make transition E while another process P1 is in running state.
III. The OS uses preemptive scheduling.
IV. The OS uses non-preemptive scheduling.
Which of the above statements are TRUE?
(a) I and II
(b) I and III
(c) II and III
(d) II and IV
Ans: 
(c)
Sol: 1. If a process makes a transition D, it would result in another process making transition A immediately. - This is false. It is not said anywhere that one process terminates, another process immediately come into Ready state. It depends on availability of process to run & Long term Scheduler.
2. A process P2 in blocked state can make transition E  while another process P2  is in running state. - This is correct. There is no dependency between running process & Process getting out of blocked state
3. The OS uses preemptive scheduling. :- This is true because we got transition  C from Running to Ready.
4. The OS uses non-preemptive scheduling. Well as previous statement is true, this becomes false.
So answer is (C) II and III .

Q6: The process state transition diagram of an operating system is as given below. Which of the following must be FALSE about the above operating system?  (2006) 
Previous Year Questions: Process | Operating System - Computer Science Engineering (CSE)

(a) It is a multi programmed operating system
(b) It uses preemptive scheduling
(c) It uses non-preemptive scheduling
(d) It is a multi-user operating system

Ans: (b)
Sol: Explanation:
A. It is a multi programmed operating system.
Correct, it has ready state. We can have multiple processes in ready state here so this is Multi programmed OS.
B. It uses preemptive scheduling
False : There is no arrow transition from running to ready state. So, this is non preemptive.
C. It uses non-preemptive scheduling
True.
D. It is a multi-user operating system.
We can have multiple user processes in ready state. So, this is also correct
Answer (B).


Q7:What is the swap space in the disk used for?  (2005)
(a) Saving temporary html pages
(b) Saving process data
(c) Storing the super-block
(d) Storing device drivers

Ans: (b)
Sol: Swap space( on the disk) is used by Operating System to store the pages that are swapped out of the memory due to less memory available on the disk. Interestingly the Android Operating System, which is Linux kernel under the hood has the swapping disabled and has its own way of handling "low memory" situations.
Pages are basically Process data, hence the answer is (B).

The document Previous Year Questions: Process | Operating System - Computer Science Engineering (CSE) is a part of the Computer Science Engineering (CSE) Course Operating System.
All you need of Computer Science Engineering (CSE) at this link: Computer Science Engineering (CSE)
10 videos|99 docs|33 tests

Top Courses for Computer Science Engineering (CSE)

FAQs on Previous Year Questions: Process - Operating System - Computer Science Engineering (CSE)

1. What is Process in Computer Science Engineering?
Ans. In Computer Science Engineering, a process refers to an instance of a program that is being executed by a computer. It includes the program code, data, and resources that are necessary for the program to run.
2. What is the importance of understanding processes in Computer Science Engineering?
Ans. Understanding processes is crucial in Computer Science Engineering as it helps in managing system resources efficiently, improving system performance, ensuring security, and facilitating communication between different parts of a system.
3. How are processes different from threads in Computer Science Engineering?
Ans. Processes are separate instances of a program with their own memory space, while threads are lightweight processes that share the same memory space. Processes are independent of each other, while threads can communicate and share resources within the same process.
4. What are the different states a process can be in Computer Science Engineering?
Ans. In Computer Science Engineering, a process can be in various states such as new, ready, running, waiting, terminated, and more. These states represent the different stages of execution a process goes through.
5. How does multitasking relate to processes in Computer Science Engineering?
Ans. Multitasking is the ability of a computer system to run multiple processes concurrently. Processes in Computer Science Engineering can take advantage of multitasking to improve system efficiency by allowing multiple programs to run at the same time.
10 videos|99 docs|33 tests
Download as PDF
Explore Courses for Computer Science Engineering (CSE) exam

Top Courses for Computer Science Engineering (CSE)

Signup for Free!
Signup to see your scores go up within 7 days! Learn & Practice with 1000+ FREE Notes, Videos & Tests.
10M+ students study on EduRev
Related Searches

shortcuts and tricks

,

mock tests for examination

,

practice quizzes

,

Viva Questions

,

ppt

,

pdf

,

MCQs

,

video lectures

,

study material

,

Summary

,

Previous Year Questions: Process | Operating System - Computer Science Engineering (CSE)

,

past year papers

,

Sample Paper

,

Objective type Questions

,

Previous Year Questions: Process | Operating System - Computer Science Engineering (CSE)

,

Exam

,

Previous Year Questions with Solutions

,

Previous Year Questions: Process | Operating System - Computer Science Engineering (CSE)

,

Semester Notes

,

Free

,

Extra Questions

,

Important questions

;