qual

Ace your homework & exams now with Quizwiz!

Direct mapped caches predominantly have the following types of misses:

Conflict misses

UNIX treats files and directories the same, that is, both are defined by the same type of data structure, called an inode. As with files, directories include a 9-bit protection string, which can create access control problem if wrongly chosen. Condier a file with protection mode 644 contained in a directory with protection mode 730. How might the file be compromised in this case?

If the directory and the file have the same group, then the file can be compromised by any user in the same group by first removing it and then recreating it (for example, whith different content).

Which of the following is CORRECT?

For any input sequence of length n, the worst-case running time of Randomized Quicksort to sort this sequence is Θ(nlgn)

If IC is the instruciton count, CPI is the Cycles per Instruciton, T is the execution time, and f is the clock frequency then MIPS is equal to:

IC/(T*10^6)

Suppose the partition function resu-lt in an 86-to14 split. What's the running time of Randomized-select()?

O(n)

To partition an already sorted array with n elements, what's the running time of PARTITION?

O(n)

Suppose the following two process, foo and bar, are executed concurrently and share the semaphore variables S and R (each initialized to 1) and the integer variable x (initialized to 0). void foo() { while(1) { semWait(S); semWait(R); x++; semSignal(S); semsignal(R); } } void bar() { while(1) { semWait(R); semWait(S); x++; semSignal(S); semsignal(R); } } The concurrent execution of these processes:

can result in both being blocked forever(deadlock)

Which of the flollowing is NOT CORRECT?

f(n) is not blong to Omega(g(n)) implies lim T (n->infinite)[(f(n))/(g(n)))] = 0

An n element heap has height:

lower(lgn)

The Build-max-heap algorithm has a time complexity of

n

Which of the following are true about memory systems based on segmentation or paging:

segmentation does not eliminate external fragmentatrion

We resort to dynamic scheduling because:

some pipeline stalls are unpredictable.

What's the running time of Quicksort when the array contains distinct elements and is sorted in descreasing order?

Θ(n^2)

The solution of T(n) = 27T(n/3) + Θ(n^3lgn) is:

Θ(n^3lg^2n)

