






Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
computer science operating system
Typology: Summaries
1 / 12
This page cannot be seen from the preview
Don't miss anything!







Please answer in the space provided (in this questionnaire). No calculators are allowed. Note: Points 10x2 + 30x1 = 50 Once you complete the exam, please exit quietly leaving your booklet at the booth.
Each multiple-choice question has only one correct answer. If you think there is more than one possible answer, select only one answer โ otherwise auto-scan is going to fail the question. Question 1 ( 1 point) โ To access the services of operating system, the interface is provided by: a) System calls b) API c) Library d) Assembly instructions e) None of the above Question 2 (1 point) โ Which one of the following is not true? a) kernel is the program that constitutes the central core of the operating system b) kernel is the first part of operating system to load into memory during booting c) kernel is made of various modules which will be loaded on demand d) kernel remains in the memory during the entire computer session Question 3 (1 point) โ In operating system, each process has its own: a) address space and global variables b) open files c) pending alarms, signals and signal handlers d) all of the above mentioned e) None of the above mentioned Question 4 ( 1 point) โ Which system call returns the process identifier of a terminated child? a) wait b) exit c) fork d) get e) exec Question 5 ( 1 point) โ The number of processes completed per unit time is known as __________ a) Response Time b) Throughput c) Efficiency d) Turnaround Time e) None of the above
Question 11 (1 point) โ What is a medium-term scheduler? a) It selects which process has to be brought into the ready queue b) It selects which process has to be executed next and allocates CPU to it c) It selects which process to remove from memory by swapping d) All of the above e) None of the mentioned Question 12 (1 point) โ In Round-Robin scheduling, when the time quantum given to a process expires, the process goes from the ____ state to the ____ state: a) Running, Blocked b) Ready, Running c) Ready, Suspended d) Running, Ready e) Blocked, Ready Question 13 (1 point) โ The interval from the time of submission of a process to the time of completion of a processing burst is termed as: _______ a) waiting time b) turnaround time c) response time d) real time e) time quantum Question 14 (1 point) โ In priority scheduling algorithm, when a process arrives at the ready queue, its priority is compared with the priority of: ______ a) all processes b) blocked processes c) parent process d) child process e) running process Question 15 (1 point) โ Which one of the following cannot be scheduled by the kernel? a) kernel thread b) user thread c) process d) interrupt service routine e) none of the mentioned
Question 16 (1 point) โ An I/O bound program will typically have: a) few very short CPU bursts b) many very short I/O bursts c) many very short CPU bursts d) few very short I/O bursts e) many very long CPU bursts Question 17 (1 point) โ Bounded waiting implies that there exists a bound on the number of times: a process is allowed to enter its critical section: a) the process is allowed to enter the critical before other processes can make a request to enter the critical section b) other processes are allowed to enter the critical section before the process can enter the critical section after it made the request to enter the critical section c) the process is allowed to enter the critical before other processes can enter the critical section d) the process is allowed to request the critical after other processes enter the critical section Question 18 ( 2 point) โ Consider the methods used by processes P1 and P2 for accessing their critical sections whenever needed, as given below. The initial values of shared boolean variables S1 and S2 are randomly assigned. //Method used by P1 : while(S1==S2); Critical section S1 = S2; //Method used by P2 : while(S1!=S2); Critical section S2 = not(S1); In this situation, the following statements describes properties achieved: a) Mutual exclusion but not progress b) Progress but not mutual exclusion c) Neither mutual exclusion nor progress d) Both mutual exclusion and progress Question 19 (1 point) โ An un-interruptible unit is known as: a) single b) atomic c) static d) mutex Question 20 (1 point) โ Spinlocks are intended to provide __________ a) Mutual Exclusion b) Bounded Waiting c) Aging d) Progress
Question 23 (1 point) โ Deadlock prevention is a set of methods: a) to ensure that at least one of the necessary conditions cannot hold b) to ensure that all of the necessary conditions do not hold c) to decide if the requested resources for a process have to be given or not d) to recover from a deadlock e) none of the mentioned Question 24 (1 point) โ To ensure that the hold and wait condition never occurs in the system, it must be ensured that: a) whenever a resource is requested by a process, it is not holding any other resources b) each process must request and be allocated all its resources before it begins its execution c) a process can request resources only when one is available d) All of the mentioned e) None of the mentioned Question 25 ( 1 point) โ The following pair of processes share a common variable X: //Process P1 : { int Y; A1: Y = X*2; A2: X = Y; } //Process P2 : { int Z; B1: Z = X+1; B2: X = Z; } X is set to 5 before either process begins execution. As usual, statements within a process are executed sequentially, but statements in process A may interleave with statements in process B. How many different values of X are possible after both processes finish executing? a) 1 b) 2 c) 3 d) 4 e) 8 Question 26 ( 1 points) โ Which of the following statements is true about pre-emptive Shortest Job First (SJF) scheduling: ID Statement S1 It causes minimum average waiting time S2 It may cause starvation a) Only S b) Only S c) Both S1 and S d) Neither S1 nor S
Question 27 (1 point) โ The disadvantage of a process being allocated all its resources before beginning its execution is: a) Low CPU utilization b) Low resource utilization c) Very high resource utilization d) Very high CPU utilization e) None of the mentioned Question 2 8 ( 2 point) โ A critical section is implemented using xchg (a,b) function, which is an atomic operation supported by hardware. If b is global bit initialized to 0, k is local bit initialized to 1, which of the following statements is true while(true){ k = 1 while(k!=0) xchg(k,b) ; Critical Section xchg(k,b) ; Remainder Section } a) When a process is in the critical section the value of b=0, and the value of k= b) When a process is in the critical section the value of b=1, and the value of k= c) When a process is in the critical section the value of b=0, and the value of k= d) When a process is in the critical section the value of b=1, and the value of k= Question 29 ( 2 points) โ Consider the following table of arrival time and burst time for three processes P0, P1 and P2. Assuming pre-emptive shortest job first scheduling algorithm is used. What is the average waiting time for the three processes? Process Arrival time Burst Time P0 0 ms 9 ms P1 1 ms 4 ms P2 2 ms 9 ms a) 4.0 ms b) 4.33 ms c) 5.0 ms d) 5 .33 ms e) 6 .33 ms
Question 32 (1 point) โ All unsafe states are: a) deadlocks b) not deadlocks c) fatal d) all of the mentioned e) None of the mentioned Question 33 ( 2 point) โ A system has 12 magnetic tape drives and 3 processes: P0, P1, and P2. Process P0 requires 10 tape drives, P1 requires 4 and P2 requires 9 tape drives. Process Maximum Need Currently Hold P0 10 5 P1 4 2 P2 9 2 Which of the following sequence is a safe sequence? a) P0, P1, P b) P1, P2, P c) P2, P0, P d) P1, P0, P e) None of the mentioned Question 34 ( 2 point) โ A system with 5 processes P0 through P4 and three resource types A, B, C has A with 10 instances, B with 5 instances, and C with 7 instances. At time t0, the following snapshot has been taken: Process Allocated Max Required A B C A B C P0 0 1 0 7 5 3 P1 2 0 0 3 2 2 P2 3 0 2 9 0 2 P3 2 1 1 2 2 2 P4 0 0 2 4 3 3 A B C Available 3 3 2 The sequence < P0, P1, P3, P4, P2 > of process termination is: a) A proof that the current state is safe b) Does not conclude the current state
Question 35 (1 point) โ The logical address is different than the physical address in the following address binding schemes: a) compile time b) load time c) execution time d) all of the above e) none of the above Question 36 (1 point) โ Consider the following statements and rank them as True ( T ) or False ( F ) respectively. ID Statement S1 Paging suffers from internal fragmentation S2 Paging suffers from external fragmentation S3 Segmentation suffers from internal fragmentation S4 Segmentation suffers from external fragmentation a) TTTT b) FTFF c) FTFT d) FTTT e) FFFF Question 37 ( 2 point) โ A system with 32b address bus, is using a paging scheme with page size = 4KB. What is the maximum possible value of the page table length? a) 1024 (or 2^10 ) b) 4096 (or 2^12 ) c) 104857 (or 2^20 ) d) 4294967296 (or 2^32 ) Question 38 (1 point) โ The translation look-aside buffer (TLB) is used for: a) Store the page table b) Store the segment table c) Cache the page table d) Cache the segment table e) All of the above