FCM 710: Architecture of Secure Operating Systems

Similar documents
FCM 710: Architecture of Secure Operating Systems

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

CPU Scheduling Algorithms

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

Lecture 5 / Chapter 6 (CPU Scheduling) Basic Concepts. Scheduling Criteria Scheduling Algorithms

Properties of Processes

Chapter 5: CPU Scheduling

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

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

Chapter 6: CPU Scheduling

Assignment 3 (Due date: Thursday, 10/15/2009, in class) Part One: Provide brief answers to the following Chapter Exercises questions:

Ch 4 : CPU scheduling

OPERATING SYSTEMS CS3502 Spring Processor Scheduling. Chapter 5

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

1.1 CPU I/O Burst Cycle

CPU Scheduling. Daniel Mosse. (Most slides are from Sherif Khattab and Silberschatz, Galvin and Gagne 2013)

CHAPTER 2: PROCESS MANAGEMENT

OS Assignment II. The process of executing multiple threads simultaneously is known as multithreading.

COSC243 Part 2: Operating Systems

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

CS370 Operating Systems

Operating System Concepts Ch. 5: Scheduling

General Objectives: To understand the process management in operating system. Specific Objectives: At the end of the unit you should be able to:

King Saud University. College of Computer & Information Sciences. Information Technology Department. IT425: Operating Systems.

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

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

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

CPU Scheduling. CSE 2431: Introduction to Operating Systems Reading: Chapter 6, [OSC] (except Sections )

Lecture 2 Process Management

Chapter 6: CPU Scheduling. Operating System Concepts 9 th Edition

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

Course Syllabus. Operating Systems

Operating Systems. Figure: Process States. 1 P a g e

Midterm Exam. October 20th, Thursday NSC

Maximum CPU utilization obtained with multiprogramming. CPU I/O Burst Cycle Process execution consists of a cycle of CPU execution and I/O wait

CPU Scheduling: Objectives

CS3733: Operating Systems

Scheduling. Multi-processing. Process Characterization. time. ...makes use of idle. COS450-F18-05-Scheduling - October 8, 2018

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

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

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

CPU Scheduling. Operating Systems (Fall/Winter 2018) Yajin Zhou ( Zhejiang University

Practice Exercises 305

Process- Concept &Process Scheduling OPERATING SYSTEMS

CPU Scheduling. Schedulers. CPSC 313: Intro to Computer Systems. Intro to Scheduling. Schedulers in the OS

Unit 3 : Process Management

CSE 4/521 Introduction to Operating Systems

Lecture 17: Threads and Scheduling. Thursday, 05 Nov 2009

So far. Next: scheduling next process from Wait to Run. 1/31/08 CSE 30341: Operating Systems Principles

Lecture Topics. Announcements. Today: Uniprocessor Scheduling (Stallings, chapter ) Next: Advanced Scheduling (Stallings, chapter

Processes. CS 475, Spring 2018 Concurrent & Distributed Systems

Chapter 5: CPU Scheduling

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

CPU scheduling. Alternating sequence of CPU and I/O bursts. P a g e 31

CS370 Operating Systems

CSE 120 Principles of Operating Systems Spring 2017

Chapter 6: CPU Scheduling. Operating System Concepts 9 th Edition

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

Job Scheduling. CS170 Fall 2018

Last Class: Processes

DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING UNIT I

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

Chapter 6: CPU Scheduling

MC7204 OPERATING SYSTEMS

Some popular Operating Systems include Linux, Unix, Windows, MS-DOS, Android, etc.

CS630 Operating System Design, First Exam, Spring 2017,

CS370: System Architecture & Software [Fall 2014] Dept. Of Computer Science, Colorado State University

Operating Systems. Lecture Process Scheduling. Golestan University. Hossein Momeni

CHAPTER NO - 1 : Introduction:

Chapter 5 CPU scheduling

Operating Systems (1DT020 & 1TT802)

CS370 Operating Systems

Titolo presentazione. Scheduling. sottotitolo A.Y Milano, XX mese 20XX ACSO Tutoring MSc Eng. Michele Zanella

CSE 153 Design of Operating Systems

Topic 4 Scheduling. The objective of multi-programming is to have some process running at all times, to maximize CPU utilization.

Chapter 5: CPU Scheduling. Operating System Concepts 8 th Edition,

Chap 7, 8: Scheduling. Dongkun Shin, SKKU

CS370 Operating Systems Midterm Review. Yashwant K Malaiya Spring 2019

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

CPU Scheduling. The scheduling problem: When do we make decision? - Have K jobs ready to run - Have N 1 CPUs - Which jobs to assign to which CPU(s)

Introduction to Operating Systems Prof. Chester Rebeiro Department of Computer Science and Engineering Indian Institute of Technology, Madras

Programming Assignment HW4: CPU Scheduling v03/17/19 6 PM Deadline March 28th, 2019, 8 PM. Late deadline with penalty March 29th, 2019, 8 PM

QUESTION BANK UNIT I

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

LECTURE 3:CPU SCHEDULING

Last class: Today: CPU Scheduling. CPU Scheduling Algorithms and Systems

CS370 Operating Systems

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

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

Student Name:.. Student ID... Course Code: CSC 227 Course Title: Semester: Fall Exercises Cover Sheet:

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

Scheduling of processes

TDIU25: Operating Systems II. Processes, Threads and Scheduling

Processes-Process Concept:

COMP 3361: Operating Systems 1 Midterm Winter 2009

CSE120 Principles of Operating Systems. Prof Yuanyuan (YY) Zhou Scheduling

CPU Scheduling. The scheduling problem: When do we make decision? - Have K jobs ready to run - Have N 1 CPUs - Which jobs to assign to which CPU(s)

Main Points of the Computer Organization and System Software Module

Comp 310 Computer Systems and Organization

Homework Assignment #5

Transcription:

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 are designed primarily to maximize resource utilization. A) PC B) Handheld computer C) Mainframe D) Network 2. A clustered system. A) gathers together multiple CPUs to accomplish computational work B) is an operating system that provides file sharing across a network C) is used when rigid time requirements are present D) can only operate one application at a time Ans: A 3. A boot block. A) typically only knows the location and length of the rest of the bootstrap program B) typically is sophisticated enough to load the operating system and begin its execution C) is composed of multiple disk blocks D) is composed of multiple disk cylinders Ans: A 4. Which of the following statements is incorrect? A) An operating system provides an environment for the execution of programs.

