Operating Systems Comprehensive Exam. Spring Student ID # 3/16/2006

Similar documents
Operating Systems Comprehensive Exam. Spring Student ID # 3/20/2013

Operating Systems Comprehensive Exam. Fall Student ID # 10/31/2013

Operating Systems Comprehensive Exam. Spring Student ID # 2/17/2011

(b) External fragmentation can happen in a virtual memory paging system.

OS 1 st Exam Name Solution St # (Q1) (19 points) True/False. Circle the appropriate choice (there are no trick questions).

Operating Systems (1DT020 & 1TT802)

COMP SCI 3SH3: Operating System Concepts (Term 2 Winter 2006) Test 2 February 27, 2006; Time: 50 Minutes ;. Questions Instructor: Dr.

Department of Computer applications. [Part I: Medium Answer Type Questions]

COMP 3361: Operating Systems 1 Midterm Winter 2009

( D ) 4. Which is not able to solve the race condition? (A) Test and Set Lock (B) Semaphore (C) Monitor (D) Shared memory

CMPS 111 Spring 2003 Midterm Exam May 8, Name: ID:

CSC Operating Systems Spring Lecture - XII Midterm Review. Tevfik Ko!ar. Louisiana State University. March 4 th, 2008.

B. V. Patel Institute of Business Management, Computer &Information Technology, UTU

CSE 153 Design of Operating Systems

QUESTION BANK UNIT I

Techno India Batanagar Department of Computer Science & Engineering. Model Questions. Multiple Choice Questions:

INSTITUTE OF AERONAUTICAL ENGINEERING Dundigal, Hyderabad COMPUTER SCIENCE AND ENGINEERING QUESTION BANK OPERATING SYSTEMS

( B ) 4. Which is not able to solve the race condition? (A) Test and Set Lock (B) Shared memory (C) Semaphore (D) Monitor

INSTITUTE OF AERONAUTICAL ENGINEERING (Autonomous) Dundigal, Hyderabad

SNS COLLEGE OF ENGINEERING

MC7204 OPERATING SYSTEMS

SAMPLE MIDTERM QUESTIONS

COMP 3361: Operating Systems 1 Final Exam Winter 2009

SYED AMMAL ENGINEERING COLLEGE CS6401- OPERATING SYSTEM

Delhi Noida Bhopal Hyderabad Jaipur Lucknow Indore Pune Bhubaneswar Kolkata Patna Web: Ph:

Chendu College of Engineering & Technology

(MCQZ-CS604 Operating Systems)

Memory Management. 3. What two registers can be used to provide a simple form of memory protection? Base register Limit Register

Lecture 9: Midterm Review

CS 322 Operating Systems Practice Midterm Questions

CMPS 111 Spring 2013 Prof. Scott A. Brandt Midterm Examination May 6, Name: ID:

INSTITUTE OF AERONAUTICAL ENGINEERING

CLASS: II YEAR / IV SEMESTER CSE SUBJECT CODE AND NAME: CS6401 OPERATING SYSTEMS UNIT I OPERATING SYSTEMS OVERVIEW

DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING UNIT I

King Fahd University of Petroleum and Minerals. Write clearly, precisely, and briefly!!

University of Waterloo Midterm Examination Model Solution CS350 Operating Systems

Mid Term from Feb-2005 to Nov 2012 CS604- Operating System

CHAPTER NO - 1 : Introduction:

CPSC/ECE 3220 Summer 2017 Exam 2

Exam Guide COMPSCI 386

COSC243 Part 2: Operating Systems

CSI3131 Final Exam Review

EECE.4810/EECE.5730: Operating Systems Spring 2017 Homework 3 Solution

MARUTHI SCHOOL OF BANKING (MSB)

PESIT SOUTHCAMPUS. Question Bank

Sample Questions. Amir H. Payberah. Amirkabir University of Technology (Tehran Polytechnic)

8: Scheduling. Scheduling. Mark Handley

CS 318 Principles of Operating Systems

Unit In a time - sharing operating system, when the time slot given to a process is completed, the process goes from the RUNNING state to the

Class average is Undergraduates are performing better. Working with low-level microcontroller timers

Chapter 2 Processes and Threads. Interprocess Communication Race Conditions

CS153: Midterm (Fall 16)

a. A binary semaphore takes on numerical values 0 and 1 only. b. An atomic operation is a machine instruction or a sequence of instructions

