CS630 Operating System Design, Second Exam, Fall 2014

Size: px
Start display at page:

Download "CS630 Operating System Design, Second Exam, Fall 2014"

Transcription

1 CS630 Operating System Design, Second Exam, Fall 2014 Problem 1. (25 Points) Assume that a process executes the following pseudo codes: #5 #6 #7 main (int argc, char *argv[ ]) { int i, keyin; /* the last line of 1st half of page #5 */ for (i=1; i < argc; i++) { /* the beginning of 2nd half of page #5 */ keyin = atoi (argv[i]); /* convert i-th argument to integer */ if (keyin is even) sub( ); /* the last line of 2nd half of page #5 */ } /* the last line of 1st half of page #6 */ } /* the last line of 1st half of page #7 */ /* the 2nd half of page #7 is intentionally left blank */ #10 #11 sub ( ) { } /* the last line of 1st half of page #11 */ /* the 2nd half of page #11 is intentionally left blank */ Assume that this program is executed as pseudo Firstly, use a Gantt chart to illustrate how the created process is really executed page by page; and then find the page reference string by assuming that the kernel is referencing a page at every tickmark as the process is executing. Show related work to claim credits. Problem 2. (13 Points) Consider a computer system with 3 individual resources {R1, R2, R3}. Let s assume there are 4 processes {P1, P2, P3, P4} make requests in the following order: {P1 R1, P3 R2, P2 R1, P1 R2, P4 R3, P3 R3, P4 R1}. Assume Pi gets Rj if Rj is currently available. Ignore a request if it cannot be preceded. Is there a deadlock and if so at what point did it occur and which processes did it involve? If there is deadlock, then how to avoid such a deadlock by rearrange the order of requests. Problem 3. (40 Points) Consider the Demand Paging problem. PA and PB are two programs in a file system. Assume that a page reference string is made by recording the virtual page number every tick as the process is executing. When PA is executed, the page reference string will be given as: {8, 9, 9, 21, 9, 10}, and when PB is executed, the page reference string will be given as: {4, 4, 5, 5, 6}. Assume that there are two processes in the system just before t=0: P1 executes PA and P2 executes PB. Assume that there CS / 003 1

2 may have new processes created at some special moments if at any one of those moments there is a scheduled process; say it starts at t=4.5 (i.e. 4 and half ticks) and then every 5 ticks after that). Assume that all the new processes will be executing PB. Assume that each I/O needs 4 ticks to be handled, and I/O requests are handled on a FCFS fashion. Draw a Gantt chart to illustrate the scheduling of these processes until the process P1 is done if a round-robin scheduling with a time quantum of 3 ticks is used. Assume that the working set contains 3 pages and uses the FIFO page replacement method. Show your work. Problem 4. (12 Points) Given a page reference string as: Does this page reference string suffer from Belady s Anomaly when the page replacement algorithm is FIFO? Note: you will need to check the window size from 2 up to 4. Problem 5. (10 Points) Why LRU doesn't suffer Belady's Anomaly in general? CS / 003 2

3 CS630: Operating System Design, Second Exam, Spring 2014 Q 1. (10 Points) Assume that a process executes the following pseudo codes: #4 #5 #6 #7 #10 main (int argc, char *argv[ ]) { int I, *input; n = argc 1; input = (int *)malloc (n); for (i=0; i < n; i++) input[i] = atoi (argv[i+1]); statement_block_1; for (i=0; i < n; i++) { statement_block_2; if (input[i]%2 == 0) continue; /* last instruction */ If (!fork()) execv(); /* first instruction */ statement_block_3; sub (input[i]%3); } /* last instruction */ statement_block_4; } sub (int n) { statement_block_5; if (n > 1) sub (n 1); } /* last instruction */ Assume that this program is executed as pseudo , find the page reference string. Note that system calls malloc() allocates dynamic memory space, atoi() converts a string to an integer, and the expression (a%b) returns the reminder of a/b. Show related work to claim credits. Q 2. (10 Points) Assume that R1 has only one instance, both R2 and R3 have two instances and a resource allocation graph is given as the following: {P1 R1, P2 R3, P3 R2, R1 P2, R2 P2, R3 P1, R3 P3}. Does this system contain deadlock? Show your reasoning. If the answer is No then can we create a deadlock situation and how? Q 3. (20 Points) Given a page reference string as: {1, 3, 2, 4, 1, 3, 5, 1, 3, 2, 4, 5}. Does this page reference string suffer from Belady s anomaly when the page replacement algorithm is a) FIFO, and b) LRU? Note: you will need to check the window size from 3 up to 5. Q 4. (15 Points) In the code below, four processes are competing for four resources labeled A to D where get() is same as wait() and release() is the same as signal(). CS / 003 3

4 a) Using a RAG (resource allocation graph, show the possibility of a deadlock in this implementation. b) Modify the order of some of the get requests to prevent the possibility of any deadlock. You cannot move requests across programs, only change the order inside each program. Use a RAG to justify your answer. Q 5. (45 Points) Consider the Demand Paging problem. P A and P B are two programs in a file system. Assume that a page reference string is made by recording the virtual page number every 2 ticks as the process is executing. When P A is executed, the page reference string will be given as: {4, 5, 6, 10, 10, 5, 6, 10, 7}, and when P B is executed, the page reference string will be given as: {4, 4, 4, 5, 5}. Assume that there are two processes in the system just before t=0: P 1 executes P A and P 2 executes P B. For P A, assume that the first instruction in page#10 fork a new process which executing P B. Assume that each page fault needs 4 ticks to be handled, and page faults are handled on a first-come-first-serve fashion. Draw a Gantt chart to illustrate the scheduling of these processes and their child processes and to find the number of page faults for each process if a round-robin, non-preemptive scheduling with a time quantum of 4 ticks is used. Assume that the working set contains 3 pages and uses the FIFO page replacement method. Show your work. CS / 003 4

5 CS630 Operating System Design, Second Exam, Fall 2013 Q 1. (35 Points) Assume that PA and PB are distinguishing programs in the file system. Assume that a page reference string is made by recording the virtual page number every 2 ticks as the process is executing. When PA is executed it starts at page 4, and then it executes pages {5, 6} if the input data is an odd number otherwise it executes pages {5, 21, 22}; and the input data is given by online arguments. After the input data are processed it executing pages {7, 8} before it exits. Assume that the first instruction in page #5 is going to forks a new process which executing PB and the last instruction in page #21 is to do a disk I/O. On the other hand, PB is straight forward to execute pages {4, 4, 4, 5, 6}. Assume that there are two processes in the system just before t=0: P 1 it is executed as PA and P 2 is executed as PA 2 4. Assume that the I/O controller needs 3 ticks to handle each I/O request, and I/O requests are handled on a first-come-first-serve basis. Draw a Gantt chart to illustrate the scheduling of these processes and to find the number of page faults for each process if a roundrobin, non-preemptive scheduling with a time quantum of 4 ticks is used. Note that you do not need to consider page replacement for this question. Q 2. (15 Points) In the code below, three processes are competing for six resources labeled A to E where get() is same as wait() and release() is the same as signal(). c) Using a RAG (resource allocation graph, show the possibility of a deadlock in this implementation. d) Modify the order of some of the get requests to prevent the possibility of any deadlock. You cannot move requests across programs, only change the order inside each program. Use a RAG to justify your answer. Q 3. (35 Points) Assume that P A, P B and P C are three distinguish programs in a file system. Assume that a page reference string is made by recording the virtual page number every 2 ticks as a process is executing. When P A is executed, the page reference string will be made as: {4, 5, 6, 10, 10, 5, 6, 10, 7}. where the first instruction in page #6 forks a new process which executing P B. Assume that when P B is executed, the page reference string shown below is recorded: {5, 5, 6, 6, 6, 7} where the first instruction in page #6 for P B forks a new process which executing P C. Assume that when P C is executed, CS / 003 5

6 the page reference string shown below is recorded: {4, 4, 4, 5, 5}. Assume that there are two processes in the system just before t=0: P 1 executes P A and P 2 executes P B. Assume that the OS needs 4 ticks to handle each page fault, and page faults are handled on a first-come-first-serve fashion. Draw a Gantt chart to illustrate the scheduling of all the processes created and to find the number of page faults for each process if a round-robin non-preemptive scheduling with a time quantum of 4 ticks is used. Assume that the working set contains 3 frames and uses the FIFO page replacement method. Show your work. Q 4. (15 Points) Consider a system with a total of 150 units of buffers, allocated to three processes as shown: Apply the banker s algorithm to determine whether it would be safe to grant each of the following requests. If yes, indicate a safe sequence that could be guaranteed possible. If no, indicate the reduction of the resulting allocation table. a) A fourth process arrives, with a maximum need of 60 and an initial need of 25 units. b) A fourth process arrives, with a maximum need of 60 and an initial need of 35 units. CS / 003 6

CS630 Operating System Design Second Exam, Spring 2015,

CS630 Operating System Design Second Exam, Spring 2015, CS630 Operating System Design Second Exam, Spring 2015, Problem 1. (10 Points) A technique, called swap prefetch, preloads a process s nonresident pages that are likely to be referenced in the near future.

More information

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

Q 1. (10 Points) Assume that a process executes the following pseudo codes: CS630: Operating System Design Second Exam, Spring 2014 Q 1. (10 Points) Assume that a process executes the following pseudo codes: #4 #5 #6 #7 #10 main (int argc, char *argv[ ]) { int I, *input; n = argc

More information

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

Operating Systems Comprehensive Exam. Spring Student ID # 2/17/2011 Operating Systems Comprehensive Exam Spring 2011 Student ID # 2/17/2011 You must complete all of Section I You must complete two of the problems in Section II If you need more space to answer a question,

More information

CS630 Operating System Design, First Exam, Spring 2017,

CS630 Operating System Design, First Exam, Spring 2017, First Exam, Spring 2017, Problem 1. (35 Points) Assume that P A, P B and P C are three distinctive programs. When P A is executed, it forks new processes executing P B at tick-marks 2, 5 and 7 and its

More information

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

Operating Systems Comprehensive Exam. Spring Student ID # 3/20/2013 Operating Systems Comprehensive Exam Spring 2013 Student ID # 3/20/2013 You must complete all of Section I You must complete two of the problems in Section II If you need more space to answer a question,

More information

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

Operating Systems Comprehensive Exam. Fall Student ID # 10/31/2013 Operating Systems Comprehensive Exam Fall 2013 Student ID # 10/31/2013 You must complete all of Section I You must complete two of the problems in Section II If you need more space to answer a question,

More information

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

Operating Systems Comprehensive Exam. Spring Student ID # 3/16/2006 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

More information

COMP 3361: Operating Systems 1 Midterm Winter 2009

COMP 3361: Operating Systems 1 Midterm Winter 2009 COMP 3361: Operating Systems 1 Midterm Winter 2009 Name: Instructions This is an open book exam. The exam is worth 100 points, and each question indicates how many points it is worth. Read the exam from

More information

MC7204 OPERATING SYSTEMS

