Showing posts with label Operating System. Show all posts
Showing posts with label Operating System. Show all posts

Why is operating system a mandatory software?

Why is operating system a mandatory software?


There are different hardwares. Many more hardwares are about to come. Its not possible for each hardware to support each type of software. But the possible things is there should be an universal software which should be adopted by each and every hardware.

And that universally adopted software is operating system.
Share:

Net 50

CBSE NET JUNE 2015 Paper II

Q. A disk drive has 100 cylinders,numbered 0 to 99. Disk request come to the disk driver for cylinders 12,26,24,4,42,8,50 in that order. The driver is currently serving a request at cylinder 24. A seek takes 6msec per cylinder moved. How much seek time is needed for the shortest seek time first (sstf) algorithm?

A)0.984 sec         
B)0.396 sec         
C)0.738 sec                 
D)0.42 sec

Ans: (D)


Explanation:
SSTF, Shortest time first algorithm
Total cylinder head movements= 02+14+04+04+38+08=70.
Seek time needed=70 x 6 = 420=0.42 sec.
Share:

Net 49

CBSE NET

Q. 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.
A) 6              
B) 7                      
C) 5                    
D) 8.

Ans: (B)

Explanation: LRU (Least recently used) algorithm. Here, F shows page faults and H shows page hits.
   
0
1
7
2
3
2
7
1
0
3
0
0
0
0
3
3
3
3
0
0

1
1
1
1
1
1
1
1
1


7
7
7
7
7
7
7
7



2
2
2
2
2
2
3
F
F
F
F
F
H
H
H
F
F

Share:

Net 48

CBSE NET

Q. Consider an array A[20, 10], assume 4 words per memory cell and the base address of array A is 100. What is the address of A[11, 5] ? Assume row major storage.

(A) 560
(B) 565
(C) 570
(D) 575

Ans: (A)

Explanation:
Formula for calculating address of element in row major and column major order is as shown in below image.
 

Where,
B=Base address, w=element size, Nc=number of column, Nr=number of row, Lc=column lower bound, Lr=row lower bound.

Using formula of row major,

Address of (11,5) = 100+4(10(11-0)+(5-0))= 100+4(115)=560.
Share:

Net 46

CBSE NET

Q. 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

Ans: (B)

Explanation: Let number of page faults be 100. In which 30 page faults are without modification so time is 30x8=240 m.sec. And rest 70 page faults are with modification so time is  20x70=1400 m.sec.

Average access time of servicing a page fault is (240+1400)/100=28 m.sec.
Share:

Net 44

CBSE NET JUNE 2012 PAPER II


Q. 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


Ans: (C)


Explanation: F shows page fault using FIFO  page replacement algorithm.
In FIFO algorithm we see the elements which enter first in the memory, have to out first.

4
3
2
1
4
3
5
4
3
2
1
5
4
4
4
4
4
4
5
5
5
5
1
1
3
3
3
3
3
3
4
4
4
4
5
2
2
2
2
2
2
3
3
3
3
1
1
1
1
1
1
2
2
2
F
F
F
F
H
H
F
F
F
F
F
F
Share: