Geschreven door studenten die geslaagd zijn Direct beschikbaar na je betaling Online lezen of als PDF Verkeerd document? Gratis ruilen 4,6 TrustPilot
logo-home
Tentamen (uitwerkingen)

Important Question of Operating System

Beoordeling
-
Verkocht
-
Pagina's
5
Cijfer
A+
Geüpload op
14-12-2024
Geschreven in
2024/2025

This document contains all the important question related to Operating Systems. Covers all the important parts of Operating System like life cycle of thread, Bankers Algorithm and others related things.

Instelling
Vak

Voorbeeld van de inhoud

SOME QUESTION OF OPERATING SYSTEM
1) State the various states of a process. Briefly explain the process state diagram.




Ans: The process, from its creation to completion, passes through various states. The
minimum number of states is five. The names of the states are not standardized
although the process may be in one of the following states during execution.

1. New--A program which is going to be picked up by the OS into the main memory is
called a new process.
2. Ready--Whenever a process is created, it directly enters in the ready state, in which,
it waits for the CPU to be assigned. The OS picks the new processes from the secondary
memory and put all of them in the main memory. The processes which are ready for
the execution and reside in the main memory are called ready state processes. There
can be many processes present in the ready state.
3. Running--One of the processes from the ready state will be chosen by the OS
depending upon the scheduling algorithm.. If we have n processors in the system then
we can have n processes running simultaneously.
4. Block or wait--From the Running state, a process can make the transition to the
block or wait state depending upon the scheduling algorithm or the intrinsic behavior
of the process. When a process waits for a certain resource to be assigned or for the
input from the user then the OS move this process to the block or wait state and
assigns the CPU to the other processes.
5. Completion or termination--When a process finishes its execution, it comes in the
termination state. All the context of the process (Process Control Block) will also be
deleted the process will be terminated by the Operating system.
6. Suspend ready--A process in the ready state, which is moved to secondary memory
from the main memory due to lack of the resources (mainly primary memory) is called
in the suspend ready state. The suspend ready processes remain in the secondary
memory until the main memory gets available.

, (2.)What is a thread? State the shared and unique attributes of a thread? Write the
advantages of thread.

Ans: A thread is a single sequential flow of execution of tasks of a process so it is also known
as thread of execution or thread of control. There is a way of thread execution inside the
process of any operating system.

User-level thread--The operating system does not recognize the user-level thread. User
threads can be easily implemented and it is implemented by the user. If a user performs a
user-level thread blocking operation, the whole process is blocked. The kernel level thread
does not know nothing about the user level thread.

Kernel level thread--The kernel thread recognizes the operating system. There is a thread
control block and process control block in the system for each thread and process in the
kernel-level thread. The kernel-level thread is implemented by the operating system. The
kernel knows about all the threads and manages them.

ADVANTAGES OF THREAD

Enhanced throughput of the system: When the process is split into many threads, and each thread is
treated as a job, the number of jobs done in the unit time increases. That is why the throughput of
the system also increases.

Effective Utilization of Multiprocessor system: When you have more than one thread in one
process, you can schedule more than one thread in more than one processor.

Faster context switch: The context switching period between threads is less than the process
context switching. The process context switch means more overhead for the CPU.

Responsiveness: When the process is split into several threads, and when a thread completes its
execution, that process can be responded to as soon as possible.

Communication:- Multiple-thread communication is simple because the threads share the same
address space, while in process, we adopt just a few exclusive communication strategies for
communication between two processes.

(2).Discuss about thread libraries, the ways of implementing thread libraries in OS and its
types.
--A thread is a lightweight of process and is a basic unit of CPU utilization which consists of a
program counter, a stack, and a set of registers. Ways of implementing thread library
There are two primary ways of implementing thread library, which are as follows −
The first approach is to provide a library entirely in user space with kernel support. All code and data
structures for the library exist in a local function call in user space and not in a system call.
The second approach is to implement a kernel level library supported directly by the operating
system. In this case the code and data structures for the library exist in kernel space. The main thread
libraries which are used are given below −
POSIX threads − Pthreads, the threads extension of the POSIX standard, may be provided as either a
user level or a kernel level library.

Geschreven voor

Instelling
Vak

Documentinformatie

Geüpload op
14 december 2024
Aantal pagina's
5
Geschreven in
2024/2025
Type
Tentamen (uitwerkingen)
Bevat
Vragen en antwoorden

Onderwerpen

$3.59
Krijg toegang tot het volledige document:

Verkeerd document? Gratis ruilen Binnen 14 dagen na aankoop en voor het downloaden kun je een ander document kiezen. Je kunt het bedrag gewoon opnieuw besteden.
Geschreven door studenten die geslaagd zijn
Direct beschikbaar na je betaling
Online lezen of als PDF

Maak kennis met de verkoper
Seller avatar
saiswiniroy

Maak kennis met de verkoper

Seller avatar
saiswiniroy GITA Autonomous College
Volgen Je moet ingelogd zijn om studenten of vakken te kunnen volgen
Verkocht
-
Lid sinds
1 jaar
Aantal volgers
0
Documenten
5
Laatst verkocht
-

0.0

0 beoordelingen

5
0
4
0
3
0
2
0
1
0

Recent door jou bekeken

Waarom studenten kiezen voor Stuvia

Gemaakt door medestudenten, geverifieerd door reviews

Kwaliteit die je kunt vertrouwen: geschreven door studenten die slaagden en beoordeeld door anderen die dit document gebruikten.

Niet tevreden? Kies een ander document

Geen zorgen! Je kunt voor hetzelfde geld direct een ander document kiezen dat beter past bij wat je zoekt.

Betaal zoals je wilt, start meteen met leren

Geen abonnement, geen verplichtingen. Betaal zoals je gewend bent via iDeal of creditcard en download je PDF-document meteen.

Student with book image

“Gekocht, gedownload en geslaagd. Zo makkelijk kan het dus zijn.”

Alisha Student

Bezig met je bronvermelding?

Maak nauwkeurige citaten in APA, MLA en Harvard met onze gratis bronnengenerator.

Bezig met je bronvermelding?

Veelgestelde vragen