Dr. Rafiq Zakaria Campus. Maulana Azad College of Arts, Science & Commerce, Aurangabad. Department of Computer Science. Academic Year

Subject: Operating System (BTCOC403) Class: S.Y.B.Tech. (Computer Engineering)

Midterm Exam. October 20th, Thursday NSC

CS-537: Midterm Exam (Spring 2001)

CSC 716 Advanced Operating System Fall 2007 Exam 1. Answer all the questions. The maximum credit for each question is as shown.

Q 1. (10 Points) Assume that a process executes the following pseudo codes:

EXAMS CS604- OPERATING SYSTEMS

CS 370 Operating Systems

Unit 3 : Process Management

GATE SOLVED PAPER - CS

* What are the different states for a task in an OS?

Operating Systems (Classroom Practice Booklet Solutions)


CS4411 Intro. to Operating Systems Final Fall points 12 pages

Department of CSIT ( G G University, Bilaspur ) Model Answer 2013 (Even Semester) - AR-7307

Preview. Process Scheduler. Process Scheduling Algorithms for Batch System. Process Scheduling Algorithms for Interactive System

Design of Operating System

Midterm Exam Solutions Amy Murphy 28 February 2001

CMPSCI 377: Operating Systems Exam 1: Processes, Threads, CPU Scheduling and Synchronization. October 9, 2002

CS Mid term Exam Maximum points 100; Maximum time allowed: 75 minutes

OPERATING SYSTEMS FINAL EXAMINATION APRIL 30, 2006 ANSWER ALL OF THE QUESTIONS BELOW.

Processes. CS 475, Spring 2018 Concurrent & Distributed Systems

Review. Preview. Three Level Scheduler. Scheduler. Process behavior. Effective CPU Scheduler is essential. Process Scheduling

Course Syllabus. Operating Systems

FCM 710: Architecture of Secure Operating Systems

CHAPTER 2: PROCESS MANAGEMENT

Scheduling. Scheduling. Scheduling. Scheduling Criteria. Priorities. Scheduling

EECE.4810/EECE.5730: Operating Systems Spring Midterm Exam March 8, Name: Section: EECE.4810 (undergraduate) EECE.

CS604 - Operating System Solved Subjective Midterm Papers For Midterm Exam Preparation

Processes. Process Management Chapter 3. When does a process gets created? When does a process gets terminated?

Q1. State True/false with jusification if the answer is false:

ALL the assignments (A1, A2, A3) and Projects (P0, P1, P2) we have done so far.

FCM 710: Architecture of Secure Operating Systems

Lecture 2 Process Management

OPERATING SYSTEMS CS3502 Spring Processor Scheduling. Chapter 5

OPERATING SYSTEMS. Sharafat Ibn Mollah Mosharraf TOUCH-N-PASS EXAM CRAM GUIDE SERIES. Students. Special Edition for CSEDU

1.1 CPU I/O Burst Cycle

CPU Scheduling. Rab Nawaz Jadoon. Assistant Professor DCS. Pakistan. COMSATS, Lahore. Department of Computer Science

Architectural Support. Processes. OS Structure. Threads. Scheduling. CSE 451: Operating Systems Spring Module 28 Course Review

KEY CENG 334. Midterm. Question 1. Question 2. Question 3. Question 4. Question 5. Question 6. Total. Name, SURNAME and ID

Chapter 5: CPU Scheduling

Processes The Process Model. Chapter 2. Processes and Threads. Process Termination. Process Creation

Course Description: This course includes the basic concepts of operating system

Operating System(16MCA24)

CS370 Operating Systems

Two hours. Question ONE is COMPULSORY UNIVERSITY OF MANCHESTER SCHOOL OF COMPUTER SCIENCE. Date: Friday 25th January 2013 Time: 14:00-16:00

Indian Institute of Technology, Kharagpur

Transcription:

Operating Systems Comprehensive Exam Spring 2006 Student ID # 3/16/2006 You must complete all of part I (60%) You must complete two of the three sections in part II (20% each) In Part I, circle or select only one answer for each question, unless notified otherwise.

