You are on page 1of 3

OPERATING SYSTEM

SESSION 2021-
2022
THEORY ASSIGNMENT
SUBMITTED

By
Kotecha Udit Hitendra
20194057
Group – CS A
DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING
MOTILAL NEHRU NATIONAL INSTITUTE OF TECHNOLOGY
ALLAHABAD
PRAYAGRAJ, INDIA -211004

Que1:
• The scheduler can only schedule user level processes to the kernel threads,
and since some of the processes are not mapped to the kernel threads,
they will be idle.
• The process will utilize all the processors in the system, therefore the work
will finish as soon as possible. But if a thread is blocked by a system call,
then a processor is not utilized while the thread waits, lowering the system
usage.
• All of the processes will be working simultaneously assuming there are
enough user threads. However, if a thread running in some processor gets
blocked by a system call, the scheduler can schedule another ready thread
in that processor, maximizing system utilization.

Que2:
User Level Threads Kernel Level Threads
1)Context switch time is less Context switch time is more
2)OS doesn’t recognize user level Kernel threads are recognized by OS
threads

User-level threads have no kernel support, so they are very inexpensive to create,
destroy, and switch among. Kernel-supported threads are more expensive
because system calls are needed to create and destroy them and the kernel must
schedule them.
Que3:
When a thread is created the threads does not require any new resources to
execute the thread shares the resources like memory of the process to which they
belong to. The benefit of code sharing is that it allows an application to have
several different threads of activity all within the same address space. Whereas if
a new process creation is very heavyweight because it always requires new
address space to be created and even if they share the memory then the inter
process communication is expensive when compared to the communication
between the threads.
Que4:
• The time quantum is 1 millisecond: Irrespective of which process is
scheduled, the scheduler incurs a 0.1 millisecond context-switching cost for
every context-switch. This results in a CPU utilization of 1/1.1 * 100 = 91%.
• The time quantum is 10 milliseconds: The I/O-bound tasks incur a context
switch after using up only 1 millisecond of the time quantum. The time
required to cycle through all the processes is therefore 10*1.1 + 10.1 (as
each I/O-bound task executes for 1 millisecond and then incur the context
switch task, whereas the CPU-bound task executes for 10 milliseconds
before incurring a context switch). The CPU utilization is therefore 20/21.1
* 100 = 94%.
Que5:
n! processes are possible. (n! = (n)*(n-1)*(n-2)…..*3*2*1).

You might also like