Which of the following is the solution to the recurrence T(n) = T(αn) + T((1-αn) + cn?

Θ(nlgn)

How many process are created by the execution fo the following code:

#include <stdio.h> main() { int pid1, pid2, pid3; int counter; pid1 = 10; pid2 = 20; pid3 = 30; counter = 1; pid1 = fork(); pid2 = fork(); while(counter < 2) { pid3 = fork(); counter = counter + 1; } } 8

A particular key is hashed to a particular slot with probability 1/n. Suppose we select a specific set of k keys. The probability that these k keys are inserted into the slot in question and that all other keys are inserted elsewhere is:

(1/n)^k(1-1/n)^(n-k)

A program spends 50% of time in integer operations and the rest in floating point operations. By how much should the integer operations be speed up so that total execution time reduces by 25%?

2

A CPU has 1ns clock, hit time of 1 cycle, miss penalty of 20 cycles and missrate of 5%, then the average access time per instruction is:

2 cycles

A heap of height h has at most:

2^(h+1) -1 elements

A heap of height h has at least:

2^h elements

Which of the following is NOT CORRECT?

2^n belong to Θ(2^n/2)

The theoretical sppedup of 4-stage pipeline:

4

Which of the following are true about memory virtualization:

A hardware mechanism is needed for translating virtual addresses to physical main memory addresses at the time of execution of the instruciton that contains the reference.

Computer A has cycle time of 250ps and CPU of 2.0. Computer B has cycle time of 500ps and CPU of 1.2. Both computer have the same ISA. Which is the following it true?

A is faster than B by 20%

Which of the following instructions should be privileged?

A. Set value of timer B. Read the clock C. Clear memory D. Turn off interrupts E Switch from user to kernel mode F. Access I/O device A.C.D.F

Doubling:

A: The rotation speed of a 10000 RPM (rotations per minute) disk doubles its peak transfer bandwidth, but improves its throughput for random 8KB reads only marginally B: The rotation speed of a 10000RPM (rotations per minute) disk doubles its peak transfer bandwidth and improves its throughput for random 8KB read significantly. C: The bit density of a 1000RPM disk doubles its peak transfer bandwidth, but improves its throughput for random 8KB reads only marginally. D: The bit density of a 10000RPM disk doubles its peak transfer bandwidth, and improves its throughput for random 8KB reads significantly A and C

Consider the following code Loop: LD F0, 0(R1) ADD.D F4, F0, F2 S.D F4, 0(R1) ADDUI R1, R1, #-8 BEN R1, R2, LOOP An example of data dependency is:

ADDUI and BNE

Today's memory space is quite large and program code quite compact. The consequences for future designs of operating system is:

As logn as programmers are human, virtual memory will be needed even if the physical memory becomes as large as the disk.

Consider the following code : DADDU R2, R3, R3 BEQZ R4, L DSUBU R1, R1, R6 L: ... OR R7, R1, R8 There is a control dependence of OR instrution on:

Both DADDU and DSUBU

Swap space allocated as a special region (partition) on the disk:

Can be faster than if allocated as a special file because it avoids file system costs due to disk organization.

Given a set of n integers in the range [1, n^3], which of the following algorithm can achieve a running time of Θ(n)?

Counting sort

The main memory of computer is implemented with:

DRAM

In Snoopy Coherence Protocol, the processors:

Each core tracks sharing status of each block

Which of the following statements about binary trees is NOT true?

Every binary tree ahs at least one node.

Which of the following statements about binary trees is NOT true?

Every binary tree has at least one node.

In IEEE STD 754-1985 double precision floating point format:

Exponent is 11 bits long

Which of the following statements are true on distributed coordination:

In a distributed system deployed over the Internet, agreement among n processes cannot be always reached always in a constant X (n+1) rounds of communication.

A Translation Lookaside Buffer(TLB):

Is a fast cache for virtual address translation results

For Round-Robin scheduling, increasing the scheduling quantum:

Is a good way to improve system throughput

Which of the following statements is/are not true of a pipelining:

It decreases latency time of an instruciton

Choose the true statements:

It is possible for one process to lock the mutex and for another process to unlock it

Which of the following will not be part of a RISC instruction set:

Log(x)

Which of the following model is rarely used:

MISD

Which of the following instructions should be protected, i.e., can execute only when the processor is running in kernel mode?

MOV cr3, src; (move the value in src to control register CR3. CR3 contains the physical address of the base of the page table

ISA does not affect the following metric:

MTTF

What's the partition result of {2, 8, 7, 1, 3, 5, 6, 4}? (Assume the last element is the pivot)

None of the above

What is the smallest number of comparisons in order to find both minimum and maximum of an -n-element array?

O(3n/2)

Consider the recurrence T(n) = T(n/3) + T(2n/3) + Cn, where c is a constant. What's the length of the shortest path from the root to a leaf in the recursion tree?

O(log_3 n)

What is the expected time required to search for a value in a binary search tree containing n nodes?

O(logn)

If we use mergesort to sort an array with n elements, what is the worst-case time required for the sort?

O(nlogn)

A process requires:

One entry in the process list or one per thread, depending on OS

Which of the following is an example of a CISC architecture:

Pentium

Which of the following statements are true:

Protection domains are implemented in Unix via users and domain switching is implemented via the file system

The basic idea behind a vector architecture is:

Read data into vector registers and operate on them

There are several factors that affect the efficiency of loopup operations in a hash table. Which of the following is not one of those factors?

Size of elements stored in the hash table

Let the initial value = T and actual outcome of branches of NT, NT, NT, T, T, T then the preciction of a 1-bit predictor are:

T, NT, NT, NT, T, T

Which of the following is CORRET?

The fominant cost of Quicksort is Partitioning

Which of the following statements are true when the knernel switches execution from the current process to another process:

The kernel must save the register values(including IP (Instruction Pointer), SP(stack pointer) etc.) of the current prcess to memory.

The programming languages vulnerable to buffer overflows are:

Those languages without a very strong notionof the type of variables, and what constitutes bermissible operations on them

Which of the following statements are true about processes?

Timer interrupts are generally required for a kernel to correctly isolate processes.

Which of the following is a good measure of computer performance:

Total Execution Time

Which of the following will NOT guarantee the deadlock is avoided:

Use locks sparingly

In a write-back scheme, a block is copied to main memory during block repllacement when the block's:

Valid=Dirty=1

VLIW stands for :

Very Long Instruction Word

Given a BSD Unix Fast File System that needs to support two types of workloads:

Workload A - Contains sequential access to many small files in the same directory Workload B - Contains sequential access to a few very large files in different directories. Doubling the spin speed will lead to: More significant improvement for workload A than for workload B


Related study sets

CONTROL OF MICROBIAL GROWTH (pg 76-85)

View Set

K201 Exam: (Post Lecture Quiz Questions, Poll Questions, Lecture Koin Challenges)

View Set