CS604 Midterm Current Solved Subjective by Junaid
- Type
- Midterm past paper
- Course
- CS604 Operating Systems
- Size
- PDF 1.1 MB
- Updated
- 23 Oct 2026
You get 3 free files a day on the website. Add the Chrome extensionSign in with the extension for 30 a day.
Preview text
Text from pages 2, 3, 4 of 10. Download the file for all 10 pages.
1. Exit system call Wait system call
A call to wait() blocks the calling process until one of its child processes exits or a signal is received. After child process terminates, parent continues its execution after wait system call instruction. Child process may terminate due to any of these: It calls exit();
- why mknod() call fail give two reason.
There are several reasons why a call to the mknod() function could fail:
The process does not have sufficient permissions to create the file. In order to create a file using mknod(), the process must have the appropriate permissions for the directory in which the file is being created. The file name is invalid. There are certain characters and conventions that are not allowed in file names, and if the name specified in the mknod() call contains such characters or does not follow the correct conventions, the call will fail. The file name is too long. There is a maximum length for file names on most systems, and if the name specified in the mknod() call exceeds this maximum length, the call will fail. The file system is full. If the file system does not have sufficient free space to create the file, the mknod() call will fail. The file already exists. If a file with the same name already exists in the specified directory, the mknod() call will fail unless the O_EXCL flag is set, in which case the call will fail with the EEXIST error.
In a computer operating system, the CPU scheduler is a component that manages the execution of processes on the CPU. There are three types of CPU schedulers:
Long-term scheduler (also called the job scheduler): This scheduler determines which processes should be admitted to the ready queue for execution. It is responsible for balancing the trade-off between CPU utilization and response time. The long-term scheduler is responsible for deciding which programs will be executed in the future and for how long. It is a slower-acting scheduler and is usually not invoked very often.
Short-term scheduler (also called the CPU scheduler or dispatcher): This scheduler selects which process should be executed next and allocates the CPU to it. It is a faster-acting scheduler that is invoked very frequently (e.g., every few milliseconds).
Middle-term scheduler: This is a hybrid of the long-term and short-term schedulers. It is invoked less frequently than the short-term scheduler, but more frequently than the long-term scheduler. The middle-term scheduler is responsible for adjusting the priority of processes that have been in the system for a while and have not yet completed. This can help prevent processes that have been in the system for a long time (e.g., "starving" processes) from being starved of CPU resources.
4. ps command And working of Ps-e Ps-u Ps-l
The ps command is a command-line utility that displays information about the processes running on a system. It can be used to display the processes of a specific user, the processes with a specific terminal, or all processes on the system.
The ps command has many options that can be used to modify its behavior. Some common options include:
-e: This option tells ps to display information about all processes on the system, including processes that have been terminated but have not yet been cleaned up by the system.
-u: This option tells ps to display information about processes owned by a specific user. The user's name or user ID can be specified as an argument to the -u option.
-l: This option tells ps to display information in a "long" format, which includes additional details such as the process's priority, nice value, and process ID. For example, to display information about all processes on the system in a long format, you could use the command ps -el. To display information about processes owned by the user john in a long format, you could use the command ps -ul john.
5. Similarities between threads and process
There are several similarities between threads and processes:
- Both threads and processes are independent sequences of execution that can run concurrently on a computer.
- Both threads and processes can have their own set of resources, such as memory, file handles, and network sockets.
- Both threads and processes can be scheduled by the operating system to run on a CPU.
- Both threads and processes can be created and terminated by the operating system or by other threads or processes.
- Both threads and processes can communicate with each other through various means, such as shared memory, message passing, or signaling.
- Both threads and processes can be used to divide a larger task into smaller units of work that can be executed concurrently.
- Both threads and processes can be used to improve the performance and scalability of an application by allowing it to make better use of multiple CPU cores.
6. Differentiate between absolute and relative path
An absolute path is the full, exact path to a file or directory, starting from the root directory of the file system. It includes all directories and subdirectories that must be traversed to reach the file or directory. An absolute path is not affected by the current working directory of the process or the location of the file that is being executed.
A relative path, on the other hand, is a path to a file or directory relative to the current working directory of the process. It does not include the root directory of the file system, and it specifies only the directories and subdirectories that must be traversed from the current working directory to reach the file or directory.
Related CS604 files
All CS604 files →- CS604 Midterm MCQs Combined by Masters Midterm PDF 12.8 MB
- CS604 Midterm File 4 Midterm PDF 4.4 MB
- CS604 Midterm Past Papers by Junaid Midterm PDF 1.7 MB
- CS604 Midterm Solved MCQs Set 2 by Junaid Midterm PDF 1.5 MB
- CS604 Highlighted Handouts by Mickey Ch Highlighted PDF 5 MB
- CS604 Quiz 1 by Arsal Shani and Aina Malik Quiz PDF 678 KB
Get more out of VUBuddy, for free
- Unlimited downloads
- The explanation behind every MCQ answer
- Study offline on slow data
- 30 downloads a day instead of 3
- Sign in and buy Pro Semester here
One Pro Semester membership works in both the extension and the app.