Osy Ans PDF
Osy Ans PDF
Define
i.Process: - A process is an instance of a computer program that is being
executed by one or many threads. It is an independent and dynamic entity that
executes a set of instructions within a computer system. A process has its own
memory space, resources, and state.
ii.PCB (Process Control Block): - A Process Control Block is a data structure
maintained by the operating system to store information about a process. It
contains details such as process state, program counter, register values, memory
allocation, and other relevant information needed for process management.
2. What is Process Management?
- Process management involves the coordination and control of processes within
a computer system. It includes creating, scheduling, terminating, and managing
processes, as well as providing mechanisms for processes to communicate and
synchronize.
3.Define Scheduler and state its types:**
-Scheduler: A scheduler is a component of the operating system responsible for
deciding which process/thread should run next. It determines the order and
priority of processes in the ready queue.
- Types of Schedulers:**
1. **Long-Term Scheduler (Job Scheduler):** Selects which processes
should be brought into the ready queue for execution.
2. **Short-Term Scheduler (CPU Scheduler):** Selects which process should
be executed next and allocates CPU time.
- **Explanation:** ![
- The PCB contains information about the process, including process ID,
state, program counter, CPU registers, memory information, and other details
needed for process management.
Process State ,Process number ,Program Counter, CPU Registers ,Memory
Management Information
3. **Differentiate between Long-Term and Short-Term Scheduler:**
Sr.
No
Only keyboard
Resources Mouse and keyboard both can
used be used
1. Differentiate between Multi programmed and Multitasking operating System (Any two
points)
CPU
USER 2 (ACTIVE STATUS)
USER 5
3. What is purpose of system call? State two system calls with their
functions.+
Ans=
System call provides an interface between a running program and operating
system. It allows user to access services provided by operating system. This
system calls are procedures written using C, C++ and assembly language
instructions. Each operating system has its own name for each system call. Each
system call is associated with a number that identifies itself.
*System calls:
*Process Control: Program in execution is a process. A process to be executed
must be loaded in main memory. while executing it may need to wait,
terminate or create & terminate child processes.
end, abort load, execute create process, terminate process get process
attributes, set process attributes wait for time wait event, signal event
allocate and free memory
* Device Management: When a process is in running state, it requires several
resources to execute. These resources include main memory, disk drives, files
and so on. If the resource is available, it is assigned to the process. Once the
resource is allocated to the process, process can read, write and reposition the
device.
request device, release device read, write, reposition get device
attributes, set device attributes logically attach or detach devices