Professional Documents
Culture Documents
University of Sialkot, Pakistan: Midterm Examination-Spring-2021
University of Sialkot, Pakistan: Midterm Examination-Spring-2021
Midterm Examination-Spring-2021
Course Code:CS-2730 Course Title: Operating System
Total Time: 80 Minutes Total Marks: 20 Marks
Department: Computer Science Program: BSCS
Instructor Name: Mubeen Iqbal Instructor Sign:
Student’s Name: Kh.Ibraheem Roll No.: 18101002-063
Answer 3: No, a process can’t make transition from ready state to blocked state, because the
OS switches processes between the running and ready states. A running process can switch
itself into the blocked state, and the OS may ``wake up'' a process by switching from blocked
to ready state.
Answer 4: Kernel mode: The system starts in kernel mode when it boots and after the
operating system is loaded, it executes applications in user mode a system is in user
mode when the operating system is running a user application such as handling a text editor.
User mode transition:
The transition from user mode to kernel mode occurs when the application requests the help
of operating system or an interrupt or a system call occurs.
Answer 5: A process is removed from the running state by the scheduler if a process with a
higher priority becomes runnable.
Diagram:
ii. Message passing: Message passing is a technique for invoking behavior (i.e.,
running a program) on a computer. In message-passing systems, one system
makes a request, and another provides a response. The requestor is called
the client, and the responder is called server.
Answer 7: It is said that modern Operating Systems are ‘Interrupt Driven’ because interrupts
are important, they give the user better control over the computer. When an interrupt occurs,
it causes the CPU to stop executing the current program. The control then passes to a special
piece of code called an interrupt handler. The interrupt handler will process the interrupt and
resume the interrupted program, without interrupts, a user may have to wait for a given
application to have a higher priority over the CPU to be ran. This ensures that the CPU will
deal with the process immediately.
Answer 8: Cascading Termination: When a process creates a new process, the identity of
the newly created process is passed to its parent. When a parent process is terminating, then
all its children process is also terminated. This phenomenon is known as "Cascading
Termination" and is normally initiated by the operating system.
Answer 9: Process state: A process state represents status of the process. It may be new,
ready, running or waiting.
Diagram:
Answer 10: The kernel connects the system hardware to the application software, and every
operating system has a kernel while A bootstrap is the program that initializes the operating
system (OS) during startup.