MC7204 OPERATING SYSTEMS MC7204 OPERATING SYSTEMS QUESTION BANK UNIT I INTRODUCTION 9 Introduction Types of operating systems operating systems structures Systems components operating systems services System calls Systems programs

More information

Solution for Operating System

Solution for Operating System Solution for Operating System May 2016 Index Q.1) a). 2 b). 3 c).3-5 d).5-7 Q.2) a). 7-13 b). 13-14 Q.3) a). 15-17 b). 18-19 Q.4) a). N.A b). N.A Q.5) a). 19-25 b). N.A Q.6) a). 26 b). 27-28 c). N.A d).

More information

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

( B ) 4. Which is not able to solve the race condition? (A) Test and Set Lock (B) Shared memory (C) Semaphore (D) Monitor CS 540 - Operating Systems - Final Exam - Name: Date: Monday, May 12, 2003 Part 1: (80 + 8 (bonus) points - 4 points for each problem) ( C ) 1. In an operating system a utility which reads commands from

More information

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

( D ) 4. Which is not able to solve the race condition? (A) Test and Set Lock (B) Semaphore (C) Monitor (D) Shared memory CS 540 - Operating Systems - Final Exam - Name: Date: Wenesday, May 12, 2004 Part 1: (78 points - 3 points for each problem) ( C ) 1. In UNIX a utility which reads commands from a terminal is called: (A)

More information

QUESTION BANK UNIT I

QUESTION BANK UNIT I QUESTION BANK Subject Name: Operating Systems UNIT I 1) Differentiate between tightly coupled systems and loosely coupled systems. 2) Define OS 3) What are the differences between Batch OS and Multiprogramming?

More information

CS4411 Intro. to Operating Systems Final Fall points 12 pages

CS4411 Intro. to Operating Systems Final Fall points 12 pages CS44 Intro. to Operating Systems Final Exam Fall 5 CS44 Intro. to Operating Systems Final Fall 5 points pages Name: Most of the following questions only require very short answers. Usually a few sentences

More information

University of Waterloo Midterm Examination Model Solution CS350 Operating Systems

University of Waterloo Midterm Examination Model Solution CS350 Operating Systems University of Waterloo Midterm Examination Model Solution CS350 Operating Systems Fall, 2003 1. (10 total marks) Suppose that two processes, a and b, are running in a uniprocessor system. a has three threads.

More information

CS4411 Intro. to Operating Systems Exam 2 Fall 2009

