Question Bank Osy-1
Question Bank Osy-1
Question Bank
2 Marks question
1) fork( )
2) exec( )
3) abort( )
4) end( )
Ans. Ans. 1. fork ( ) This system call is used to create a new process.
2. exec( ) This system call is used to replace the process’s memory space with anew program.
It loads a binary file into memory and starts its execution.
3. abort( ) This system call is used to halt process execution abnormally.
4. end ( ) This system call is used to halt process execution normally.
4 marks question
The Text section is made up of the compiled program code, read in from non-
volatile storage when the program is launched.
The Data section is made up the global and static variables, allocated and initialized
prior to executing the main.
The Heap is used for the dynamic memory allocation, and is managed via calls to
new, delete, malloc, free, etc.
The Stack is used for local variables. Space on the stack is reserved for local
variables when they are declared.
Switching Occurs when the currently running Carried out each time after the time slice
process stops. of process is finished.
A Program does nothing unless its instructions are executed by a CPU. A program in execution is
called a process.
There may exist more than one process in the system which may require the same resource at the
same time. Therefore, the operating system has to manage all the processes and the resources in a
convenient and efficient way.
Some resources may need to be executed by one process at one time to maintain the consistency
otherwise the system can become inconsistent and deadlock may occur.
The operating system is responsible for the following activities in connection with Process
Management
New: The process being created is available in the new state. It is the new state
because the system is not permitted it to enter the ready state due to limited
memory available in the ready queue. If some memory
becomes available, then the process from the new state will go to ready state.
Ready State: The process which is not waiting for any external event such as I/O
operation and which is not running is said to be in ready state. It is not in the
running state because some other process is already
running. It is waiting for its turn to go to the running state.
Running State: The process which is currently running and has control of the
CPU is known as the process in running state. In single user system, there is only
one process which is in the running state. In multiuser system, there are multiple
processes which are in the running state.
Blocked State: The process that is currently waiting for external event such as
an I/O operation is said to be in blocked state. After the completion of I/O
operation, the process from blocked state enters in the
ready state and from the ready state when the process turn will come it will
again go to running state.
Terminated State: The process whose operation is completed, it will go the
terminated state from the running state. In halted state, the memory occupied by
the process is released.