logo

Crowdly

Browser

Додати до Chrome

BCSE303P Operating Systems Lab (Lab) Fall 2025-26 (L51+L52) [VL2025260103453]

Шукаєте відповіді та рішення тестів для BCSE303P Operating Systems Lab (Lab) Fall 2025-26 (L51+L52) [VL2025260103453]? Перегляньте нашу велику колекцію перевірених відповідей для BCSE303P Operating Systems Lab (Lab) Fall 2025-26 (L51+L52) [VL2025260103453] в moovit.vit.ac.in.

Отримайте миттєвий доступ до точних відповідей та детальних пояснень для питань вашого курсу. Наша платформа, створена спільнотою, допомагає студентам досягати успіху!

Q1. Write a program to simulate Zombie process creation. 

  • Create a child process that executes a simple task (e.g., a loop for a few seconds printing something) and then terminates using exit().

  • The parent process should not immediately call wait() or waitpid(). Instead, it should sleep for a longer duration, allowing the child to terminate first.

  • During this interval, use the system("ps -l") command to display the process states, demonstrating that the terminated child has become a zombie process (marked with Z or <defunct>).

  • After observing the zombie state, the parent should call wait() to reap the child process and print a confirmation message. 

Q2. Consider the following set of processes.

Process IDArrival Time (ms)PriorityCPU Burst TimeIO Burst Time
P102527
P214448
P321833
P4331242
P540336

Write a program to simulate Non-Preemptive Shortest Job First (SJF) scheduling algorithm . The program must output the following:

  • A Gantt chart or a chronological log showing the execution sequence of processes on the CPU or order of Process execution.

  • For each process (P1 to P5), calculate and display:

    • Finish Time: The time at which the process completes its final CPU burst.

    • Turnaround Time: (Finish Time - Arrival Time).

    • Waiting Time: The total time a process spends in the ready queue waiting for the CPU.

    • CPU Utilization

  • Finally, calculate and display the average Turnaround Time and average Waiting Time and no. of context switches. 

Переглянути це питання

Question 5 (10 Marks)

Write the Shell Commands for each of the following and show its output. {Hint: You can use Apropos command to search the manual page descriptions (man pages) for a given keyword, helping you find commands when you do not remember their exact names but know a related word or functionality}

1.       Write the command to display your current working directory.

2.       Change to your home directory using a single command.

3.       List all files and folders, including hidden ones, in the current directory.

4.       Move up one directory level from your current location.

5.       Go directly to the /etc directory from your current location.

6.       Create a new directory named practice_folder.

7.       Make an empty file called notes.txt inside practice_folder.

8.       Copy notes.txt to a file named notes_backup.txt in the same folder.

9.       Rename notes_backup.txt to notes_archive.txt.

10.   Delete the file notes_archive.txt.

 

Question 6. (10 Marks)

Write a bash script that asks the user for a starting and ending integer.

§  Use a loop (for or while) to traverse numbers in the range.

§  For each number, use a conditional statement (if) to check whether it is even.

Sum all even numbers (arithmetic with variables), and print the result at the end.

Переглянути це питання

Хочете миттєвий доступ до всіх перевірених відповідей на moovit.vit.ac.in?

Отримайте необмежений доступ до відповідей на екзаменаційні питання - встановіть розширення Crowdly зараз!

Browser

Додати до Chrome