CS4411 Intro. to Operating Systems Exam 2 Fall 2009 CS4411 Intro. to Operating Systems Exam 2 { Fall 2009 1 CS4411 Intro. to Operating Systems Exam 2 Fall 2009 150 points { 8 pages Name: Most of the following questions only require short answers. Usually

More information

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

Department of Computer applications. [Part I: Medium Answer Type Questions] Department of Computer applications BBDNITM, Lucknow MCA 311: OPERATING SYSTEM [Part I: Medium Answer Type Questions] UNIT 1 Q1. What do you mean by an Operating System? What are the main functions of

More information

CS Operating system Fall Midterm I -- Oct 5, 2017 You have 75 min. Good Luck!

CS Operating system Fall Midterm I -- Oct 5, 2017 You have 75 min. Good Luck! Name / ID (please PRINT) Seq#: Seat #: CS 3733.001 -- Operating system Fall 2017 -- Midterm I -- Oct 5, 2017 You have 75 min. Good Luck! This is a closed book/note examination. But You can use C reference

More information

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

(b) External fragmentation can happen in a virtual memory paging system. Alexandria University Faculty of Engineering Electrical Engineering - Communications Spring 2015 Final Exam CS333: Operating Systems Wednesday, June 17, 2015 Allowed Time: 3 Hours Maximum: 75 points Note:

More information

Computer Architecture and Operating Systems Course: International University Bremen Date: Final Examination

Computer Architecture and Operating Systems Course: International University Bremen Date: Final Examination Computer Architecture and Operating Systems Course: 320202 International University Bremen Date: 2006-05-22 Dr. Jürgen Schönwälder Type: open book Final Examination Problem F.1: operating systems (2+2+2+2+2=10

More information

Operating Systems Prof. Allan Gottlieb Practice Final Exam Page 1 Name

Operating Systems Prof. Allan Gottlieb Practice Final Exam Page 1 Name Operating Systems Prof. Allan Gottlieb Practice Final Exam Page 1 Name PLEASE WRITE YOUR NAME ON ALL SHEETS. Please start your answer for each question on the sheet where the question appears. You may

More information

SAMPLE MIDTERM QUESTIONS

SAMPLE MIDTERM QUESTIONS SAMPLE MIDTERM QUESTIONS CS 143A Notes: 1. These questions are just for you to have some questions to practice. 2. There is no guarantee that there will be any similarities between these questions and

More information

Operating Systems (Classroom Practice Booklet Solutions)

Operating Systems (Classroom Practice Booklet Solutions) Operating Systems (Classroom Practice Booklet Solutions) 1. Process Management I 1. Ans: (c) 2. Ans: (c) 3. Ans: (a) Sol: Software Interrupt is generated as a result of execution of a privileged instruction.

More information

SNS COLLEGE OF ENGINEERING

SNS COLLEGE OF ENGINEERING SNS COLLEGE OF ENGINEERING Coimbatore. Department of Computer Science and Engineering Question Bank- Even Semester 2015-2016 CS6401 OPERATING SYSTEMS Unit-I OPERATING SYSTEMS OVERVIEW 1. Differentiate

More information

CS4411 Intro. to Operating Systems Final Fall points 10 pages

CS4411 Intro. to Operating Systems Final Fall points 10 pages CS44 Intro. to Operating Systems Final Exam Fall 9 CS44 Intro. to Operating Systems Final Fall 9 points pages Name: Most of the following questions only require very short answers. Usually a few sentences

More information

DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING UNIT I

DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING UNIT I DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING Year and Semester : II / IV Subject Code : CS6401 Subject Name : Operating System Degree and Branch : B.E CSE UNIT I 1. Define system process 2. What is an

More information

SYED AMMAL ENGINEERING COLLEGE CS6401- OPERATING SYSTEM

SYED AMMAL ENGINEERING COLLEGE CS6401- OPERATING SYSTEM Part-A SYED AMMAL ENGINEERING COLLEGE 1. What is an Operating system? CS6401- OPERATING SYSTEM QUESTION BANK UNIT-I 2. List the services provided by an Operating System? 3. What is the Kernel? 4. What

More information

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

CMPS 111 Spring 2003 Midterm Exam May 8, Name: ID: CMPS 111 Spring 2003 Midterm Exam May 8, 2003 Name: ID: This is a closed note, closed book exam. There are 20 multiple choice questions and 5 short answer questions. Plan your time accordingly. Part I:

More information

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

CSC Operating Systems Spring Lecture - XII Midterm Review. Tevfik Ko!ar. Louisiana State University. March 4 th, 2008. CSC 4103 - Operating Systems Spring 2008 Lecture - XII Midterm Review Tevfik Ko!ar Louisiana State University March 4 th, 2008 1 I/O Structure After I/O starts, control returns to user program only upon

More information

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

OPERATING SYSTEMS FINAL EXAMINATION APRIL 30, 2006 ANSWER ALL OF THE QUESTIONS BELOW. OPERATING SYSTEMS FINAL EXAMINATION APRIL 30, 2006 Name ANSWER ALL OF THE QUESTIONS BELOW. 1. Indicate which of the statements below are true or false and EXPLAIN your answer in ONE SENTENCE. a) A multi-level

More information

TDDB68 Processprogrammering och operativsystem / Concurrent programming and operating systems

TDDB68 Processprogrammering och operativsystem / Concurrent programming and operating systems TENTAMEN / EXAM TDDB68 Processprogrammering och operativsystem / Concurrent programming and operating systems 2017-06-05 Examiner: Mikael Asplund (0700895827) Hjälpmedel / Admitted material: Engelsk ordbok

More information

CS 322 Operating Systems Practice Midterm Questions

CS 322 Operating Systems Practice Midterm Questions ! CS 322 Operating Systems 1. Processes go through the following states in their lifetime. time slice ends Consider the following events and answer the questions that follow. Assume there are 5 processes,

More information

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

CSC 716 Advanced Operating System Fall 2007 Exam 1. Answer all the questions. The maximum credit for each question is as shown. CSC 716 Advanced Operating System Fall 2007 Exam 1 Answer all the questions. The maximum credit for each question is as shown. 1. (15) Multiple Choice(3 points for each): 1) Which of the following statement

More information

CS 370 Operating Systems

CS 370 Operating Systems NAME S.ID. # CS 370 Operating Systems Mid-term Example Instructions: The exam time is 50 minutes. CLOSED BOOK. 1. [24 pts] Multiple choice. Check one. a. Multiprogramming is: An executable program that

More information

CS 571 Operating Systems. Midterm Review. Angelos Stavrou, George Mason University

CS 571 Operating Systems. Midterm Review. Angelos Stavrou, George Mason University CS 571 Operating Systems Midterm Review Angelos Stavrou, George Mason University Class Midterm: Grading 2 Grading Midterm: 25% Theory Part 60% (1h 30m) Programming Part 40% (1h) Theory Part (Closed Books):

More information

CS Operating system Summer Midterm I -- July 11, 2017 You have 115 min (10:00am-11:55pm). Good Luck!

CS Operating system Summer Midterm I -- July 11, 2017 You have 115 min (10:00am-11:55pm). Good Luck! Name / ID (please PRINT) Seq#: Seat #: CS 3733.001 -- Operating system Summer 2017 -- Midterm I -- July 11, 2017 You have 115 min (10:00am-11:55pm). Good Luck! This is a closed book/note examination. But

More information

Operating Systems: Quiz2 December 15, Class: No. Name:

Operating Systems: Quiz2 December 15, Class: No. Name: Operating Systems: Quiz2 December 15, 2006 Class: No. Name: Part I (30%) Multiple Choice Each of the following questions has only one correct answer. Fill the correct one in the blank in front of each

More information

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

Delhi Noida Bhopal Hyderabad Jaipur Lucknow Indore Pune Bhubaneswar Kolkata Patna Web:     Ph: Serial :. T_CS_A_Operating System_ Delhi Noida Bhopal yderabad Jaipur Lucknow Indore une Bhubaneswar Kolkata atna Web: E-mail: info@madeeasy.in h: - CLASS TEST - COMUTER SCIENCE & IT Subject : Operating

More information

TENTAMEN / EXAM. TDDB68 / TDDB72 Processprogrammering och operativsystem / Concurrent programming and operating systems 14 jan 2009, 08:00 12:00 TER2

TENTAMEN / EXAM. TDDB68 / TDDB72 Processprogrammering och operativsystem / Concurrent programming and operating systems 14 jan 2009, 08:00 12:00 TER2 Linköpings universitet IDA Department of Computer and Information Sciences Prof. Dr. Christoph Kessler TENTAMEN / EXAM TDDB68 / TDDB72 Processprogrammering och operativsystem / Concurrent programming and

More information

FCM 710: Architecture of Secure Operating Systems

FCM 710: Architecture of Secure Operating Systems FCM 710: Architecture of Secure Operating Systems Practice Exam, Spring 2010 Email your answer to ssengupta@jjay.cuny.edu March 16, 2010 Instructor: Shamik Sengupta This is a sample question pool for your

More information

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

Class average is Undergraduates are performing better. Working with low-level microcontroller timers Student feedback Low grades of the midterm exam Class average is 86.16 Undergraduates are performing better Cheat sheet on the final exam? You will be allowed to bring one page of cheat sheet to the final

More information

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

INSTITUTE OF AERONAUTICAL ENGINEERING Dundigal, Hyderabad COMPUTER SCIENCE AND ENGINEERING QUESTION BANK OPERATING SYSTEMS INSTITUTE OF AERONAUTICAL ENGINEERING Dundigal, Hyderabad - 500 043 COMPUTER SCIENCE AND ENGINEERING QUESTION BANK Title Code Regulation Structure Coordinator Team of Instructors OPERATING SYSTEMS A50510

More information

STUDENT NAME: STUDENT ID: Problem 1 Problem 2 Problem 3 Problem 4 Problem 5 Total

STUDENT NAME: STUDENT ID: Problem 1 Problem 2 Problem 3 Problem 4 Problem 5 Total University of Minnesota Department of Computer Science & Engineering CSci 5103 - Fall 2018 (Instructor: Tripathi) Midterm Exam 1 Date: October 18, 2018 (1:00 2:15 pm) (Time: 75 minutes) Total Points 100

More information

CS370 Operating Systems

CS370 Operating Systems CS370 Operating Systems Colorado State University Yashwant K Malaiya Fall 2016 Lecture 32 Virtual Memory Slides based on Text by Silberschatz, Galvin, Gagne Various sources 1 1 Questions for you What is

More information

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

Sample Questions. Amir H. Payberah. Amirkabir University of Technology (Tehran Polytechnic) Sample Questions Amir H. Payberah amir@sics.se Amirkabir University of Technology (Tehran Polytechnic) Amir H. Payberah (Tehran Polytechnic) Sample Questions 1393/8/10 1 / 29 Question 1 Suppose a thread

More information

CS370 Operating Systems

CS370 Operating Systems CS370 Operating Systems Colorado State University Yashwant K Malaiya Fall 2017 Lecture 9 Slides based on Text by Silberschatz, Galvin, Gagne Various sources 1 1 CPU Scheduling: Objectives CPU scheduling,

More information

Chapter 6: CPU Scheduling

Chapter 6: CPU Scheduling Chapter 6: CPU Scheduling Silberschatz, Galvin and Gagne Histogram of CPU-burst Times 6.2 Silberschatz, Galvin and Gagne Alternating Sequence of CPU And I/O Bursts 6.3 Silberschatz, Galvin and Gagne CPU

More information

COMP 300E Operating Systems Fall Semester 2011 Midterm Examination SAMPLE. Name: Student ID:

COMP 300E Operating Systems Fall Semester 2011 Midterm Examination SAMPLE. Name: Student ID: COMP 300E Operating Systems Fall Semester 2011 Midterm Examination SAMPLE Time/Date: 5:30 6:30 pm Oct 19, 2011 (Wed) Name: Student ID: 1. Short Q&A 1.1 Explain the convoy effect with FCFS scheduling algorithm.

More information

Last Class: Synchronization Problems. Need to hold multiple resources to perform task. CS377: Operating Systems. Real-world Examples

Last Class: Synchronization Problems. Need to hold multiple resources to perform task. CS377: Operating Systems. Real-world Examples Last Class: Synchronization Problems Reader Writer Multiple readers, single writer In practice, use read-write locks Dining Philosophers Need to hold multiple resources to perform task Lecture 10, page

More information

CSE 410 Final Exam Sample Solution 6/08/10

CSE 410 Final Exam Sample Solution 6/08/10 Question 1. (12 points) (caches) (a) One choice in designing cache memories is to pick a block size. Which of the following do you think would be the most reasonable size for cache blocks on a computer

More information

CSE 4/521 Introduction to Operating Systems

CSE 4/521 Introduction to Operating Systems CSE 4/521 Introduction to Operating Systems Lecture 9 CPU Scheduling II (Scheduling Algorithms, Thread Scheduling, Real-time CPU Scheduling) Summer 2018 Overview Objective: 1. To describe priority scheduling

More information

1. [Lock, Monitor and Deadlock: 5 Lectures (=26%)] 16 Marks [ ]

1. [Lock, Monitor and Deadlock: 5 Lectures (=26%)] 16 Marks [ ] INDIAN INSTITUTE OF TECHNOLOGY GUWAHATI Computer Science and Engineering Course: CS341 (Operating System), End-Semester Exam Date: 21 st Nov 2014 Timing: 1.00PM-4.00PM Full Marks: 60 1. [Lock, Monitor

More information

Indian Institute of Technology, Kharagpur

Indian Institute of Technology, Kharagpur 1 Indian Institute of Technology, Kharagpur End-Spring Semester 2017-18 Date of Examination: 24-04-2018 Session: AN (2-5 pm) Duration: 3 hrs Subject No.: CS31702 Subject: COMPUTER ARCHITECTURE AND OPERATING

More information

Operating Systems. Engr. Abdul-Rahman Mahmood MS, PMP, MCP, QMR(ISO9001:2000) alphapeeler.sf.net/pubkeys/pkey.htm

Operating Systems. Engr. Abdul-Rahman Mahmood MS, PMP, MCP, QMR(ISO9001:2000) alphapeeler.sf.net/pubkeys/pkey.htm Operating Systems Engr. Abdul-Rahman Mahmood MS, PMP, MCP, QMR(ISO9001:2000) armahmood786@yahoo.com alphasecure@gmail.com alphapeeler.sf.net/pubkeys/pkey.htm http://alphapeeler.sourceforge.net pk.linkedin.com/in/armahmood

More information

CPU Scheduling. Basic Concepts. Histogram of CPU-burst Times. Dispatcher. CPU Scheduler. Alternating Sequence of CPU and I/O Bursts

CPU Scheduling. Basic Concepts. Histogram of CPU-burst Times. Dispatcher. CPU Scheduler. Alternating Sequence of CPU and I/O Bursts CS307 Basic Concepts Maximize CPU utilization obtained with multiprogramming CPU Scheduling CPU I/O Burst Cycle Process execution consists of a cycle of CPU execution and I/O wait CPU burst distribution

More information

Student Name: University of California at Berkeley College of Engineering Department of Electrical Engineering and Computer Science

Student Name: University of California at Berkeley College of Engineering Department of Electrical Engineering and Computer Science University of California at Berkeley College of Engineering Department of Electrical Engineering and Computer Science CS 162 Spring 2011 I. Stoica FIRST MIDTERM EXAMINATION Wednesday, March 9, 2011 INSTRUCTIONS

More information

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

B. V. Patel Institute of Business Management, Computer &Information Technology, UTU BCA-3 rd Semester 030010304-Fundamentals Of Operating Systems Unit: 1 Introduction Short Answer Questions : 1. State two ways of process communication. 2. State any two uses of operating system according

More information

Memory Management. Virtual Memory. By : Kaushik Vaghani. Prepared By : Kaushik Vaghani

Memory Management. Virtual Memory. By : Kaushik Vaghani. Prepared By : Kaushik Vaghani Memory Management Virtual Memory By : Kaushik Vaghani Virtual Memory Background Page Fault Dirty Page / Dirty Bit Demand Paging Copy-on-Write Page Replacement Objectives To describe the benefits of a virtual

More information

OPERATING SYSTEMS CS3502 Spring Processor Scheduling. Chapter 5

OPERATING SYSTEMS CS3502 Spring Processor Scheduling. Chapter 5 OPERATING SYSTEMS CS3502 Spring 2018 Processor Scheduling Chapter 5 Goals of Processor Scheduling Scheduling is the sharing of the CPU among the processes in the ready queue The critical activities are:

More information

Job Scheduling. CS170 Fall 2018

Job Scheduling. CS170 Fall 2018 Job Scheduling CS170 Fall 2018 What to Learn? Algorithms of job scheduling, which maximizes CPU utilization obtained with multiprogramming Select from ready processes and allocates the CPU to one of them

More information

Second Midterm Exam March 21, 2017 CS162 Operating Systems

Second Midterm Exam March 21, 2017 CS162 Operating Systems University of California, Berkeley College of Engineering Computer Science Division EECS Spring 2017 Ion Stoica Second Midterm Exam March 21, 2017 CS162 Operating Systems Your Name: SID AND 162 Login:

More information

Chapter 5 CPU scheduling

Chapter 5 CPU scheduling Chapter 5 CPU scheduling Contents Basic Concepts Scheduling Criteria Scheduling Algorithms Multiple-Processor Scheduling Real-Time Scheduling Thread Scheduling Operating Systems Examples Java Thread Scheduling

More information

CHAPTER 2: PROCESS MANAGEMENT

CHAPTER 2: PROCESS MANAGEMENT 1 CHAPTER 2: PROCESS MANAGEMENT Slides by: Ms. Shree Jaswal TOPICS TO BE COVERED Process description: Process, Process States, Process Control Block (PCB), Threads, Thread management. Process Scheduling:

More information

Page Replacement. 3/9/07 CSE 30341: Operating Systems Principles

Page Replacement. 3/9/07 CSE 30341: Operating Systems Principles Page Replacement page 1 Page Replacement Algorithms Want lowest page-fault rate Evaluate algorithm by running it on a particular string of memory references (reference string) and computing the number

More information

CS370 Operating Systems

CS370 Operating Systems CS370 Operating Systems Colorado State University Yashwant K Malaiya Spring 2018 L20 Virtual Memory Slides based on Text by Silberschatz, Galvin, Gagne Various sources 1 1 Questions from last time Page

More information

Virtual Memory Outline

Virtual Memory Outline Virtual Memory Outline Background Demand Paging Copy-on-Write Page Replacement Allocation of Frames Thrashing Memory-Mapped Files Allocating Kernel Memory Other Considerations Operating-System Examples

More information

412-S12 (shankar) Exam 2 SOLUTION Page 1 of 5. 5 problems. 50 points total. Closed book, closed notes, no electronic devices. Write your name above.

412-S12 (shankar) Exam 2 SOLUTION Page 1 of 5. 5 problems. 50 points total. Closed book, closed notes, no electronic devices. Write your name above. 42-S2 (shankar) Exam 2 SOLUTION Page of 5 5 problems. 50 points total. Closed book, closed notes, no electronic devices. Write your name above.. [0 points] In GeekOS project 4, if a user thread makes a

More information

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

Techno India Batanagar Department of Computer Science & Engineering. Model Questions. Multiple Choice Questions: Techno India Batanagar Department of Computer Science & Engineering Model Questions Subject Name: Operating System Multiple Choice Questions: Subject Code: CS603 1) Shell is the exclusive feature of a)

