Question
stringlengths
39
1.33k
Tag
stringlengths
3
46
label
int64
0
206
Let R and S be relational schemes such that R a b c and S c Now consider the following queries on the database pi_ R S r pi_ R S left pi_ R S r imes s pi_ R S S r right left t mid t in pi_ R S r wedge forall u in s left exists v in r left u v S wedge t v left R S right right right right left t mid t in pi_ R S r wedge forall v in r left exists u in s left u v S wedge t v left R S right right right right Select R a R b From R S Where R c S c Which of the above queries are equivalent 1 and 2 1 and 3 2 and 4 3 and 4
Relational Calculus
159
Consider the relation employee name sex supervisorName with name as the key supervisorName gives the name of the supervisor of the employee under consideration What does the following Tuple Relational Calculus query produce left e name mid employee e wedge left forall x right left eg employee left x right vee x supervisorName eq e name vee x sex male right right Names of employees with a male supervisor Names of employees with no immediate male subordinates Names of employees with no immediate female subordinates Names of employees with a female supervisor
Relational Calculus
159
Consider the following relational schema Students rollno integer sname string Courses courseno integer cname string Registration rollno integer courseno integer percent real Which of the following queries are equivalent to this query in English u201cFind the distinct names of all students who score more than 90 in the course numbered 107 u201d SELECT DISTINCT S sname FROM Students as S Registration as R WHERE R rollno S rollno AND R courseno 107 AND R percent gt 90 u220f_ sname u03c3_ courseno 107 u2227 percent gt 90 Registration u22c8 Students left T mid u2203S in Students u2203R in Registration S rollno R rollno u2227 R courseno 107 u2227 R percent gt 90 u2227T sname S sname right left langle S_N rangle mid u2203S_R u2203R_P langle S_R S_N rangle u2208Students u2227 langle S_R 107 R_P rangle u2208Registration u2227 R_P gt 90 right I II III and IV I II and III only I II and IV only II III and IV only
Relational Calculus
159
The binary relation R 1 1 2 1 2 2 2 3 2 4 3 1 3 2 3 3 3 4 on the set A 1 2 3 4 is reflective symmetric and transitive neither reflective nor irreflexive but transitive irreflexive symmetric and transitive irreflexive and antisymmetric
Relations
160
Suppose A is a finite set with n elements The number of elements in the largest equivalence relation of A is a n b n 2 c 1 d n 1
Relations
160
Let R be a non empty relation on a collection of sets defined by _ A R_ B if and only if A cap B phi Then pick the true statement A is reflexive and transitive R is symmetric and not transitive R is an equivalence relation R is not reflexive and not symmetric
Relations
160
Let L be a set with a relation R which is transitive anti symmetric and reflexive and for any two elements a b in L let the least upper bound lub a b and the greatest lower bound glb a b exist Which of the following is are true L is a poset L is a Boolean algebra L is a lattice None of the above
Relations
160
Consider the following relations R1 a b iff a b is even over the set of integers R2 a b iff a b is odd over the set of integers R3 a b iff a b gt 0 over the set of non zero rational numbers R4 a b iff a b leq 2 over the set of natural numbers Which of the following statements is correct R1 and R2 are equivalence relations R3 and R4 are not R1 and R3 are equivalence relations R2 and R4 are not R1 and R4 are equivalence relations R2 and R3 are not R1 R2 R3 and R4 all are equivalence relations
Relations
160
Amongst the properties left ext reflexivity symmetry anti symmetry transitivity right the relation R x y in N 2 x eq y satisfies _________
Relations
160
A relation R is defined on the set of integers as xRy iff x y is even Which of the following statements is true R is not an equivalence relation R is an equivalence relation having 1 equivalence class R is an equivalence relation having 2 equivalence classes R is an equivalence relation having 3 equivalence classes
Relations
160
The number of equivalence relations of the set 1 2 3 4 is 15 16 24 4
Relations
160
The number of binary relations on a set with n elements is n 2 2 n 2 n 2 None of the above
Relations
160
Prove by induction that the expression for the number of diagonals in a polygon of n sides is frac n n 3 2 Let R be a binary relation on A a b c d e f g h represented by the following two component digraph Find the smallest integers m and n such that m lt n and R m R n
Relations
160
Mr X claims the following If a relation R is both symmetric and transitive then R is reflexive For this Mr X offers the following proof ldquo From xRy using symmetry we get yRx Now because R is transitive xRy and yRx together imply xRx Therefore R is reflexive rdquo Give an example of a relation R which is symmetric and transitive but not reflexive
Relations
160
Let R_1 and R_2 be two equivalence relations on a set Consider the following assertions R_1 cup R_2 is an equivalence relation R_1 cap R_2 is an equivalence relation Which of the following is correct Both assertions are true Assertions i is true but assertions ii is not true Assertions ii is true but assertions i is not true Neither i nor ii is true
Relations
160
Let R be a symmetric and transitive relation on a set A Then R is reflexive and hence an equivalence relation R is reflexive and hence a partial order R is reflexive and hence not an equivalence relation None of the above
Relations
160
Let R be a reflexive and transitive relation on a set A Define a new relation E on A as E a b mid a b in R ext and b a in R Prove that E is an equivalence relation on A Define a reason leq on the equivalence classes of E as E_1 leq E_2 if exists a b such that a in E_1 b in E_2 ext and a b in R Prove that leq is a partal order
Relations
160
Let F be the collection of all functions f 1 2 3 o 1 2 3 If f and g in F define an equivalence relation sim by f sim g if and only if f 3 g 3 Find the number of equivalence classes defined by sim Find the number of elements in each equivalence class
Relations
160
Two shared resources R1 and R2 are used by processes P1 and P2 Each process has a certain priority for accessing each resource Let Tij denote the priority of Pi for accessing Rj A process Pi can snatch a resource Rh from process Pj if Tik is greater than Tjk Given the following T11 gt T21 T12 gt T22 T11 lt T21 T12 lt T22 Which of the following conditions ensures that P1 and P2 can never deadlock I and IV II and III I and II None of the above
Resource Allocation
161
Two concurrent processes P1 and P2 want to use resources R1 and R2 in a mutually exclusive manner Initially R1 and R2 are free The programs executed by the two processes are given below Program for P1 Program for P2 S1 While R1 is busy do no op Q1 While R1 is busy do no op S2 Set R1 leftarrow busy Q2 Set R1 leftarrow busy S3 While R2 is busy do no op Q3 While R2 is busy do no op S4 Set R2 leftarrow busy Q4 Set R2 leftarrow busy S5 Use R1 and R2 Q5 Use R1 and R2 S6 Set R1 leftarrow free Q6 Set R2 leftarrow free S7 Set R2 leftarrow free Q7 Set R1 leftarrow free Is mutual exclusion guaranteed for R1 and R2 If not show a possible interleaving of the statements of P1 and P2 such mutual exclusion is violated i e both P1 and P2 use R1 and R2 at the same time Can deadlock occur in the above program If yes show a possible interleaving of the statements of P1 and P2 leading to deadlock Exchange the statements Q1 and Q3 and statements Q2 and Q4 Is mutual exclusion guaranteed now Can deadlock occur
Resource Allocation
161
Suppose n processes P_1 dots P_n share m identical resource units which can be reserved and released one at a time The maximum resource requirement of process P_i is s_i where s_i gt 0 Which one of the following is a sufficient condition for ensuring that deadlock does not occur forall i s_i lt m forall i s_i lt n Sigma_ i 1 n s_i lt m n Sigma_ i 1 n s_i lt m imes n
Resource Allocation
161
In a certain operating system deadlock prevention is attemped using the following scheme Each process is assigned a unique timestamp and is restarted with the same timestamp if killed Let Ph be the process holding a resource R Pr be a process requesting for the same resource R and T Ph and T Pr be their timestamps respectively The decision to wait or preempt one of the processes is based on the following algorithm if T Pr lt T Ph then kill Pr else wait Which one of the following is TRUE The scheme is deadlock free but not starvation free The scheme is not deadlock free but starvation free The scheme is neither deadlock free nor starvation free The scheme is both deadlock free and starvation free
Resource Allocation
161
Consider the resource allocation graph in the figure Find if the system is in a deadlock state Otherwise find a safe sequence
Resource Allocation
161
Consider the following snapshot of a system running n processes Process i is holding x_i instances of a resource R 1 leq i leq n Currently all instances of R are occupied Further for all i process i has placed a request for an additional y_i instances while holding the x_i instances it already has There are exactly two processes p and q and such that Y_p Y_q 0 Which one of the following can serve as a necessary condition to guarantee that the system is not approaching a deadlock min x_ p x_ q lt max_ k eq p q y_ k x_ p x_ q geq min_ k eq p q y_ k max x_ p x_ q gt 1 min x_ p x_ q gt 1
Resource Allocation
161
An operating system handles requests to resources as follows A process which asks for some resources uses them for some time and then exits the system is assigned a unique timestamp are when it starts The timestamps are monotonically increasing with time Let us denote the timestamp of a process P by TS P When a process P requests for a resource the OS does the following If no other process is currently holding the resource the OS awards the resource to P If some process Q with TS Q lt TS P is holding the resource the OS makes P wait for the resources If some process Q with TS Q gt TS P is holding the resource the OS restarts Q and awards the resources to P Restarting means taking back the resources held by a process killing it and starting it again with the same timestamp When a process releases a resource the process with the smallest timestamp if any amongst those waiting for the resource is awarded the resource Can a deadlock over arise If yes show how If not prove it Can a process P ever starve If yes show how If not prove it
Resource Allocation
161
An operating system contains 3 user processes each requiring 2 units of resource R The minimum number of units of R such that no deadlocks will ever arise is 3 5 4 6
Resource Allocation
161
A single processor system has three resource types X Y and Z which are shared by three processes There are 5 units of each resource type Consider the following scenario where the column alloc denotes the number of units of each resource type allocated to each process and the column request denotes the number of units of each resource type requested by a process in order to complete execution Which of these processes will finish LAST alloc request X Y Z X Y Z P0 1 2 1 1 0 3 P1 2 0 1 0 1 2 P2 2 2 1 1 2 0 P0 P1 P2 None of the above since the system is in a deadlock
Resource Allocation
161
A computer system uses the Banker u2019s Algorithm to deal with deadlocks Its current state is shown in the table below where P0 P1 P2 are processes and R0 R1 R2 are resources types Maximum Need Current Allocation Available R0 R1 R2 R0 R1 R2 R0 R1 R2 P0 4 1 2 P0 1 0 2 2 2 0 P1 1 5 1 P1 0 3 1 P2 1 2 3 P2 1 0 2 Show that the system can be in this state What will the system do on a request by process P0 for one unit of resource type R1
Resource Allocation
161
A computer has six tape drives with n processes competing for them Each process may need two drives What is the maximum value of n for the system to be deadlock free 6 5 4 3
Resource Allocation
161
02 Choose the correct alternatives more than one may be correct and write the corresponding letters only xi A computer system has 6 tape devices with n processes competing for them Each process may need 3 tape drives The maximum value of n for which the system is guaranteed to be deadlock free is 2 3 4 1
Resource Allocation
161
Consider the following proposed solution for the critical section problem There are n processes P_0 P_ n 1 In the code function ext pmax returns an integer not smaller than any of its arguments For all i t i is initialized to zero Code for P_i do c i 1 t i pmax t 0 t n 1 1 c i 0 for every j i in 0 n 1 while c j while t j 0 amp amp t j lt t i Critical Section t i 0 Remainder Section while true Which of the following is TRUE about the above solution At most one process can be in the critical section at any time The bounded wait condition is satisfied The progress condition is satisfied It cannot cause a deadlock
Resource Allocation
161
Consider a system having m resources of the same type These resources are shared by 3 processes A B and C which have peak demands of 3 4 and 6 respectively For what value of m deadlock will not occur 7 9 10 13 15
Resource Allocation
161
What is the minimum size of ROM required to store the complete truth table of an 8 bit imes 8 bit multiplier 32 K imes 16 bits 64 K imes 16 bits 16 K imes 32 bits 64 K x imes 32 bits
Rom
162
The amount of ROM needed to implement a 4 bit multiplier is 64 bits 128 bits 1 Kbits 2 Kbits
Rom
162
A ROM is used to store the table for multiplication of two 8 bit unsigned integers The size of ROM required is 256 u2a2f 16 64 K u2a2f 8 4 K u2a2f 16 64 K u2a2f 16
Rom
162
Two popular routing algorithms are Distance Vector DV and Link State LS routing Which of the following are true S1 Count to infinity is a problem only with DV and not LS routing S2 In LS the shortest path algorithm is run only at one node S3 In DV the shortest path algorithm is run only at one node S4 DV requires lesser number of network messages than LS S1 S2 and S4 only S1 S3 and S4 only S2 and S3 only S1 and S4 only
Routing
163
In a network of LANs connected by bridges packets are sent from one LAN to another through intermediate bridges Since more than one path may exist between two LANs packets may have to be routed through multiple bridges Why is the spanning tree algorithm used for bridge routing For shortest path routing between LANs For avoiding loops in the routing paths For fault tolerance For minimizing collisions
Routing
163
Consider the following statements about the routing protocols Routing Information Protocol RIP and Oprn Shortest Path First OSPF in an IPv4 network RIP uses distance vector routing RIP packets are sent using UDP OSPF packets are sent using TCP OSPF operation is based on link state routing Which of the above statements are CORRECT I and IV only I II and III only I II and IV only II III and IV only
Routing
163
Consider a simple graph with unit edge costs Each node in the graph represents a router Each node maintains a routing table indicating the next hop router to be used to relay a packet to its destination and the cost of the path to the destination through that router Initially the routing table is empty The routing table is synchronously updated as follows In each updation interval three tasks are performed A node determines whether its neighbours in the graph are accessible If so it sets the tentative cost to each accessible neighbour as 1 Otherwise the cost is set to u221e From each accessible neighbour it gets the costs to relay to other nodes via that neighbour as the next hop Each node updates its routing table based on the information received in the previous two steps by choosing the minimum cost For the graph given above possible routing tables for various nodes after they have stabilized are shown in the following options Identify the correct table Table for node A A B B 1 C C 1 D B 3 E C 3 F C 4 Table for node C A A 1 B B 1 C D D 1 E E 1 F E 3 Table for node B A A 1 B C C 1 D D 1 E C 2 F D 2 Table for node D A B 3 B B 1 C C 1 D E E 1 F F 1
Routing
163
Consider a simple graph with unit edge costs Each node in the graph represents a router Each node maintains a routing table indicating the next hop router to be used to relay a packet to its destination and the cost of the path to the destination through that router Initially the routing table is empty The routing table is synchronously updated as follows In each updation interval three tasks are performed A node determines whether its neighbours in the graph are accessible If so it sets the tentative cost to each accessible neighbour as 1 Otherwise the cost is set to u221e From each accessible neighbour it gets the costs to relay to other nodes via that neighbour as the next hop Each node updates its routing table based on the information received in the previous two steps by choosing the minimum cost Continuing from the earlier problem suppose at some time t when the costs have stabilized node A goes down The cost from node F to node A at time t 100 is gt 100 but finite infty 3 gt 3 and leq 100
Routing
163
An IP router implementing Classless Inter domain Routing CIDR receives a packet with address 131 23 151 76 The router s routing table has the following entries Prefix Output Interface Identifier 131 16 0 0 12 3 131 28 0 0 14 5 131 19 0 0 16 2 131 22 0 0 15 1 The identifier of the output interface on which this packet will be forwarded is ______
Routing
163
A group of 15 routers are interconnected in a centralized complete binary tree with a router at each tree node Router i communicates with router j by sending a message to the root of the tree The root then sends the message back down to router j The mean number of hops per message assuming all possible router pairs are equally likely is 3 4 26 4 53 5 26
Routing
163
In a RSA cryptosystem a participant A uses two prime numbers p 13 and q 17 to generate here public and private keys If the public key of A is 35 then the private key of A is __________
Rsa Security Networks
164
Consider a database that has the relation schemas EMP EmpId EmpName DeptId and DEPT DeptName DeptId Note that the DeptId can be permitted to be NULL in the relation EMP Consider the following queries on the database expressed in tuple relational calculus t exists u in EMP t EmpName u EmpName wedge forall v in DEPT t DeptId eq v DeptId t exists u in EMP t EmpName u EmpName wedge exists v in DEPT t DeptId eq v DeptId t exists u in EMP t EmpName u EmpName wedge exists v in DEPT t DeptId v DeptId Which of the above queries are safe I and II only I and III only II and III only I II and III
Safe Query
165
Consider a 128 imes 10 3 bits second satellite communication link with one way propagation delay of 150 milliseconds Selective retransmission repeat protocol is used on this link to send data with a frame size of 1 kilobyte Neglect the transmission time of acknowledgement The minimum number of bits required for the sequence number field to achieve 100 utilization is ________
Selective Repeat
166
The P and V operations on counting semaphores where s is a counting semaphore are defined as follows P s s s 1 If s lt 0 then wait V s s s 1 If s lt 0 then wake up process waiting on s Assume that P_b and V_b the wait and signal operations on binary semaphores are provided Two binary semaphores x_b and y_b are used to implement the semaphore operations P s and V s as follows P s P_b x_b ext s s 1 ext if s lt 0 ext V_b x_b ext P_b y_b ext else V_b x_b V s P_b x_b ext s s 1 ext if s lt 0 V_b y_b ext V_b x_b The initial values of x_b and y_b are respectively 0 and 0 0 and 1 1 and 0 1 and 1
Semaphore
167
Fill in the blanks Semaphore operations are atomic because they are implemented within the OS _________
Semaphore
167
Consider the blocked set semaphore where the signaling process awakens any one of the suspended process i e Wait S If S gt 0 then S leftarrow S 1 else suspend the execution of this process Signal S If there are processes that have been suspended on semaphore S then wake any one of them else S leftarrow S 1 Consider the following solution of mutual exclusion problem using blocked set semaphores s 1 cobegin P 1 P 2 P N coend Where the task body P i is begin while true do begin lt non critical section gt Wait S lt critical section gt Signal S end end Here N is the number of concurrent processors Which of the following is true The program fails to achieve mutual exclusion of critical regions The program achieves mutual exclusion but starvation freedom is ensured only for N leq 2 The program does not ensure mutual exclusion if N geq 3 The program achieves mutual exclusion but allows starvation for any N geq 2 The program achieves mutual exclusion and starvation freedom for any N geq 1
Semaphore
167
Consider a non negative counting semaphore S The operation P S decrements S and V S increments S During an execution 20 P S operations and 12 V S operations are issued in some order The largest initial value of S for which at least one P S operation will remain blocked is _______
Semaphore
167
The wait and signal operations of a monitor are implemented using semaphores as follows In the following x is a condition variable mutex is a semaphore initialized to 1 x_sem is a semaphore initialized to 0 x_count is the number of processes waiting on semaphore x_sem initially 0 next is a semaphore initialized to 0 next_count is the number of processes waiting on semaphore next initially 0 The body of each procedure that is visible outside the monitor is replaced with the following P mutex body of procedure if next_count gt 0 V next else V mutex Each occurrence of x wait is replaced with the following x_count x_count 1 if next_count gt 0 V next else V mutex E1 x_count x_count 1 Each occurrence of x signal is replaced with the following if x_count gt 0 next_count next_count 1 E2 P next next_count next_count 1 For correct implementation of the monitor statements E1 and E2 are respectively P x_sem V next V next P x_sem P next V x_sem P x_sem V x_sem
Semaphore
167
Choose the correct alternatives more than one may be correct and write the corresponding letters only At a particular time of computation the value of a counting semaphore is 7 Then 20 P operations and 15 V operations were completed on this semaphore The resulting value of the semaphore is 42 2 7 12
Semaphore
167
How many bytes of data can be sent in 15 seconds over a serial link with baud rate of 9600 in asynchronous mode with odd parity and two stop bits in the frame 10 000 bytes 12 000 bytes 15 000 bytes 27 000 bytes
Serial Communication
168
In serial communication employing 8 data bits a parity bit and 2 stop bits the minimum band rate required to sustain a transfer rate of 300 characters per second is 2400 band 19200 band 4800 band 1200 band
Serial Communication
168
The number of subsets left 1 2 dots n right with odd cardinality is ___________
Sets
169
The number of elements in the power set P S of the set S phi 1 2 3 is 2 4 8 None of the above
Sets
169
Out of a group of 21 persons 9 eat vegetables 10 eat fish and 7 eat eggs 5 persons eat all three How many persons eat at least two out of the three dishes
Sets
169
Let S be an infinite set and S_1 dots S_n be sets such that S_1 cup S_2 cup dots cup S_n S Then at least one of the set S_i is a finite set not more than one of the set S_i can be finite at least one of the sets S_i is an infinite not more than one of the sets S_i can be infinite None of the above
Sets
169
Let S be a set of n elements left 1 2 n right and G a graph with 2 n vertices each vertex corresponding to a distinct subset of S Two vertices are adjacent iff the symmetric difference of the corresponding sets has exactly 2 elements Note The symmetric difference of two sets R_ 1 and R_ 2 is defined as left R_ 1 setminus R_ 2 right cup left R_ 2 setminus R_ 1 right Every vertex in G has the same degree What is the degree of a vertex in G How many connected components does G have
Sets
169
Let P S denotes the power set of set S Which of the following is always true P P S P S P S u2229 P P S u00d8 P S u2229 S P S S u2209 P S
Sets
169
Let A be a set with n elements Let C be a collection of distinct subsets of A such that for any two subsets S_1 and S_2 in C either S_1 subset S_2 or S_2 subset S_1 What is the maximum cardinality of C n n 1 2 n 1 1 n
Sets
169
Let A be a finite set of size n The number of elements in the power set of A imes A is 2 2 n 2 n 2 2 n 2 2 2 n None of the above
Sets
169
Let A B and C be non empty sets and let X A B C and Y A C B C Which one of the following is TRUE X Y X u2282 Y Y u2282 X None of these
Sets
169
Let A and B be sets and let A c and B c denote the complements of the sets A and B The set A B cup B A cup A cap B is equal to A cup B A c cup B c A cap B A c cap B c
Sets
169
In a class of 200 students 125 students have taken Programming Language course 85 students have taken Data Structures course 65 students have taken Computer Organization course 50 students have taken both Programming Language and Data Structures 35 students have taken both Data Structures and Computer Organization 30 students have taken both Data Structures and Computer Organization 15 students have taken all the three courses How many students have not taken any of the three courses 15 20 25 30
Sets
169
Give a relational algebra expression using only the minimum number of operators from u222a u2212 which is equivalent to R u2229 S
Sets
169
Every subset of a countable set is countable State whether the above statement is true or false with reason
Sets
169
Consider the following statements S1 There exists infinite sets A B C such that A cap B cup C is finite S2 There exists two irrational numbers x and y such that x y is rational Which of the following is true about S1 and S2 Only S1 is correct Only S2 is correct Both S1 and S2 are correct None of S1 and S2 is correct
Sets
169
The below figure shows four D type flip flops connnected as a shift register using an XOR gate The initial state and three subsequent states for three clock pulses are also given State Q_ A Q_ B Q_ C Q_ D Initial 1 1 1 1 After the first clock 0 1 1 1 After the second clock 0 0 1 1 After the third clock 0 0 0 1 The state Q_ A Q_ B Q_ C Q_ D after the fourth clock pulse is 0000 1111 1001 1000
Shift Registers
170
The maximum window size for data transmission using the selective reject protocol with n ext bit frame sequence numbers is 2 n 2 n 1 2 n 1 2 n 2
Sliding Window
171
The distance between two stations M and N is L kilometers All frames are K bits long The propagation delay per kilometer is t seconds Let R bits second be the channel capacity Assuming that the processing delay is negligible the ext minimum number of bits for the sequence number field in a frame for maximum utilization when the ext sliding window protocol is used is lceil log_2 frac 2LtR 2K K rceil lceil log_2 frac 2LtR K rceil lceil log_2 frac 2LtR K K rceil lceil log_2 frac 2LtR 2K 2K rceil
Sliding Window
171
Suppose that the maximum transmit window size for a TCP connection is 12000 bytes Each packet consists of 2000 bytes At some point of time the connection is in slow start phase with a current transmit window of 4000 bytes Subsequently the transmitter receives two acknowledgements Assume that no packets are lost and there are no time outs What is the maximum possible value of the current transmit window 4000 bytes 8000 bytes 10000 bytes 12000 bytes
Sliding Window
171
Suppose that it takes 1 unit of time to transmit a packet of fixed size on a communication link The link layer uses a window flow control protocol with a window size of N packets Each packet causes an ack or a nak to be generated by the receiver and ack nak transmission times are negligible Further the round trip time on the link is equal to N units Consider time i gt N If only acks have been received till time i no naks then the goodput evaluated at the transmitter at time i in packets per unit time is 1 dfrac N i dfrac i N i 1 1 e left frac i N right
Sliding Window
171
Station A uses 32 byte packets to transmit messages to Station B using a sliding window protocol The round trip delay between A and B is 80 milliseconds and the bottleneck bandwidth on the path between A and B is 128 kbps What is the optimal window size that A should use 20 40 160 320
Sliding Window
171
Station A needs to send a message consisting of 9 packets to Station B using a sliding window window size 3 and go back n error control strategy All packets are ready and immediately available for transmission If every 5th packet that A transmits gets lost but no acks from B ever get lost then what is the number of packets that A will transmit for sending the message to B 12 14 16 18
Sliding Window
171
In a sliding window ARQ scheme the transmitter s window size is N and the receiver s window size is M The minimum number of distinct sequence numbers required to ensure correct operation of the ARQ scheme is min M N max M N M N MN
Sliding Window
171
Host A is sending data to host B over a full duplex link A and B are using the sliding window protocol for flow control The send and receive window sizes are 5 packets each Data packets sent only from A to B are all 1000 bytes long and the transmission time for such a packet is 50 u03bcs Acknowledgement packets sent only from B to A are very small and require negligible transmission time The propagation delay over the link is 200 mu s What is the maximum achievable throughput in this communication 7 69 imes 10 6 Bps 11 11 imes 10 6 Bps 12 33 imes 10 6 Bps 15 00 imes 10 6 Bps
Sliding Window
171
Frames of 1000 ext bits are sent over a 10 6 bps duplex link between two hosts The propagation time is 25ms Frames are to be transmitted into this link to maximally pack them in transit within the link Let I be the minimum number of bits I that will be required to represent the sequence numbers distinctly assuming that no time gap needs to be given between transmission of two frames Suppose that the sliding window protocol is used with the sender window size of 2 I where I is the numbers of bits as mentioned earlier and acknowledgements are always piggy backed After sending 2 I frames what is the minimum time the sender will have to wait before starting transmission of the next frame Identify the closest choice ignoring the frame processing time 16ms 18ms 20ms 22ms
Sliding Window
171
Consider a selective repeat sliding window protocol that uses a frame size of 1 KB to send data on a 1 5 Mbps link with a one way latency of 50 msec To achieve a link utilization of 60 the minimum number of bits required to represent the sequence number field is ________
Sliding Window
171
Consider a network connecting two systems located 8000 kilometers apart The bandwidth of the network is 500 imes 10 6 bits per second The propagation speed of the media is 4 imes 10 6 meters per second It is need to design a Go Back N sliding window protocol for this network The average packet size is 10 7 bits The network is to be used to its full capacity Assume that processing delays at nodes are negligible Then the minimum size in bits of the sequence number field has to be ______
Sliding Window
171
A 20 Kbps satellite link has a propagation delay of 400 ms The transmitter employs the go back n ARQ scheme with n set to 10 Assuming that each frame is 100 bytes long what is the maximum data rate possible 5 Kbps 10 Kbps 15 Kbps 20 Kbps
Sliding Window
171
A 1Mbps satellite link connects two ground stations The altitude of the satellite is 36 504 km and speed of the signal is 3 u00d7 108 m s What should be the packet size for a channel utilization of 25 for a satellite link using go back 127 sliding window proto u00adcol Assume that the acknowledgment packets are negligible in size and that there are no errors during communication 120 bytes 60 bytes 240 bytes 90 bytes
Sliding Window
171
Frames of 1000 bits are sent over a 10 6 bps duplex link between two hosts The propagation time is 25ms Frames are to be transmitted into this link to maximally pack them in transit within the link What is the minimum number of bits I that will be required to represent the sequence numbers distinctly Assume that no time gap needs to be given between transmission of two frames I 2 I 3 I 4 I 5
Sliding Window
171
A client process P needs to make a TCP connection to a server process S Consider the following situation the server process S executes a ext socket a ext bind and a ext listen system call in that order following which it is preempted Subsequently the client process P executes a ext socket system call followed by ext connect system call to connect to the server process S The server process has not executed any ext accept system call Which one of the following events could take place ext connect system call returns successfully ext connect system call blocks ext connect system call returns an error ext connect system call results in a core dump
Sockets
172
Identify the correct order in which a server process must invoke the function calls accept bind listen and recv according to UNIX socket API listen accept bind recv bind listen accept recv bind accept listen recv accept listen bind recv
Sockets
172
The employee information in a company is stored in the relation Employee name sex salary deptName Consider the following SQL query Select deptName From Employee Where sex u2018M u2019 Group by deptName Having avg salary gt select avg salary from Employee It returns the names of the department in which the average salary is more than the average salary in the company the average salary of male employees is more than the average salary of all male employees in the company the average salary of male male employees is more than the average salary of employees in same the department the average salary of male employees is more than the average salary in the company
Sql
173
Suppose a database consist of the following relations SUPPLIER SCODE SNAME CITY PART PCODE PNAME PDESC CITY PROJECTS PRCODE PRNAME PRCITY SPPR SCODE PCODE PRCODE QTY Write SQL programs corresponding to the following queries Print PCODE values for parts supplied to any project in DEHLI by a supplier in DELHI Print all triples lt CITY PCODE CITY gt such that a supplier in first city supplies the specified part to a project in the second city but do not print the triples in which the two CITY values are same
Sql
173
In SQL relations can contain null values and comparisons with null values are treated as unknown Suppose all comparisons with a null value are treated as false Which of the following pairs is not equivalent x 5 quad not not x 5 x 5 quad x gt 4 and x lt 6 where x is an integer x u2260 5 quad not x 5 none of the above
Sql
173
In an inventory management system implemented at a trading corporation there are several tables designed to hold all the information Amongst these the following two tables hold information on which items are supplied by which suppliers and which warehouse keeps which items along with the stock level of these items Supply supplierid itemcode Inventory itemcode warehouse stocklevel For a specific information required by the management following SQL query has been written Select distinct STMP supplierid From Supply as STMP Where not unique Select ITMP supplierid From Inventory Supply as ITMP Where STMP supplierid ITMP supplierid And ITMP itemcode Inventory itemcode And Inventory warehouse Nagpur For the warehouse at Nagpur this query will find all suppliers who do not supply any item supply exactly one item supply one or more items supply two or more items
Sql
173
Given relations r w x and s y z the result of select distinct w x from r s is guaranteed to be same as r provided r has no duplicates and s is non empty r and s have no duplicates s has no duplicates and r is non empty r and s have the same number of tuples
Sql
173
Consider two tables in a relational database with columns and rows as follows Table Student Roll_no Name Dept_id 1 ABC 1 2 DEF 1 3 GHI 2 4 JKL 3 Table Department Dept_id Dept_name 1 A 2 B 3 C Roll_no is the primary key of the Student table Dept_id is the primary key of the Department table and Student Dept_id is a foreign key from Department Dept_id What will happen if we try to execute the following two SQL statements update Student set Dept_id Null where Roll_on 1 update Department set Dept_id Null where Dept_id 1 Both i and ii will fail i will fail but ii will succeed i will succeed but ii will fail Both i and ii will succeed
Sql
173
Consider the set of relations shown below and the SQL query that follows Students Roll_number Name Date_of_birth Courses Course_number Course_name Instructor Grades Roll_number Course_number Grade Select distinct Name from Students Courses Grades where Students Roll_number Grades Roll_number and Courses Instructor Korth and Courses Course_number Grades Course_number and Grades Grade A Which of the following sets is computed by the above query Names of students who have got an A grade in all courses taught by Korth Names of students who have got an A grade in all courses Names of students who have got an A grade in at least one of the courses taught by Korth None of the above
Sql
173
Consider the set of relations EMP Employee no Dept no Employee name Salary DEPT Dept no Dept name Location Write an SQL query to Find all employees names who work in departments located at u2018Calcutta u2019 and whose salary is greater than Rs 50 000
Sql
173
Consider the following relational database employees eno ename address basic salary projects pno pname nos of staffs allotted working pno eno pjob The queries regarding data in the above database are formulated below in SQL Describe in ENGLISH sentences the two queries that have been posted SELECT ename FROM employees WHERE eno IN SELECT eno FROM working GROUP BY eno HAVING COUNT SELECT COUNT FROM projects SELECT pname FROM projects WHERE pno IN SELECT pno FROM projects MINUS SELECT DISTINCT pno FROM working
Sql
173
Consider a relation geq which represents greater than or equal to that is x y in geq only if y geq x create table geq ib integer not null ub integer not null primary key ib foreign key ub references geq on delete cascade Which of the following is possible if tuple x y is deleted A tuple z w with z gt y is deleted A tuple z w with z gt x is deleted A tuple z w with w lt x is deleted The deletion of x y is prohibited
Sql
173
Consider a relation examinee regno name score where regno is the primary key to score is a real number Write a relational algebra using Pi sigma rho imes to find the list of names which appear more than once in examinee
Sql
173
A table T1 in a relational database has the following rows and columns roll no marks 1 10 2 20 3 30 4 Null The following sequence of SQL statements was successfully executed on table T1 Update T1 set marks marks 5 Select avg marks from T1 What is the output of the select statement 18 75 20 25 Null
Sql
173
A relational database contains two tables student and department in which student table has columns roll_no name and dept_id and department table has columns dept_id and dept_name The following insert statements were executed successfully to populate the empty tables Insert into department values 1 Mathematics Insert into department values 2 Physics Insert into student values l Navin 1 Insert into student values 2 Mukesh 2 Insert into student values 3 Gita 1 How many rows and columns will be retrieved by the following SQL statement Select from student department 0 row and 4 columns 3 rows and 4 columns 3 rows and 5 columns 6 rows and 5 columns
Sql
173
The relation book title price contains the titles and prices of different books Assuming that no two books have the same price what does the following SQL query list select title from book as B where select count from book as T where T price gt B price lt 5 Titles of the four most expensive books Title of the fifth most inexpensive book Title of the fifth most expensive book Titles of the five most expensive books
Sql
173
The result evaluating the postfix expression 10 5 60 6 8 is 284 213 142 71
Stack
174
The postfix expression for the infix expression A B C D F D E is AB CD F D E ABCD F DE A B CD F DE A BCD F DE
Stack
174