Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Operating Systems Questions 16) The following table shows a system in a safe sta

ID: 3737867 • Letter: O

Question

Operating Systems Questions

16) The following table shows a system in a safe state. The system has a total of 12 tape drives. Job Allocated Max Need 4 Select which of the following would change it to an unsafe state: 16.1.job 2 requests and is allocated 2 tape drives 16.2. job 1 requests and is allocated 2 tape drives 16.3. job 3 requests and is allocated 2 tape drives 17) Which of the problems listed below is related to Re-locatable Dynamic Partition m allocation scheme 17.1 internal fragmentations; 17.2 external fragmentations; 17.3 compaction overhead; 17.4 large numbers of tables; 17.5 large numbers of interrupts. S) Demand aing Memory Allocation allows Memory Manager to solve problems of 18.1 internal fragmentation; 18.2 keeping large tables in the memory; 18.3 having job size limited to physical memory size; 18.4 eliminating overhead for handling necessary paging hardware; 18.5 eliminating possibility of thrashing 19) If the Modified Bit in the Page Map Table equal to 1, it means 19.1 the page must be modified; 19.2 the page cannot be modified; 19.3 the page must be saved before removing it from the memory; 19.4 an address of the page must be modified; 19.5 the page may be relocated in the memory 20) The main disadvantage of Fist-Come First-Serve process scheduling algorithm is: 20.1 the rank of turnaround time varies widely; 20.2 the turnaround time is always very big; 20.3 the waiting time is always very big; 20.4 the algorithm is very complex in implementation; 20.5 the algorithm can be used only for short jobs.

Explanation / Answer

Answer 16- 16.2 will be unsafe because
Here we have total 12 tape drives
Allocation matrix =[1 4 5 ]
Max need = [ 4 6 7 ]
Need matrix = Max - Allocated
[ 4 6 7 ] - [ 1 4 5 ] = [ 3 2 2 ]
so job 1 need 3 tapes to complete its task.
and job 2 need 2 tapes to complete its task.
and job 3 also need 2 tapes to complete its task.
we have total 12 tapes from which we had given 1 to job1 , 4 to job2 and 5 to job3.
so remaing tapes = 12-(1+4+5)=2
we have 2 tapes remaining
now if we allocate 2 tapes to job2 ,, job 2 will complete its task and will free its all tapes so all jobs will complete
hence safe state =(job2,job1,job3)
if we allocate 2 tapes to job1 ,, job 1 will not be able complete its task as it need 3 tapes .
this will be unsafe.
if we allocate 2 tapes to job3 ,, job 3 will complete its task and will free its all tapes so all jobs will complete
hence safe state =(job3,job1,job2)
17 -- answer 17.3 and 17.5 because

In re locatable dynamic partation-


* Memory Manager relocates programs to gather all empty blocks and compact them to make 1 memory block.

* Memory compaction (garbage collection, defragmentation) performed by OS to reclaim fragmented sections of
memory space.
*  Memory Manager optimizes use of memory & improves throughput by compacting & relocating.
* Compaction causes high number of interrupts.

Answer 18 - 18.2
In multilevel paging we break the page table into smaller size page table . this solve the problem of larger size page table in memory
internal fragmentation happing in paging in last page. paging causes thrashing.and in pageing we need special hardware.
Answer 19 - 19.3
When a block of memory is to be replaced, its corresponding dirty bit is checked to see if the block needs to be written back to secondary memory before being replaced or if it can simply be removed.
if modified bit = 1  block needs to be written back to secondary memory before being replaced .
Answer 20-20.1
as when short jobs are executed first turn around time will be less and when long time jobs are executed first turn around time increase .
Turnaround time, waiting time and response time depends on the order of their arrival of process.