Login
Register
Dark Mode
Brightness
Profile
Edit Profile
Messages
My favorites
My Updates
Logout
Filter
Profile
Wall
Recent activity
All questions
All answers
Exams Taken
All Blogs
Recent activity by dd
8
answers
1
GATE IT 2005 | Question: 32
An unbiased coin is tossed repeatedly until the outcome of two successive tosses is the same. Assuming that the trials are independent, the expected number of tosses is $3$ $4$ $5$ $6$
An unbiased coin is tossed repeatedly until the outcome of two successive tosses is the same. Assuming that the trials are independent, the expected number of tosses is$3...
33.1k
views
commented
Feb 6
Probability
gateit-2005
probability
binomial-distribution
expectation
normal
+
–
9
answers
2
GATE CSE 2017 Set 1 | Question: 25
Consider a two-level cache hierarchy with $L1$ and $L2$ caches. An application incurs $1.4$ memory accesses per instruction on average. For this application, the miss rate of $L1$ cache is $0.1$; the $L2$ cache experiences, on average, $7$ misses per $1000$ instructions. The miss rate of $L2$ expressed correct to two decimal places is ________.
Consider a two-level cache hierarchy with $L1$ and $L2$ caches. An application incurs $1.4$ memory accesses per instruction on average. For this application, the miss rat...
24.4k
views
answer edited
Nov 22, 2023
CO and Architecture
gatecse-2017-set1
co-and-architecture
cache-memory
numerical-answers
+
–
1
answer
3
Synchronization problem on single processor cpu
Consider the following multi threaded code. volatile static int flag1= 0, flag2= 0; // code for thread 1 (or T1) flag1 = 1; if (flag2==0) code1(); // end of code for T1 // code for thread 2 (or T2) flag2 = 1; if ( ... (). no method is invoked. both methods cannot be invoked! Also, what will be the answer if we remove the volatile type from the flags.
Consider the following multi threaded code.volatile static int flag1= 0, flag2= 0; // code for thread 1 (or T1) flag1 = 1; if (flag2==0) code1(); // end of code for T1 //...
379
views
edited
May 14, 2023
Operating System
operating-system
co-and-architecture
process-synchronization
+
–
7
answers
4
GATE CSE 2016 Set 1 | Question: 50
Consider the following proposed solution for the critical section problem. There are $n$ processes : $P_0....P_{n-1}$. In the code, function $\text{pmax}$ ... in the critical section at any time The bounded wait condition is satisfied The progress condition is satisfied It cannot cause a deadlock
Consider the following proposed solution for the critical section problem. There are $n$ processes : $P_0....P_{n-1}$. In the code, function $\text{pmax}$ returns an inte...
47.7k
views
answer edited
Sep 11, 2022
Operating System
gatecse-2016-set1
operating-system
process-synchronization
difficult
ambiguous
+
–
2
answers
5
Made Easy CA pipeline q2
A 5-stage pipeline is used to overlap all the instructions except the branch instructions. The target of the branch can't be fetched till the current instruction is completed. What is the throughout of the system if 20% of instructions are branch instructions ignore the ... of 4 cycles. A.55 MIPS B.45 MIPS C. 65 MIPS D. None of these. (explain the solution as well)
A 5-stage pipeline is used to overlap all the instructions except the branch instructions. The target of the branch can't be fetched till the current instruction is compl...
3.1k
views
answer edited
Jul 10, 2022
CO and Architecture
co-and-architecture
pipelining
clock-frequency
+
–
1
answer
6
Self Doubt
Give a combinatorial argument to establish the identity below for any nonnegative integer n: $\sum_{k=0}^{n} k\binom{n}{k}=n\ast 2^{n-1}$
Give a combinatorial argument to establish the identity below for any nonnegative integer n:$\sum_{k=0}^{n} k\binom{n}{k}=n\ast 2^{n-1}$
198
views
answered
Mar 15, 2022
3
answers
7
Exam queries
Is it necessary to solve question which is in standard book :- ie(exercise question) Or only pyqs solving is sufficient??
Is it necessary to solve question which is in standard book :- ie(exercise question) Or only pyqs solving is sufficient??
2.4k
views
answered
Feb 14, 2022
1
answer
8
Time complexity calculation
A complete binary tree is a binary tree whose all levels except the last level are completely filled and all the leaves in the last level are all to the left side. for example: Now, assume that, each of the nodes in this tree is represented by a structure struct node { ... R = R->right; } if(Lcnt == Rcnt) return 0; return func(root->left) + func(root->right); }
A complete binary tree is a binary tree whose all levels except the last level are completely filled and all the leaves in the last level are all to the left side.for exa...
1.3k
views
commented
Feb 12, 2022
Algorithms
algorithms
time-complexity
recursion
+
–
11
answers
9
GATE CSE 2021 Set 2 | Question: 10
Consider the following $\text{ANSI C}$ program. #include <stdio.h> int main() { int arr[4][5]; int i, j; for (i=0; i<4; i++) { for (j=0; j<5; j++) { arr[i][j] = 10 * i + j; } } printf(“%d”, *(arr[1]+9)); return 0; } What is the output of the above program? $14$ $20$ $24$ $30$
Consider the following $\text{ANSI C}$ program.#include <stdio.h int main() { int arr[4][5]; int i, j; for (i=0; i<4; i++) { for (j=0; j<5; j++) { arr[i...
30.3k
views
commented
Mar 27, 2021
Programming in C
gatecse-2021-set2
programming-in-c
array
output
1-mark
+
–
2
answers
10
Algorithm || Minimum comparison sorting
The lower bound on the no. of comparisons required to sort n numbers is __________ ?
The lower bound on the no. of comparisons required to sort n numbers is __________ ?
3.6k
views
commented
Mar 25, 2021
Algorithms
algorithms
sorting
+
–
2
answers
11
ISI 2004 MIII
The inequality $\frac{2-gx+x^{2}}{1-x+x^{2}}\leq 3$ is true for all the value of $x$ if and only if $1\leq g\leq 7$ $-1\leq g\leq 1$ $-6\leq g\leq 7$ $-1\leq g\leq 7$
The inequality $\frac{2-gx+x^{2}}{1-x+x^{2}}\leq 3$ is true for all the value of $x$ if and only if$1\leq g\leq 7$$-1\leq g\leq 1$$-6\leq g\leq 7$$-1\leq g\leq 7$
944
views
commented
Mar 15, 2021
Set Theory & Algebra
isi2004
inequality
+
–
6
answers
12
GATE CSE 2021 Set 2 | Question: 1
Let $G$ be a connected undirected weighted graph. Consider the following two statements. $S_1$: There exists a minimum weight edge in $G$ which is present in every minimum spanning tree of $G$. $S_2$: If every edge in $G$ has distinct weight, then $G$ has a ... are true $S_1$ is true and $S_2$ is false $S_1$ is false and $S_2$ is true Both $S_1$ and $S_2$ are false
Let $G$ be a connected undirected weighted graph. Consider the following two statements.$S_1$: There exists a minimum weight edge in $G$ which is present in every minimum...
11.9k
views
commented
Feb 23, 2021
Algorithms
gatecse-2021-set2
algorithms
graph-algorithms
minimum-spanning-tree
1-mark
+
–
6
answers
13
GATE IT 2006 | Question: 49
Which one of the choices given below would be printed when the following program is executed ? #include <stdio.h> struct test { int i; char *c; }st[] = {5, "become", 4, "better", 6, "jungle", 8, "ancestor", 7, " ... $\text{etter, u, 6, ungle}$ $\text{cetter, k, 6, jungle}$ $\text{etter, u, 8, ncestor}$
Which one of the choices given below would be printed when the following program is executed ?#include <stdio.h struct test { int i; char *c; }st[] = {5, "become", 4, "be...
27.2k
views
answer edited
Nov 7, 2020
Programming in C
gateit-2006
programming
programming-in-c
normal
structure
+
–
11
answers
14
GATE CSE 2017 Set 1 | Question: 08
Consider the C code fragment given below. typedef struct node { int data; node* next; } node; void join(node* m, node* n) { node* p = n; while(p->next != NULL) { p = p->next; } p->next = m; } Assuming that m and n ... append list m to the end of list n. cause a null pointer dereference for all inputs. append list n to the end of list m for all inputs.
Consider the C code fragment given below.typedef struct node { int data; node* next; } node; void join(node* m, node* n) { node* p = n; while(p->next != NULL) { p = p->ne...
25.8k
views
answer edited
Oct 31, 2020
DS
gatecse-2017-set1
data-structures
linked-list
normal
+
–
1
answer
15
Counting number of pairs whose sum is less than k
How many pairs $(x,y)$ such that $x+y <= k$, where x y and k are integers and $x,y>=0, k > 0$. Solve by summation rules. Solve by combinatorial argument.
How many pairs $(x,y)$ such that $x+y <= k$, where x y and k are integers and $x,y>=0, k 0$.Solve by summation rules.Solve by combinatorial argument.
1.2k
views
asked
Jun 8, 2020
Combinatory
combinatory
summation
descriptive
+
–
1
answer
16
Kenneth Rosen Edition 7 Exercise 8.1 Question 10 (Page No. 511)
Find a recurrence relation for the number of bit strings of length $n$ that contain the string $01$. What are the initial conditions? How many bit strings of length seven contain the string $01?$
Find a recurrence relation for the number of bit strings of length $n$ that contain the string $01$.What are the initial conditions?How many bit strings of length seven c...
398
views
answered
May 2, 2020
Combinatory
kenneth-rosen
discrete-mathematics
counting
descriptive
+
–
1
answer
17
Data communication and networking by forouzan 12.7 Exercise Qn 16
16. In a CDMA/CD network with a data rate of 10 Mbps, the maximum distance between any station pair is found to be 2500 m for the correct operation of the collision detection process. What should be the maximum distance if we increase the data rate to 100 Mbps? To 1 Gbps? To 10 Gbps?
16. In a CDMA/CD network with a data rate of 10 Mbps, the maximum distance between any station pair is found to be 2500 m for the correct operation of the collision detec...
7.9k
views
answer edited
Nov 12, 2019
Computer Networks
computer-networks
pure-aloha
slotted-aloha
+
–
5
answers
18
GATE CSE 2005 | Question: 81b
double foo(int n) { int i; double sum; if(n == 0) { return 1.0; } else { sum = 0.0; for(i = 0; i < n; i++) { sum += foo(i); } return sum; } } Suppose we modify the above function $foo()$ ... time complexity for function $foo()$ is significantly reduced. The space complexity of the modified function would be: $O(1)$ $O(n)$ $O(n^2)$ $n!$
double foo(int n) { int i; double sum; if(n == 0) { return 1.0; } else { sum = 0.0; for(i = 0; i < n; i++) { sum += foo(i); } return sum; } }Suppose we modify the above f...
11.0k
views
commented
Oct 15, 2019
Programming in C
gatecse-2005
programming
recursion
normal
+
–
1
answer
19
ISRO 2015- probability [Mech]
The probability that a teacher will give an unannounced test during any class is 1/5. If a student is absent twice, then probability that misses at least one test is (a) 24/25 (b) 16/25 (c) 7/25 (d) 9/25
The probability that a teacher will give an unannounced test during any class is 1/5. If a student is absent twice, then probability that misses at least one test is(a) 2...
688
views
answer selected
Mar 9, 2019
Probability
engineering-mathematics
isro-mech
probability
+
–
0
answers
20
Find correct statements
Find correct statements: The read system call to fetch data from a file always blocks the invoking process. During filesystem operations, if the file system implementation ensures that changes to data blocks of a file are flushed to disk before changes to ... interrupts on its CPU core for the duration that the spinlock is held, in both single core and multi core systems.
Find correct statements:The read system call to fetch data from a file always blocks the invoking process. During filesystem operations, if the file system implementation...
2.1k
views
asked
Jan 13, 2019
Operating System
operating-system
+
–
1
answer
21
TLB hit ration and memory lookup time
Consider a system where TLB lookup time is $25$ ns and memory access time is $200$ ns, respectively. Assuming a virtual address space of $2$ KB, page size of $32$ bytes, and a PTE size of $2$ bytes, what is the minimum TLB hit ratio that results in an average v2p (virtual to physical) translation latency of $185$ ns?
Consider a system where TLB lookup time is $25$ ns and memory access time is $200$ ns, respectively. Assuming a virtual address space of $2$ KB, page size of $32$ bytes, ...
771
views
asked
Jan 13, 2019
Operating System
translation-lookaside-buffer
hit-ratio
+
–
1
answer
22
process state in operating system
Consider a process P1 that is executing on a Linux-like OS on a single core system. When P1 is executing, a disk interrupt occurs, causing P1 to go to kernel mode to service that interrupt. The interrupt delivers all the disk blocks that unblock a ... user mode of P1. At this point in time, what are the states (ready/running/blocked) of processes P1 and P2 ?
Consider a process P1 that is executing on a Linux-like OS on a single core system. When P1 is executing, a disk interrupt occurs, causing P1 to go to kernel mode to serv...
1.1k
views
asked
Jan 13, 2019
Operating System
operating-system
process
+
–
1
answer
23
fork and exec
what is the output of the following program? int ret = fork(); if(ret == 0) { exec(some_binary); // this call fails printf("child "); }else { wait(); printf("parent\n"); } Runtime Error child parent child parent
what is the output of the following program?int ret = fork(); if(ret == 0) { exec(some_binary); // this call fails printf("child "); }else { wait(); printf("parent\n"); }...
832
views
asked
Jan 13, 2019
Operating System
fork-system-call
operating-system
+
–
0
answers
24
SpinLock in the kernel Mode
Consider a process in kernel mode that acquires a spin-lock. For correct operation, it must disable interrupts on its CPU core for the duration that the spin-lock is held, in both single and multi-core systems.[True / False]
Consider a process in kernel mode that acquires a spin-lock. For correct operation, it must disable interrupts on its CPU core for the duration that the spin-lock is held...
314
views
asked
Sep 15, 2018
Operating System
operating-system
+
–
1
answer
25
Read system call
The read system call to fetch data from a file always blocks the invoking process.[True / False] [blocking means context switching to another process]
The read system call to fetch data from a file always blocks the invoking process.[True / False] [blocking means context switching to another process]
357
views
asked
Sep 15, 2018
Operating System
operating-system
+
–
1
answer
26
Open file table
When a process opens a file that is already being read by another process, the file descriptors in both process will point to the same open file table entry.[True / False]. (open file table ?)
When a process opens a file that is already being read by another process, the file descriptors in both process will point to the same open file table entry.[True / False...
762
views
asked
Sep 15, 2018
Operating System
operating-system
file-system
+
–
2
answers
27
Fork system call,open file table
The fork system call creates new entries in the open file table for the newly created child process. [True / False] [ what is open file table ? ]
The fork system call creates new entries in the open file table for the newly created child process. [True / False][ what is open file table ? ]
1.1k
views
asked
Sep 15, 2018
Operating System
operating-system
fork-system-call
+
–
0
answers
28
Privileged modes
The four privileged modes (Ring 0 to Ring 3 as provided by x86) are the minimum levels of execution modes required for an operating system to operate correctly
The four privileged modes (Ring 0 to Ring 3 as provided by x86) are the minimum levels of execution modes required for an operating system to operate correctly
146
views
asked
Sep 13, 2018
Operating System
operating-system
non-gate
+
–
0
answers
29
System Call
Illustrate the sequence of events/steps for invocation and execution of a system call. Starting from the user level call and back.
Illustrate the sequence of events/steps for invocation and execution of a system call. Starting from the user level call and back.
213
views
asked
Sep 13, 2018
Operating System
operating-system
non-gate
+
–
1
answer
30
Estimate the average time to access data from memory
Estimate the average time to access data from memory with the following information, page fault service time = $2$ ms, memory access time = $200$ ns, $10$ page faults for every $10^6$accesses, TLB hit rate = $50\%$, ... to execute the page fault handler and update the v2p mapping (via possible evictions of other pages, reading from disk etc.)
Estimate the average time to access data from memory with the following information, page fault service time = $2$ ms, memory access time = $200$ ns, $10$ page faults for...
352
views
asked
Sep 13, 2018
Operating System
operating-system
non-gate
+
–
Email or Username
Show
Hide
Password
I forgot my password
Remember
Log in
Register