B) An operating system manages system resources. C) Operating systems provide both command line as well as graphical user interfaces. D) Operating systems must provide both protection and security. 5. A process control block. A) includes information on the process's state B) stores the address of the next instruction to be processed by a different process C) determines which process is to be executed next D) is an example of a process queue Ans: A 6. The list of processes waiting for a particular I/O device is called a(n). A) standby queue B) device queue C) ready queue D) interrupt queue Ans: B 7. The multithreading model multiplexes many user-level threads to a smaller or equal number of kernel threads. A) many-to-one model B) one-to-one model C) many-to-many model D) many-to-some model 8. A uses an existing thread, rather than creating a new one to complete a task. A) lightweight process B) thread pool C) scheduler activation D) asynchronous procedure call Ans: B 9. is the number of processes that are completed per time unit.

A) CPU utilization B) Response time C) Turnaround time D) Throughput Ans: D 10. scheduling is approximated by predicting the next CPU burst with an exponential average of the measured lengths of previous CPU bursts. A) Multilevel queue B) RR C) FCFS D) SJF Ans: D 11. An instruction that executes atomically. A) must consist of only one machine instruction B) executes as a single, uninterruptible unit C) cannot be used to solve the critical section problem D) All of the above Ans: B 12. In Peterson's solution, the variable indicates if a process is ready to enter its critical section. A) turn B) lock C) flag[i] D) turn[i] 13. A deadlocked state occurs whenever. A) a process is waiting for I/O to a device that does not exist B) the system has no available free resources C) every process in a set is waiting for an event that can only be caused by another process in the set D) a process is unable to release its request for a resource after use

