UGC NET
This post consists more than 60 questions from Operating System from previous years UGC NET papers. this will help you to understand the pattern of questions comes under this section. Generally 5 out 50 questions comes from Operating System. New syllabus issued by the NTA is given in this post. This post also highlight the questions from each years. Try to solve the questions.
Best of luck for your NTA UGC NET preparation.
Operating Systems (with Case Study of Unix ) :
Main functions of operating systems:
- Recourse allocation
- Process management
- Memory Management
- File Management
- Disk scheduling
Multiprogramming:
Technique of running several programs at a time using time sharing.
Multiprocessing:
Technique of running several programs at a time using time sharing and switching jobs occurs so frequently that user can interact with each program while it is running.
Memory Management:
This technique allow several processes to share memory
Virtual memory:
paging,
fragmentation.
Concurrent Processing :
Mutual exclusion.
Critical regions,
lock and unlock.
Scheduling :
CPU scheduling,
I / O scheduling,
Resource scheduling.
Deadlock and
scheduling algorithms.
Banker’s algorithm for deadlock handling.
UNIX :
- The Unix System :
- File system,
- process management,
- bourne shell,
- shell variables,
- command line programming.
Filters and Commands :
- pr: pr command is used to paginate or calumniate file for printing.
Syntax: pr [file name 1] [filename 2]
- head: head command displays the first few lines of a file.
Syntax: head [-n] file name
- tail: tail command displays the last few lines of a file.
Syntax: tail –n 10 filename : to view last 10 lines.
- cut: it is used to extract sections from each line of input usually from a file.
Syntax: cut –c 1-10 filename
- paste: it is used to join files horizontally.
Syntax: paste [options] file1…….
- sort: this command prints the line of its inputs of all files listed in its argument list in sorted order.
Sort filename
- uniq: it output the duplicate lines or add the number of occurrences of each line. It is used with sort command
e.g. sort filename|uniq –c|sort -n
- 8. tr ( translate): this command replace the occurrence of the characters in the first set with the corresponding elements from the other set.
e.g tr ‘xywz’ ‘abcd’ will replace x with a, y with b and so on.
- join : it merges the lines of two sorted text files based on the presence of a common field.
- grep: it is ‘generalized regular expression parser’. It searches for limited regular expressions.
- egrep: extended grep searches for full regular expressions.
- fgrep: Fixed string grep, searches for fixed strings
System Calls ( like ) :
Create,
open,
close,
read,
write,
iseek,
link,
unlink,
stat,
fstat,
umask,
chmod,
exec,
fork,
wait,
system
DEC 2015
Q1. A virtual memory has a page size of IK words. There are eight pages and four blocks. The associative memory page table contains the following entries:
Page | Block |
0 | 3 |
2 | 1 |
5 | 2 |
7 | 0 |
Which of the following list of virtual addresses (in decimal) will not cause any page fault if referenced by the CPU?
(1) 1024, 3072, 4096, 6144 (2) 1234, 4012, 5000, 6200
(3) 1020, 3012, 6120, 8100 (4) 2021, 4050, 5112, 7100
Q2. Which of the following list of virtual addresses (in decimal) will not cause any page fault if referenced by the CPU?
(1) 1024, 3072, 4096, 6144 (2) 1234, 4012, 5000, 6200
(3) 1020, 3012, 6120, 8100 (4) 2021, 4050, 5112, 7100
Q3. Suppose that the number of instructions executed between page fault is directly proportional to the number of page frames allocated to a program. If the available memory is doubled, the mean interval between page faults is also doubled. Further, consider that a normal instruction takes one microsecond, but if a page fault occurs, it takes 2001 microseconds. If a program takes 60 sec to run, during which time it gets 15,000 page faults, how long would it take to run if twice as much memory were available ?
(1) 60 sec (2) 30 sec (3) 45 sec (4) 10 sec
Q4. Consider a disk with 16384 bytes per track having a rotation time of 16 msec and average seek time of 40 msec. What is the time in msec to read a block of 1024 bytes from this disk?
(1) 57 msec (2) 49 msec (3) 48 msec (4) 17 msec
Q5. A system has four processes and five allocatable resources. The current allocation and maximum needs are as follows:
Allocated Maximum Available
ProcessA 10211 11213 00×11
ProcessB 20110 22210
ProcessC 11010 21310
ProcessD 11110 11221
The smallest value of x for which the above system in safe state is
(1) 1 (2) 3 (3) 2 (4) 0
Q6. In Unix, the login prompt can be changed by changing the contents of the file
(1) contrab (2) init (3) gettydefs (4) inittab
June 2015
Q7. A disk drive has 100 cyclinders, numbered 0 to 99. Disk requests come to the disk driver for cyclinders 12, 26, 24, 4, 42, 8 and 50 in that order. The driver is currently serving a request at cyclinder 24. A seek takes 6 msec per cyclinder moved. How much seek time is needed for shortest seek time first (SSTF) algorithm ?
(1) 0.984 sec (2) 0.396 sec (3) 0.738 sec (4) 0.42 sec
Q8. Let R and P be two processes, R be the set of variables read from memory, and W be the set of variables3 written to memory. For the concurrent execution of two processes P. and P which of the following conditions is not true ?
(1) R(Pi)nW(P) S 0 (2) W(Pi)nR(P) S 0
(3) R(Pi)nR(Pjj S 0 (4) W(P;) n W(r>) S O
Q9. A LRU page replacement is used with four page frames and eight pages. How many page faults will occur with the reference string 0172327103 if the four frames are initially empty ?
(1) 6 (2) 7 (3) 5 (4) 8
Q10. What does the following command do?
grep Pvn”abc”*
(1) It will print all of the lines in the file x that match the search string “abc”.
(2) It will print all of the lines in file x that do not match the search string “abc”.
(3) It will print the total number of lines in the file x that match the string “abc”.
(4) It will print the specific line numbers of the file x in which there is a match for string “abc”.
Q11. The Unix Kernel maintains two key data structures related to processes, the process table and the user structure. Which of the following information is not the part of user structure ?
(1) File descriptor table (2) System call state
(3) Scheduling parameters (4) Kernel stack
Dec 2014
Q12. Consider the following justifications for commonly using the two-level CPU scheduling :
I. It is used when memory is too small to hold all the ready processes.
II. Because its performance is same as that of the FIFO.
III. Because it facilitates putting some set of processes into memory and a choice is made from that.
IV. Because it does not allow to adjust the set of in-core processes.
Which of the following is true ?
(A) I, III and IV (B) I and II
(C) III and IV (D) I and III
Q13. A specific editor has 200 K of program text, 15 K of initial stack, 50 K of initialized data, and 70 K of bootstrap code. If five editors are started simultaneously, how much physical memory is needed if shared text is used ?
(A) 1135 K (B) 335 K
(C) 1065 K (D) 320 K
Q14. Which of the following conditions does not hold good for a solution to a critical section problem?
(A) No assumptions may be made about speeds or the number of CPUs.
(B) No two processes may be simultaneously inside their critical sections.
(C) Processes running outside its critical section may block other processes.
(D) Processes do not wait forever to enter its critical section.
Q15. For the implementation of a paging scheme, suppose the average process size be x bytes, the page size be y bytes, and each page entry requires z bytes. The optimum page size that minimizes the total overhead due to the page table and the internal fragmentation loss is given by
(A) x /2 (B) xz / 2
(C) √ 2xz (D) √ xz / 2
Q16. In a demand paging memory system, page table is held in registers. The time taken to service a page fault is 8 m.sec. if an empty frame is available or if the replaced page is not modified, and it takes 20 m.secs., if the replaced page is modified. What is the average access time to service a page fault assuming that the page to be replaced is modified 70% of the time ?
(A) 11.6 m.sec. (B) 16.4 m.sec.
(C) 28 m.sec. (D) 14 m.sec.
June 2014
Q17. In a paged memory management algorithm, the hit ratio is 70%. If it takes 30 nanoseconds to search Translation Look-aside Buffer (TLB) and 100 nanoseconds (ns) to access memory, the effective memory access time is
(A) 91 ns (B) 69 ns (C) 200 ns (D) 160 ns
Q18. Match the following
List -I List – II
a. Multilevel feedback queue i. Time-slicing
b. FCFS ii. Criteria to move processes between queues
c. Shortest process next iii. Batch processing
d. Round robin scheduling iv. Exponential smoothening
Codes
a b c d
(A) i iii ii iv
(B) iv iii ii i
(C) iii i iv ii
(D) ii iii iv i
Q19. Consider a system with five processes P0 through P4 and three resource types R1, R2 and R3. Resource type R, has 10 instances, R2 has 5 instances and R3 has 7 instances. Suppose that at time T0, the following snapshot of the system has been taken :
Allocation
R1 R2 R3
p0 0 1 0
p1 2 0 0
p2 3 0 2
p3 2 1 1
p4 0 2 2
Max
R1 R2 R3
7 5 3
3 2 2
9 0 2
2 2 2
4 3 3
Available
R1 R2 R3
3 3 2
Assume that now the process P1 requests one additional instance of type R1 and two instances of resource type R3. The state resulting after this allocation will be
(A) Ready”state (B) Safe state (C) Blocked state (D) Unsafe state
Q20. Match the following
List -1 List – II
a. Contiguous allocation i. This scheme supports very large file sizes.
b. Linked allocation ii. This allocation technique supports only sequential files.
c. Indexed allocation iii. Number of disks required to access file is minimal.
d. Multi- level indexed iv. This technique suffers from maximum wastage of space in storing pointers.
Codes:
a b c d
(A) iii iv ii i
(B) iii ii iv i
(C) i ii iv iii
(D) i iv ii iii
Q21. Which of the following commands will output “onetwothree” ?
(A) for val; do echo-n $val; done < one two three
(B) for one two three; do echo-n-; done
(C) for n in one two three; do echo-n $n; done
(D) for n in one two three {echo -n $n}
Dec 2013
Q22. Consider a preemptive priority based scheduling algorithm based on dynamically changing priority.
Larger priority number implies higher priority. When the process is waiting for CPU in the ready queue
(but not yet started execution), its priority changes at a rate a = 2. When it starts running, its priority changes at a rate b = 1. All the processes are assigned priority value 0 when they enter ready queue. Assume that the following processes want to execute :
Process Arrival Service
ID Time Time
PI 0 4
P2 1 1
P3 2 2
P4 3 1
The time quantum q = 1. When two processes want to join ready queue simultaneously, the process which has not executed recently is given priority. The finish time of processes PI, P2, P3 and P4 will respectively be
(A) 4, 5, 7 and 8
(B) 8, 2, 7 and 5
(C) 2, 5, 7 and 8
(D) 8, 2, 5 and 7
Q23. The virtual address generated by a CPU is 32 bits. The Translation Look-aside Buffer (TLB) can hold
total 64 page table entries and a 4-way set associative (i.e. with 4- cache lines in the set). The page size
is 4 KB. The minimum size of TLB tag is
(A) 12 bits
(B) 15 bits
(C) 16 bits
(D) 20 bits
Q24. Consider a disk queue with request for input/output to block on cylinders
98, 183, 37, 122, 14, 124, 65, 67
in that order. Assume that disk head is initially positioned at cylinder 53 and moving towards cylinder number 0. The total number of head movements using Shortest Seek Time First (SSTF) and SCAN algorithms are respectively
(A) 236 and 252 cylinders
(B) 640 and 236 cylinders
(C) 235 and 640 cylinders
(D) 235 and 252 cylinders
Q25. How much space will be required to store the bit map of a 1.3 GB disk with 512 bytes block size ?
(A) 332.8 KB
(B) 83.6 KB
(C) 266.2 KB
(D) 256.6 KB
Q26. Linux operating system uses
(A) Affinity Scheduling
(B) Fair Preemptive Scheduling
(C) Hand Shaking
(D) Highest Penalty Ratio Next
June 2013
Q27. A virtual memory based memory management algorithm partially swaps out a process. This is an example of
(A) short term scheduling
(B) long term scheduling
(C) medium term scheduling
(D) mutual exclusion
Q28. Assuming that the disk head IS located initially at 32, find the number of disk moves required with FCFS if the disk queue of I/O block requests are 98, 37, 14, 124,65,67 :
(A) 310
(B) 324
(C) 320
(D) 321
Q29. Let the page fault service time be 10 millisecond(ms) in a computer with average memory access time being 20 nanosecond(ns). If one page fault is generated for every 106 memory accesses, what is the effective access time for memory ?
(A) 21 ns
(B) 23 ns
(C) 30 ns
(D) 35 ns
Q30. Consider the following UNIX command:
sort temp; head -30 <temp; rm temp
Which of the following functions shall be performed by this command?
(A) Sort, taking the input from “temp”, prints 30 lines from temp and delete the file temp
(B) Sort the file “temp”, removes 30 lines from temp and delete the file temp
(C) Sort, taking the input from “in” and writing the output to “temp” then prints 30 lines from temp on terminal. Finally “temp” is removed.
(D) Sort, taking the input from “temp” and then prints 30 lines from “temp” on terminal. Finally “temp” is removed.
Q31. The mv command changes
(A) the inode
(B) the inode-number
Dec 2012
Q32. Given memory partitions of 100 K, 500 K, 200 K, 300 K and 600 K (in order) and processes of 212 K, 417 K, 112 K, and 426 K (in order), using the first-fit algorithm, in which partition would the process requiring 426 K be placed ?
(A) 500 K
(B) 200 K
(C) 300 K
(D) 600 K
Q33. What is the size of the Unicode character in Windows Operating System? ‘
(A) 8-Bits
(B) 16-Bits
(C) 32-Bits
(D) 64-Bits
Q34. Which of the following memory allocation scheme suffers from external fragmentation ?
(A) Segmentation
(B) Pure demand paging
(C) Swapping
(D) Paging
Q35. In UNIX, which of the following command is used to set the task priority ?
(A) init
(B) nice
(C) kill
(D) PS
June 2012
Q36. Pre-emptive scheduling is the strategy of temporarily suspending a running process
(A) before the CPU time slice expires
(B) to allow starving processes to run
(C) when it requests I/O
(D) to avoid collision
Q37. In round robin CPU scheduling as time quantum is increased the average turn around time
(A) increases
(B) decreases
(C) remains constant
(D) varies irregularly
Q38. Resources are allocated to the process on non-sharable basis is
(A) mutual exclusion
(B) hold and wait
(C) no pre-emption
(D) circular wait
Q39. Cached and interleaved memories are ways of speeding up memory access between CPU’s and slower RAM. Which memory models are best suited (i.e. improves the performance most) for which programs ?
(i) Cached memory is best suited for small loops.
(ii) Interleaved memory is best suited for small loops
(iii) Interleaved memory is best suited for large sequential code.
(iv) Cached memory is best suited for large sequential code.
(A) (i) and (ii) are true.
(B) (i) and (iii) are true.
(C) (iv) and (ii) are true.
(D) (iv) and (iii) are true.
Q40. Consider the following page trace:
4,3, 2, 1, 4, 3, 5, 4, 3, 2, 1, 5
Percentage of page fault that would occur if FIFO page replacement algorithm is used with number of frames for the JOB m = 4 will be
(A) 8
(B) 9
(C) 10
(D) 12
Hint: 4,3,2,1,5,4,3,2,1,5 Page faults
Dec 2011
Q41. Dijkestra banking algorithm in an operating system, solves the problem of
(A) deadlock avoidance
(B) deadlock recovery
(C) mutual exclusion
(D) context switching
Q42. The multiuser operating system, 20 requests are made to use a particular resource per hour, on an average the probability that no request are made in 45 minutes is
(A) e–15 (B)e–5 (C) 1 – e–5 (D) 1 – e–10
Q43. On receiving an interrupt from an I/O device, the CPU
(A) halts for predetermined time.
(B) branches off to the interrupt service routine after completion of the current instruction.
(C) branches off to the interrupt service routine immediately.
(D) hands over control of address bus and data bus to the interrupting device.
Q44. The maximum amount of information that is available in one portion of the disk access arm for a removal disk pack (without further movement of the arm with multiple heads)
(A) a plate of data
(B) a cylinder of data
(C) a track of data
(D) a block of data
Q45. Consider a logical address space of 8 pages of 1024 words mapped with memory of 32 frames. How many bits are there in the physical address ?
(A) 9 bits (B) 11 bits (C) 13 bits (D) 15 bits
June 2011
Q46. Virtual memory is
(A) related to virtual reality
(B) a form of ROM
(C) a form of RAM
(D) None of the above
Q47. Block or Buffer caches are used to
(A) improve disk performance
(B) handle interrupts
(C) increase the capacity of main memory
(D) speed up main memory Read operations
Q48. A file organization component VSAM file is
(A) Relative records data set
(B) Keyed sequential data set
(C) Entry sequential data set
(D) All of the above
Q49. A relationship between processes such that each has some part (critical section) which must not be executed while the critical section of another is being executed, is known as
(A) Semaphore
(B) Mutual exclusion
(C) Multiprogramming
(D) Message passing
Q50. How many states can a process be in ?
(A) 3 (B) 4 (C) 2 (D) 5
Q51. Which command allows you to view your file 24 lines at a time ?
(A) More (B) Cat (C) Pg (D) None of the above
Dec 2010
Q52. The dynamic allocation of storage areas with VSAM files is accomplished by
(A) Hashing
(B) Control splits
(C) Overflow areas
(D) Relative recoding
Q53. Which of the following command the file names in multiple columns ?
(A) IS – X
(B) IS
(C) IS – 1
(D) IS – f – X
Q54. WINDOWS is a _________ operating.
(A) Real time
(B) Multi-user
(C) Preemptive
(D) Non-preemptive
Q55. Page making process from main memory to disk is called
(A) Interruption
(B) Termination
(C) Swapping
(D) None of the above
Q56. A Dead-lock in an Operating System is
(A) Desirable process
(B) Undesirable process
(C) Definite waiting process
(D) All of the above
June 2010
Q57. Match the following :
(a) Disk scheduling 1. Round-robin
(b) Batch processing 2. SCAN
(c) Time sharing 3. LIFO
(d) Interrupt processing 4. FIFO
Codes :
(a) (b) (c) (d)
(A) 3 4 2 1
(B) 4 3 2 1
(C) 2 4 1 3
(D) 1 4 3 2
Q58. ________ synchronizes critical resources to prevent dead lock.
(A) P-operator (B) V-operator (C) Semaphore (D) Swapping
Q59. _______ is one of pre-emptive scheduling algorithm.
(A) RR (B) SSN (C) SSF (D) Priority based
Q60. In order to allow only one process to enter its critical section, binary semaphore are initialized to
(A) 0 (B) 1 (C) 2 (D) 3
Q61. Remote Computing Service involves the use of time sharing and _______.
(A) multi-processing
(B) interactive processing
(C) batch processing
(D) real-time processing
if you like the above post and my work , please comment . you can also give suggestions for improvement.
Education Jockey
educationjockey@gmail.com
Sir your r doing very good job…
I recommend this website to all my friends… Thank you