More information

PESIT SOUTHCAMPUS. Question Bank

PESIT SOUTHCAMPUS. Question Bank Faculty:Sudhakar No. Of Hours:2 Question Bank UNIT : INTRODUCTION TO OPERATING SYSTEMS & THEIR CLASSIFICATION Objective: The main objective of this chapter is to study the Operating system basics & Classifications..

More information

Operating Systems and Networks Course: International University Bremen Date: Dr. Jürgen Schönwälder Deadline:

Operating Systems and Networks Course: International University Bremen Date: Dr. Jürgen Schönwälder Deadline: Operating Systems and Networks Course: 320202 International University Bremen Date: 2004-03-26 Dr. Jürgen Schönwälder Deadline: 2004-03-26 Midterm Examination Problem M.1: processes (10 points) Indicate

More information

CS153: Midterm (Winter 19)

CS153: Midterm (Winter 19) CS153: Midterm (Winter 19) Name: Student ID: Answer all questions. State any assumptions clearly. Problem 1: (24 points; 5 minutes) Indicate whether each of the following statements is true or false: (T)

More information

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

Preview. Process Scheduler. Process Scheduling Algorithms for Batch System. Process Scheduling Algorithms for Interactive System Preview Process Scheduler Short Term Scheduler Long Term Scheduler Process Scheduling Algorithms for Batch System First Come First Serve Shortest Job First Shortest Remaining Job First Process Scheduling