14. In a system resource-allocation graph,. A) a directed edge from a process to a resource is called an assignment edge B) a directed edge from a resource to a process is called a request edge C) a directed edge from a process to a resource is called a request edge D) None of the above Short Answer 15. What is a bootstrap program, and where is it stored? Ans: A bootstrap program is the initial program that the computer runs when it is powered up or rebooted. It initializes all aspects of the system, from CPU registers to device controllers to memory contents. Typically, it is stored in read-only memory (ROM) or electrically erasable programmable read-only memory (EEPROM), known by the general term firmware, within the computer hardware. 16. What is cache coherency and why is it important? Ans: In multiprocessor environments, two copies of the same data may reside in the local cache of each CPU. Whenever one CPU alters the data, the cache of the other CPU must receive an updated version of this data. Cache coherency involves ensuring that multiple caches store the most updated version of the stored data. 17. In your opinion, describe some requirements, or goals, when designing an operating system. Ans: Requirements can be divided into user and system goals. Users desire a system that is convenient to use, easy to learn, and to use, reliable, safe, and fast. System goals are defined by those people who must design, create, maintain, and operate the system: The system should be easy to design, implement, and maintain; it should be flexible, reliable, error-free, and efficient. 18. Name and describe the different states that a process can exist in at any given time. Ans: The possible states of a process are: new, running, waiting, ready, and terminated. The process is created while in the new state. In the running or waiting state, the process is executing or waiting for an event to occur, respectively. The ready state occurs when the process is ready and waiting to be assigned to a processor and should not be confused with the waiting state mentioned earlier. After the process is finished executing its code, it enters the termination state.

19. What is context switch? Ans: Whenever the CPU starts executing a new process, the old process's state must be preserved. The context of a process is represented by its process control block. Switching the CPU to another process requires performing a state save of the current process and a state restore of a different process. This task is known as a context switch. When a context switch occurs, the kernel saves the context of the old process in its PCB and loads the saves context of the new process scheduled to run. 20. What is a thread pool and why is it used? Ans: A thread pool is a collection of threads, created at process startup, that sit and wait for work to be allocated to them. This allows one to place a bound on the number of concurrent threads associated with a process and reduce the overhead of creating new threads and destroying them at termination. 21. Explain the difference between response time and turnaround time. These times are both used to measure the effectiveness of scheduling schemes. Ans: Turnaround time is the sum of the periods that a process is spent waiting to get into memory, waiting in the ready queue, executing on the CPU, and doing I/O. Turnaround time essentially measures the amount of time it takes to execute a process. Response time, on the other hand, is a measure of the time that elapses between a request and the first response produced. 22. What is starvation? Ans: Starvation occurs when a process is ready to run but is stuck waiting indefinitely for the CPU. This can be caused, for example, when higher-priority processes prevent low-priority processes from ever getting the CPU. Aging involves gradually increasing the priority of a process so that a process will eventually achieve a high enough priority to execute if it waited for a long enough period of time. 23. What is the difference between deadlock prevention and deadlock avoidance? Ans: Deadlock prevention is a set of methods for ensuring that at least one of the necessary conditions for deadlock cannot hold. Deadlock avoidance requires that the operating system be given, in advance, additional information concerning which resources a process will request and use during its lifetime. 24. What is one way to ensure that a circular-wait condition does not occur?

Ans: One way to ensure that this condition never holds is to impose a total ordering of all resource types, and to require that each process requests resources in an increasing order of enumeration. This can be accomplished by assigning each resource type a unique integer number to determine whether one precedes another in the ordering. Numerical Examples 25. Suppose that there are ten resources available to three processes. At time 0, the following data is collected. The table indicates the process, the maximum number of resources needed by the process, and the number of resources currently owned by each process. Process Maximum Needs Currently Owned P 0 10 4 P 1 3 1 P 2 6 4 Is the status safe? Show your steps. Ans: It is not safe. 26. Suppose that there are 12 resources available to three processes. At time 0, the following data is collected. The table indicates the process, the maximum number of resources needed by the process, and the number of resources currently owned by each process. Process Maximum Needs Currently Owned P 0 10 4 P 1 3 2 P 2 7 4 Determine the status in terms of safety? Ans: It is safe. 27. Assume there are three resources, R 1, R 2, and R 3, that are each assigned unique integer id F(R i ) 15, 10, and 25, respectively. What is a resource ordering which prevents a circular wait? Ans: R 2, R 1, R 3

28. Consider the following set of processes with the length of the CPU-burst time given in seconds. Process Burst-time P1 10 P2 1 P3 2 P4 1 P5 5 The processes are assumed to have arrived all at time 0. a) Draw Gantt charts illustrating the execution of processes using Fist-come-first-serve (FCFS), shortest-job-first (SJF) and round-robin (RR with quantum=1) scheduling. b) What is the waiting time of each process for each of the scheduling algorithms? c) Which schedule results in the minimal average waiting time (over all processes)?