Redirected
edited by
10,490 views
9 9 votes

Six files $\text{F1, F2, F3, F4, F5}$ and $\text{F6}$ have $100, 200, 50, 80, 120, 150$ records respectively. In what order should they be stored so as to optimize act. Assume each file is accessed with the same frequency

  1. $\text{F3, F4, F1, F5, F6, F2}$
  2. $\text{F2, F6, F5, F1, F4, F3}$
  3. $\text{F1, F2, F3, F4, F5, F6}$
  4. Ordering is immaterial as all files are accessed with the same frequency.

7 Answers

15 15 votes
This is basically optimal storage on tapes problem.Greedy apprach is used to solve this problem.The files are to be stored sequentially  on tape.To read a particular file we need to start from beginning of tape..here goal is to find such order of storage that cost to access file is minimum..in order to achieve the files are stored in increasing order of length

So in above eg files will be stored in order F3 F4 F1 F5 F6 F2
0 0 votes
I think Option A

Since each file is accessible with same frequency.
Answer:
Position:
Show:

Related questions

9 9 votes
3 answers 3 answers
5.3k
5.3k views
go_editor asked Jun 19, 2016
5,320 views
If a node has $K$ children in $B$ tree, then the node contains exactly _____ keys.$K^2$$K-1$$K+1$$\sqrt{K}$
3 3 votes
1 1 answer
4.9k
4.9k views
go_editor asked Jun 17, 2016
4,937 views
Consider the following schema:$\textsf{Emp (Empcode, Name, Sex, Salary, Deptt)}$A simple SQL query is executed as follows:SELECT Deptt FROM Emp GROUP by Dept Having avg (...
6 6 votes
4 4 answers
6.7k
6.7k views
go_editor asked Jun 17, 2016
6,713 views
Consider the following relational query on the above database:SELECT S.name FROM Suppliers S Where S.sid NOT IN (SELECT C.sid FROM Catalog C WHERE C.pid NOT IN (SELECT P....
10 10 votes
3 answers 3 answers
4.9k
4.9k views
go_editor asked Jun 17, 2016
4,890 views
Let $\text{R = (A, B, C, D, E, F)}$ be a relation scheme with the following dependencies $\text{C} \rightarrow \text{F, E} \rightarrow \text{A}, \text{EC} \rightarrow \te...