More information

R13 SET - 1 2. Answering the question in Part-A is compulsory 1 a) Define Operating System. List out the objectives of an operating system. [3M] b) Describe different attributes of the process. [4M] c)

More information

FCM 710: Architecture of Secure Operating Systems

FCM 710: Architecture of Secure Operating Systems FCM 710: Architecture of Secure Operating Systems Practice Exam, Spring 2010 Email your answer to ssengupta@jjay.cuny.edu March 16, 2010 Instructor: Shamik Sengupta Multiple-Choice 1. operating systems

More information

Midterm Exam. October 20th, Thursday NSC

Midterm Exam. October 20th, Thursday NSC CSE 421/521 - Operating Systems Fall 2011 Lecture - XIV Midterm Review Tevfik Koşar University at Buffalo October 18 th, 2011 1 Midterm Exam October 20th, Thursday 9:30am-10:50am @215 NSC Chapters included

More information

TENTAMEN / EXAM. TDDB68 Processprogrammering och operativsystem / Concurrent programming and operating systems

TENTAMEN / EXAM. TDDB68 Processprogrammering och operativsystem / Concurrent programming and operating systems Linköpings universitet IDA Department of Computer and Information Sciences Doc. Christoph Kessler TENTAMEN / EXAM TDDB68 Processprogrammering och operativsystem / Concurrent programming and operating systems

