LSK2601 Assignment 2 Q&A
LSK2601 Assignment 2 Q&A In the case of reading from the disk, obviously the caller will have to be blocked (because there are no data for it). What about the case of writing to the disk? - ANSWER-When the process has requested for writing data to the disk, then it all depends on what happens after interrupt. If the calling process gains access back and writes more data, then only the fresh part is written, causing unusual loss. Need the caller be blocking awaiting completion of the disk transfer? - ANSWER-Since the system is maintaining a buffer fro the driver and after interrupt the buffer is written first and then the user data is appended. This means that the data stays secure. Thus, this is not possible. What does the purpose of a system call in an operating system? - ANSWER-How a program requests a service from an operating system's kernel. Condition for fork to fail - ANSWER-If there are no free slots left in the process table. Condition for exec to fail - ANSWER-If the file name given does not exist. Condition for unlink to fail - ANSWER-If the calling process does not have the authority to unlink it. Can the count = write (fd, buffer, nbytes); Call return any value in count other than nbytes? If so, why? - ANSWER-If the call fails, for example because fd is incorrect, it can return −1. It can also fail because the disk is full, and it is not possible to write the number of bytes requested. On a correct termination, it always returns nbytes. Suppose that a 10 MB file is stored on a disk on the same track (track # 50) in consecutive sectors. The disk arm is currently situated over track number 100. How long will it take to retrieve this file from the disk? Assume that moving the arm from one cylinder to the next takes about 1 ms and it takes about 5 ms for the sector where the beginning of the file is stored to rotate under the head. Also, assume that reading occurs at a rate of 100 MB/s. - ANSWER-Size of File = 10 MB...
Written for
- Institution
- APEA PRE PREDICTOR
- Course
- APEA PRE PREDICTOR
Document information
- Uploaded on
- July 15, 2025
- Number of pages
- 214
- Written in
- 2024/2025
- Type
- Exam (elaborations)
- Contains
- Questions & answers
Subjects
- lsk2601
- lsk2601 assignment 2 qa
-
in the case of reading from the disk obviously th