Вы находитесь на странице: 1из 3

Mcq's ziada tr past files se ni thy.

1. Write semantic of TSL.

We can use these special instructions to solve the critical section problem. These
instructions are TestAndSet (also known as TestAndSetLock; TSL) and Swap. The
semantics of the TestAndSet instruction are as follows:
boolean TestAndSet(Boolean &target)
{
boolean rv=target;
target=true;
return rv;
}
Ans:

2.

3. Iski values change thi

4. Is disk I/O to swap space is generally faster than that to the file system? Give
reason in both cases.
Ans:

Disk I/O to swap space is generally faster than that to the file system. It is faster

because swap space is allocated in much larger blocks, and file lookups and indirect
allocation methods are not used. It is therefore possible for the system to gain better
paging throughput by copying an entire file image into the swap space at process startup,
and then performing demand paging from the swap space.

5.

6. From the following two solutions which one is better? Explain why?
Solution 1:
boolean flag[2];
int turn;
do
{
flag[i]=true;
turn=j;
while(flag[j] && turn==j);
critical section
flag[i]=false;
remainder section
} while(1)
Solution 2:
do
{
flag[i]=true;
while(flag[j]);
critical section
flag[i]=false;
remainder section

} while(1)
Ans: Page 101
7. Explain mount and mount point of the file system.
Ans: Mounting makes file systems, files, directories, devices, and special files
available
for use at a particular location. Mount point is the actual location from which the file
system is mounted and accessed. You can mount a file or directory if you have access to
the file or directory being mounted and write permission for the mount point
There are types of mounts:
Remote mount
Local mount

Вам также может понравиться