More information

Operating systems Portfolio

Operating systems Portfolio Operating systems Portfolio Thebault Yann Student number : 10004434 CE0100-3 Operating systems! Friday 26 November 2010 WEEK 1 6. How does the distinction between supervisor mode and user mode function

More information

Lecture 9: Midterm Review

Lecture 9: Midterm Review Project 1 Due at Midnight Lecture 9: Midterm Review CSE 120: Principles of Operating Systems Alex C. Snoeren Midterm Everything we ve covered is fair game Readings, lectures, homework, and Nachos Yes,

More information

Suggested Solutions (Midterm Exam October 27, 2005)

Suggested Solutions (Midterm Exam October 27, 2005) Suggested Solutions (Midterm Exam October 27, 2005) 1 Short Questions (4 points) Answer the following questions (True or False). Use exactly one sentence to describe why you choose your answer. Without

More information

OS Structure. User mode/ kernel mode. System call. Other concepts to know. Memory protection, privileged instructions

OS Structure. User mode/ kernel mode. System call. Other concepts to know. Memory protection, privileged instructions Midterm Review OS Structure User mode/ kernel mode Memory protection, privileged instructions System call Definition, examples, how it works? Other concepts to know Monolithic kernel vs. Micro kernel 2

More information

CS Operating system

CS Operating system Name / ID (please PRINT) Seq#: Seat Number CS 3733.001 -- Operating system Spring 2017 -- Midterm II -- April 13, 2017 You have 75 min. Good Luck! This is a closed book/note examination. But You can use

More information

Chendu College of Engineering & Technology

Chendu College of Engineering & Technology Chendu College of Engineering & Technology (Approved by AICTE, New Delhi and Affiliated to Anna University) Zamin Endathur, Madurantakam, Kancheepuram District 603311 +91-44-27540091/92 www.ccet.org.in

More information

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

King Fahd University of Petroleum and Minerals. Write clearly, precisely, and briefly!! 1 King Fahd University of Petroleum and Minerals Information and Computer Science Department ICS 431: Operating System FINAL EXAM DO NOT OPEN UNTIL INSTRUCTED TO DO SO!!!! Write clearly, precisely, and

More information

Filesystems (just a bit): File allocation tables, free-bitmaps, free-lists, inodes, and performance considerations.

Filesystems (just a bit): File allocation tables, free-bitmaps, free-lists, inodes, and performance considerations. CSCI 346 Final Exam Review Questions -- Solutions The final exam will be Tuesday, May 17, 11:30-2:00 PM, in Swords 328. If you have not made arrangements with me and confirmed by email, you must take the

More information

by Marina Cholakyan, Hyduke Noshadi, Sepehr Sahba and Young Cha

by Marina Cholakyan, Hyduke Noshadi, Sepehr Sahba and Young Cha CS 111 Scribe Notes for 4/11/05 by Marina Cholakyan, Hyduke Noshadi, Sepehr Sahba and Young Cha Processes What is a process? A process is a running instance of a program. The Web browser you're using to

More information

Subject Teacher: Prof. Sheela Bankar

