in Operating System edited by
6,503 views
4 votes
4 votes

Consider a system where each file is associated with a 16 bit number. For each file, each user should have the read and write capability. How much memory is needed to store each user's access data?

  1. 16 KB
  2. 32 KB
  3. 64 KB
  4. 128 KB
in Operating System edited by
by
6.5k views

2 Comments

moved by
i think need to know about total number of files and no. of users?
0
0
everybody is thinking only.. plz any1 tell the correct way...
0
0

3 Answers

11 votes
11 votes
I think answer is A .

Question is that how much memory is needed to store each user's access data so its only the memory reqd for read/write information  which is asked. For 2^16 files, there are 4 different combinations of read(R) write(W). Read, write, no read, no write.

So bits reqd for 1 file to store access info=2

Bits reqd for 2^16 files=(2^16)×2 bits=128Kb

Converting this bits into bytes we get 128Kb/(8bits/Byte)

=16KB
by
5 votes
5 votes
Files are associated with 16 bit number.

=> File ID ranges from 0000 0000 0000 0000 to 1111 1111 1111 1111.

=> Total File IDs possible = Total files possible = $2^{16}$

 

For each user, we need 2 bits. 1 bit for read (0 => can't read; 1 => can read)

and 1 bit for write (0=> can't write; 1 => can write)

 

So, $2^{16}*2bits$  =  $2^{16}*2/8bytes$  =  $2^{14} bytes$  =  $16KB$
4 votes
4 votes
i think answer will be a. plz post the answer if correct. total number of files by 16 bit number will be 2^16 and assuming 2 bit for read and write as permission can be no read no write no read but write .... so on 4 cases . 2 bit for that . and the user will have these 2 byte for all the files so 2^16*2=128Kbit

128/8=16kB

4 Comments

according to key answer is correct that is option (a)...
0
0
i missed the bit  . its asked in kB. so i missed the divide
0
0
@Tendua  I didn't understand this part "and the user will have these 2 byte for all the files" of your sentence. Can you please elaborate on this?
0
0
Answer:

Related questions