Wednesday, July 29, 2015

UNIX and OS Important material for UGC NET Computer Science Exam

1. The data structure used by UNIX to maintain file identification is
Ans.: inode
Explanation: Every file has a separate inode and unique inode number.

2. What does the command 'wc' perform in unix?

Ans.: It performs word count.
Side note: 'wc-c' counts number of characters in a file.
'wc-l' counts lines in a file.

3. What meant by redirection?

Ans.: It is used to direct the flow of data to the file or from the file for input or output of another file.


 4. Difference between absolute path and relative path
Ans.: Absolute path: Exact path from root directory.
Relative path: Relative to current path.



 5. How to make a new file system in unix?
Ans.: 'mkfs' command is used to create a new file system.


6. NICE command is used to

Ans.: Set priority of a process
(Range: 0-39)

7. Use of FINGER command is

Ans.: To display information about all the users logged in.

8. ps command shows

Ans.: The process status of all the process current;y running on the system.

9. Which command is used to restrict incoming message?
Ans.: 'mesg'

10. What is the work of 'diff' and 'grep' commands

Ans.: 'diff' It tells the changes to be made to make the file identical.
'grep' It is a pattern search command.



11. What is the difference between multiprocessing and multitasking?
Ans.: Multiprocessing means the capacity of an OS to use more than one CPU in a single computer system.
Multitasking is the simultaneous execution of more than one program by switching between those program.

12. What is meant by process spawning?
Ans.: When the operating system at the explicit request of another process creates a new process is called as process spawning.

13. What is a kernel in OS?
Ans.: It is heart or core or nucleus of an operating system which is stored permanently in main memory.

14. What is a binary semaphore?
Ans.: Binary semaphor15. What is the term thrashing means?
Ans.: It is a situation in virtual memory where the processor spends most of its time swapping pages, instead of executing instructions resulting due to inordinate number of page faults.

16. What is the difference between turnaround time and response time?
Ans.: The interval between the submission of a job and its completion is called turnaround time.
The interval between the submission of request and first response to that request.

17. What is mounting in OS?
Ans.: The technique of combining two different file systems together.

18. When can a deadlock occur?
Ans.: 1. Mutual exclusion: Only one process can hold a resource at any point of time.

2. Hold and wait: A process must hold a resource and wait for another resource.

3. No pre-emption: No resource can be removed from a process holding it.

4. Circular wait: A cycle of processes exist such that each process holds atleast one resource and waits for another resource.

Note: All the four conditions should satisfy to ensure a deadlock to occur.

Also called as Hoffman's conditions.


19. Techniques to avoid deadlock?
Ans.: Prevention
Avoidance
Recovery
Detection

20. What is compaction?
Ans.: The technique of merging together all the free locations of memory into a single large memory block.
This technique works only when relocation is dynamic in nature.
es are extensively used to implement mutual exclusion and synchronize concurrent processes.
They take only two possible values '0' and '1'.



No comments:

Post a Comment