Subject Teacher: Prof. Sheela Bankar Peoples Empowerment Group ISB&M SCHOOL OF TECHNOLOGY, NANDE, PUNE DEPARTMENT OF COMPUTER ENGINEERING Academic Year 2017-18 Subject: SP&OS Class: T.E. computer Subject Teacher: Prof. Sheela Bankar 1. Explain

More information

Ph.D. Programme in Computer Science. Model Question Paper RESEARCH APTITUDE ASSESSMENT TEST. Time : 2 Hours Max. Marks : 75

Ph.D. Programme in Computer Science. Model Question Paper RESEARCH APTITUDE ASSESSMENT TEST. Time : 2 Hours Max. Marks : 75 Ph.D. Programme in Computer Science Model Question Paper RESEARCH APTITUDE ASSESSMENT TEST : 2 Hours Max. Marks : 75 I. Part A: Multiple Choice Questions 30 x 1 mark = 30 marks Choose the correct Response

More information

CSI3131 Final Exam Review

CSI3131 Final Exam Review CSI3131 Final Exam Review Final Exam: When: April 24, 2015 2:00 PM Where: SMD 425 File Systems I/O Hard Drive Virtual Memory Swap Memory Storage and I/O Introduction CSI3131 Topics Process Computing Systems

More information

Chapter 6: CPU Scheduling

Chapter 6: CPU Scheduling Chapter 6: CPU Scheduling Basic Concepts Scheduling Criteria Scheduling Algorithms Multiple-Processor Scheduling Real-Time Scheduling Thread Scheduling Operating Systems Examples Java Thread Scheduling

More information

CHAPTER NO - 1 : Introduction:

CHAPTER NO - 1 : Introduction: Sr. No L.J. Institute of Engineering & Technology Semester: IV (26) Subject Name: Operating System Subject Code:21402 Faculties: Prof. Saurin Dave CHAPTER NO - 1 : Introduction: TOPIC:1 Basics of Operating

More information

York University Lassonde School of Engineering Department of Electrical Engineering and Computer Science

York University Lassonde School of Engineering Department of Electrical Engineering and Computer Science York University Lassonde School of Engineering Department of Electrical Engineering and Computer Science Midterm EECS 3221.03Z Operating Systems Fundamentals Feb 26, 2015 (14:30-16:00) Section: EECS3221Z

More information

Demand Paging. Valid-Invalid Bit. Steps in Handling a Page Fault. Page Fault. Transfer of a Paged Memory to Contiguous Disk Space

Demand Paging. Valid-Invalid Bit. Steps in Handling a Page Fault. Page Fault. Transfer of a Paged Memory to Contiguous Disk Space Demand Paging Transfer of a Paged Memory to Contiguous Disk Space Bring a page into memory only when it is needed. Less I/O needed Less memory needed Faster response More users Page is needed reference

More information

Operating System Review Part

Operating System Review Part Operating System Review Part CMSC 602 Operating Systems Ju Wang, 2003 Fall Virginia Commonwealth University Review Outline Definition Memory Management Objective Paging Scheme Virtual Memory System and

More information

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

COMP SCI 3SH3: Operating System Concepts (Term 2 Winter 2006) Test 2 February 27, 2006; Time: 50 Minutes ;. Questions Instructor: Dr. COMP SCI 3SH3: Operating System Concepts (Term 2 Winter 2006) Test 2 February 27, 2006; Time: 50 Minutes ;. Questions Instructor: Dr. Kamran Sartipi Name: Student ID: Question 1 (Disk Block Allocation):

More information

Chapter 5: CPU Scheduling

Chapter 5: CPU Scheduling COP 4610: Introduction to Operating Systems (Fall 2016) Chapter 5: CPU Scheduling Zhi Wang Florida State University Contents Basic concepts Scheduling criteria Scheduling algorithms Thread scheduling Multiple-processor

More information

OPERATING SYSTEMS. UNIT II Sections A, B & D. An operating system executes a variety of programs:

OPERATING SYSTEMS. UNIT II Sections A, B & D. An operating system executes a variety of programs: OPERATING SYSTEMS UNIT II Sections A, B & D PREPARED BY ANIL KUMAR PRATHIPATI, ASST. PROF., DEPARTMENT OF CSE. PROCESS CONCEPT An operating system executes a variety of programs: Batch system jobs Time-shared

More information

OS Structure. User mode/ kernel mode (Dual-Mode) Memory protection, privileged instructions. Definition, examples, how it works?

OS Structure. User mode/ kernel mode (Dual-Mode) Memory protection, privileged instructions. Definition, examples, how it works? Midterm Review OS Structure User mode/ kernel mode (Dual-Mode) Memory protection, privileged instructions System call Definition, examples, how it works? Other concepts to know Monolithic kernel vs. Micro

More information

COMP 3361: Operating Systems 1 Final Exam Winter 2009

COMP 3361: Operating Systems 1 Final Exam Winter 2009 COMP 3361: Operating Systems 1 Final Exam Winter 2009 Name: Instructions This is an open book exam. The exam is worth 100 points, and each question indicates how many points it is worth. Read the exam

More information

Introduction Programmer Interface User Interface Process Management Memory Management File System I/O System Interprocess Communication

Introduction Programmer Interface User Interface Process Management Memory Management File System I/O System Interprocess Communication UNIX Introduction Programmer Interface User Interface Process Management Memory Management File System I/O System Interprocess Communication 30 Process Management How to represent a process for Process

More information

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

Memory Management. 3. What two registers can be used to provide a simple form of memory protection? Base register Limit Register Memory Management 1. Describe the sequence of instruction-execution life cycle? A typical instruction-execution life cycle: Fetches (load) an instruction from specific memory address. Decode the instruction

More information