CS604 CURRENT MIDTERM PAPER WITH SOLUTION

operating system components






  • SCHEDULING THE ORDER IN FCFS AND ROUND ROBIN

In First-Come, First-Served (FCFS) scheduling, the order of execution is based on the arrival time of processes, with the earliest arrival time being scheduled first. In Round Robin (RR) scheduling, the order of execution is based on a fixed time quantum allocated to each process, with processes executed in a circular manner.


FORK SYSTEM CALL
The fork() system call in an operating system creates a new process by duplicating the existing process. The new process, known as the child process, is an exact copy of the parent process, including its code, data, and execution state.

WHY mknod() call fail give two reason
The mknod() call may fail due to insufficient privileges or lack of necessary file system permissions. Another possible reason is when the file system is full or has reached its maximum capacity, preventing the creation of new nodes.

EXIT SYSTEM CALL
The exit system call is used to terminate a process in an operating system. It releases all resources allocated to the process and returns control to the parent process or the operating system.

file description
A file description is a unique identifier for an open file in an operating system, used for accessing and manipulating the file within a process. It is typically represented as a small non-negative integer.



cpu shedulers short term , long term , medium term

In operating systems, short-term schedulers (also known as CPU schedulers) determine which processes are executed immediately and allocate CPU time. Long-term schedulers (also called admission or job schedulers) select processes from the job pool and bring them into the system for execution. Medium-term schedulers handle the swapping of processes between main memory and secondary storage.


INTER COMMUNICATION TOOLS GIVEN BY UNIX/LINUX
  1. Pipes: Pipes are used for one-way communication between processes. They allow the output of one process to be connected directly as input to another process. There are two types of pipes: anonymous pipes and named pipes (FIFOs).

  2. Signals: Signals are software interrupts used to communicate events or requests to a process. They can be used to notify a process about specific conditions, such as termination, user-defined events, or error conditions.

  3. Sockets: Sockets provide a means for inter-process communication (IPC) over a network. They enable communication between processes running on different systems or even on the same system. Sockets can be used for both local and remote communication.

  4. Message Queues: Message queues allow processes to exchange messages through a queue-like mechanism. Messages are stored in a queue and can be retrieved by other processes. Message queues provide a flexible and reliable method of IPC.

  5. Shared Memory: Shared memory allows multiple processes to access the same region of memory, enabling them to share data directly. This method provides fast and efficient communication between processes, but it requires careful synchronization to avoid data inconsistencies.

  6. Semaphores: Semaphores are synchronization primitives used for coordinating access to shared resources. They can be used to control access to critical sections of code or to synchronize the activities of multiple processes.

write the scheduling algorithm in high or low order according to throughput.[1.SJF , 2.RR , 3.PRIORITY QUEUE]

The scheduling algorithms in order of increasing throughput (from low to high) are as follows:

  1. Shortest Job First (SJF): This algorithm selects the process with the shortest burst time first, allowing for minimal waiting time. It may result in higher throughput when there are many short processes.

  2. Round Robin (RR): This algorithm allocates a fixed time quantum to each process in a circular manner. It ensures fairness and prevents starvation, but it may have lower throughput due to frequent context switching.

  3. Priority Queue: This algorithm assigns priorities to processes, where higher priority processes are executed first. It can achieve high throughput if the priorities are properly assigned and dynamic priority adjustments are made based on process characteristics and system needs.


#CS604CURRENTMIDTERMPAPERWITHSOLUTION#CS604CURRENTMIDTERMPAPERWITHSOLUTION#CS604CURRENTMIDTERMPAPERWITHSOLUTION#CS604CURRENTMIDTERMPAPERWITHSOLUTION#CS604CURRENTMIDTERMPAPERWITHSOLUTION#CS604CURRENTMIDTERMPAPERWITHSOLUTION#CS604CURRENTMIDTERMPAPERWITHSOLUTION#CS604CURRENTMIDTERMPAPERWITHSOLUTION#CS604CURRENTMIDTERMPAPERWITHSOLUTION#CS604CURRENTMIDTERMPAPERWITHSOLUTION#CS604CURRENTMIDTERMPAPERWITHSOLUTION#CS604CURRENTMIDTERMPAPERWITHSOLUTION#CS604CURRENTMIDTERMPAPERWITHSOLUTION#CS604CURRENTMIDTERMPAPERWITHSOLUTION#CS604CURRENTMIDTERMPAPERWITHSOLUTION#CS604CURRENTMIDTERMPAPERWITHSOLUTION#CS604CURRENTMIDTERMPAPERWITHSOLUTION#CS604CURRENTMIDTERMPAPERWITHSOLUTION#CS604CURRENTMIDTERMPAPERWITHSOLUTION#CS604CURRENTMIDTERMPAPERWITHSOLUTION#CS604CURRENTMIDTERMPAPERWITHSOLUTION#CS604CURRENTMIDTERMPAPERWITHSOLUTION#CS604CURRENTMIDTERMPAPERWITHSOLUTION#CS604CURRENTMIDTERMPAPERWITHSOLUTION#CS604CURRENTMIDTERMPAPERWITHSOLUTION#CS604CURRENTMIDTERMPAPERWITHSOLUTION#CS604CURRENTMIDTERMPAPERWITHSOLUTION#CS604CURRENTMIDTERMPAPERWITHSOLUTION#CS604CURRENTMIDTERMPAPERWITHSOLUTION#CS604CURRENTMIDTERMPAPERWITHSOLUTION#CS604CURRENTMIDTERMPAPERWITHSOLUTION#CS604CURRENTMIDTERMPAPERWITHSOLUTION#CS604CURRENTMIDTERMPAPERWITHSOLUTION#CS604CURRENTMIDTERMPAPERWITHSOLUTION#CS604CURRENTMIDTERMPAPERWITHSOLUTION#CS604CURRENTMIDTERMPAPERWITHSOLUTION#CS604CURRENTMIDTERMPAPERWITHSOLUTION#CS604CURRENTMIDTERMPAPERWITHSOLUTION