Part I: You must complete all of this section. 1. A file handle (or file descriptor) is a pointer into the. open file table file control block directory file allocation table 2. A UNIX process calls fork() to create a child process as shown: pid = fork(); a) What value will be assigned to pid in the parent process by the call to fork()? the parent s process id the child s process id zero none of these b) What value will be assigned to pid in the child process by the call to fork()? the parent s process id the child s process id zero none of these 3. Which of the following disk scheduling algorithms can, in some cases, delay requests for an indefinite amount of time (i.e., starvation can occur)? FIFO SSTF LOOK SCAN none of these is correct 4. Memory compaction can not reduce fragmentation when is used. paging segmentation contiguous allocation 5. If a system is in an unsafe state, it is guaranteed that a deadlock will occur. True False Matching: choose the best answer for each question from the list below: 6. is commonly used to implement virtual memory. 7. The working set model for paging is based upon the assumption of. 8. If a page s is set, the page must be written to disk before it is replaced. 9. is used with the base register to determine if a memory access is out of bounds. A. invalid bit B. static linking C. page fault D. limit register E. demand paging F. fragmentation G. segment register H. deadlock I. locality K. dirty bit L. program counter M. compaction 1

Matching: choose the best answer for each question from the list below: 10. The term refers to a software-generated interrupt. 11., and are two of the three conditions that must be satisfied to create a valid solution (algorithm) for the critical section problem. 12. provide a programming interface to the services provided by the OS. 13. processes can affect or be affected by the execution of another process. 14. When a process uses a send to deliver a message, it must wait until the receiving process gets the message. 15. The module gives control of the CPU to the process selected by the short-term scheduler. A. mutex B. job scheduler C. cooperating D. progress E. kernel mode F. privileged instructions G. blocking H. atomic J. dispatcher K. system calls L. mutual exclusion M. independent N. bounded waiting O. asynchronous P. trap 16. Does the following pair of operations correctly implement a Semaphore? wait(s) { while(s >= 0); S--; } signal(s) { S++; } Yes No If not, briefly explain the error: Assuming that the Semaphore code is correct (or has been corrected), briefly describe two disadvantages of this type of Semaphore: 2

17. Internal fragmentation can occur when using (circle all that apply): linked file allocation contiguous memory allocation memory paging memory segmentation contiguous file allocation indexed file allocation 18. External fragmentation can occur when using (circle all that apply): linked file allocation contiguous memory allocation memory paging memory segmentation contiguous file allocation indexed file allocation 19. Clearly explain the difference between deadlock prevention and deadlock avoidance. 20. Answer the following questions based on a system that uses 24-bit memory addressing, a single-level page table and 2k (i.e., 2048) byte pages: a) what is the maximum number of memory pages for this system? b) how many bits in the address are used for the page offset? c) what is the size of a memory frame (in bytes)? d) how many total bytes of memory are available in the system? 3

II. You must complete two of the following three sections. If you complete more than two sections, clearly indicate which two sections that you want graded. Otherwise, the first two sections will be graded and the third ignored. A. Given the following set of processes, answer the questions below. Assume that each new process arrives after the interrupted process has been returned to the ready queue. If two processes arrive at the same time, or have the same remaining burst time, schedule them in process number order. Process Id Burst Time Arrival Time 1 4 0 2 2 1 3 6 2 4 3 4 Fill in the following Gantt charts as specified and answer the questions associated with each part. Write the process number of the executing process in the cell for each time unit. 1) First-Come-First-Served (non-preemptive): 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 Average waiting time = Which process had the longest response time 2) Shortest-job-first (preemptive): 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 Average waiting time = What was the turnaround time for process 1 3) Round Robin (time slice (quantum) is 1 time unit): 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 Average waiting time = What was the turnaround time for process 3 4

B. Assume that processes 1 and 2 are dispatched concurrently and that A, B, C, D, E, F, G and H represent blocks of code and that the Semaphores S1, S2 and S3 were initialized to 0; Process 1 Process 2 A; E; signal(s2); signal(s1); B; F; wait(s1); wait(s2); C; G; wait(s3) signal(s3); D; H; For the statements below, enter T if the statement is always TRUE, F if it is always FALSE and U if an answer can not be determined from the information given. B completes before F begins. D completes before G begins. C completes before H begins. A completes before G begins. G completes before C begins. C completes before E begins. F completes before D begins. G completes before D begins. E completes before C begins. F completes before A begins. 5

C. Given the following list of page references, in execution order: 4, 2, 5, 1, 5, 2, 3, 5, 1, 4, 2, 3 Given the number of available frames shown in the table below, how many page faults will occur for each of the following page replacement algorithms? (All pages are initially empty.) You must show your work to receive partial credit, otherwise only your answers will count. Algorithm FIFO with 4 frames # of page faults LRU with 3 frames Optimal with 3 frames 6