Memory Layout for a Simple Batch System

Similar documents
Module 1: Introduction

Last Class: OS and Computer Architecture. Last Class: OS and Computer Architecture

Module 1: Introduction. What is an Operating System?

CSC 453 Operating Systems

Chapter 1: Introduction

Last class: OS and Architecture. OS and Computer Architecture

Last class: OS and Architecture. Chapter 3: Operating-System Structures. OS and Computer Architecture. Common System Components

OS and Computer Architecture. Chapter 3: Operating-System Structures. Common System Components. Process Management

OS structure. Process management. Major OS components. CSE 451: Operating Systems Spring Module 3 Operating System Components and Structure

Chapter 1 Introduction

Operating System. Operating Systems Structure Chapter 2. Services Provided by the OS. Evolution of an Operating System

TYPES OF OPERATING SYSTEMS. Dimple Juneja

Operating System Services

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

Operating Systems CS3502 Spring 2018

Introduction to Computer Systems and Operating Systems

Chapter 3: Operating-System Structures

Unit 1: Introduction to OS

Unit 2 : Computer and Operating System Structure

Introduction to Operating Systems (Part II)

Chapter 2 Operating-System Structures

OPERATING SYSTEMS UNIT - 1

Lecture 2 - Fundamental Concepts

Operating System - Overview

Operating Systems, Fall

Master level: Operating systems, distributed systems, networking,

Chapter 3: Operating-System Structures

Chapter 2: Operating-System Structures. Operating System Concepts 8 th Edition

OPERATING SYSTEM. Functions of Operating System:

UNIT 2. OPERATING SYSTEM STRUCTURES

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

Chapter 2: Operating-System Structures

Operating- System Structures

SYSTEM PROGRAMMING & SYSTEM ADMINISTRATION SECTION -A

Contents. Today's Topic: Introduction to Operating Systems

Introduction. What is an Operating System? A Modern Computer System. Computer System Components. What is an Operating System?

Table of Contents 1. OPERATING SYSTEM OVERVIEW OPERATING SYSTEM TYPES OPERATING SYSTEM SERVICES Definition...

Operating Systems. Operating System Structure. Lecture 2 Michael O Boyle

Software Concepts. It is a translator that converts high level language to machine level language.

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

Some popular Operating Systems include Linux Operating System, Windows Operating System, VMS, OS/400, AIX, z/os, etc.

PROCESSES & THREADS. Charles Abzug, Ph.D. Department of Computer Science James Madison University Harrisonburg, VA Charles Abzug

Operating-System Structures

Introduction to Operating System. Dr. Aarti Singh Professor MMICT&BM MMU

Chapter 2: Operating-System Structures

Operating Systems. studykorner.org

What are some common categories of system calls? What are common ways of structuring an OS? What are the principles behind OS design and

MARUTHI SCHOOL OF BANKING (MSB)

Introduction. Operating Systems. Introduction. Introduction. Introduction

UNIT 1 JAGANNATH UNIVERSITY UNIT 2. Define Operating system and its functions. Explain different types of Operating System

Introduction To Operating System

Chapter 2: Operating-System Structures

Computer-System Architecture (cont.) Symmetrically Constructed Clusters (cont.) Advantages: 1. Greater computational power by running applications

COS 318: Operating Systems. Overview. Jaswinder Pal Singh Computer Science Department Princeton University

What is an Operating System? A Whirlwind Tour of Operating Systems. How did OS evolve? How did OS evolve?

Computer Fundamentals : Pradeep K. Sinha& Priti Sinha

OS concepts and structure. q OS components & interconnects q Structuring OSs q Next time: Processes

Chapter 1: Introduction

Embedded Linux Architecture

2. The system of... generally ran one job at a time. These were called single stream batch processing.

Some popular Operating Systems include Linux Operating System, Windows Operating System, VMS, OS/400, AIX, z/os, etc.

Chapter 2: Operating-System Structures. Chapter 2: Operating-System Structures. Objectives. Operating System Services

Module 3: Operating-System Structures. Common System Components

Introduction. CS3026 Operating Systems Lecture 01

AC59/AT59/AC110/AT110 OPERATING SYSTEMS & SYSTEMS SOFTWARE DEC 2015

OPERATING SYSTEM. PREPARED BY : DHAVAL R. PATEL Page 1. Q.1 Explain Memory

1. Operating System Concepts

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

CS420: Operating Systems. OS Services & System Calls

Chapter 3: Operating-System Structures

OPERATING SYSTEMS. COMS W1001 Introduction to Information Science. Boyi Xie

Preview. The Thread Model Motivation of Threads Benefits of Threads Implementation of Thread

Announcements. Reading. Project #1 due in 1 week at 5:00 pm Scheduling Chapter 6 (6 th ed) or Chapter 5 (8 th ed) CMSC 412 S14 (lect 5)

Operating Systems Overview. Chapter 2

Abstractions and Reality

EECS 3221 Operating System Fundamentals

Operating Systems (2INC0) 2018/19. Introduction (01) Dr. Tanir Ozcelebi. Courtesy of Prof. Dr. Johan Lukkien. System Architecture and Networking Group

EECS 3221 Operating System Fundamentals

OS - Introduction Ezio Bartocci Institute for Computer Engineering

! Software ( kernel ) that runs at all times. ! OS performs two unrelated functions: Maria Hybinette, UGA. user! 1! Maria Hybinette, UGA. user! n!

EEE 435 Principles of Operating Systems

Chapter 2: Operating-System Structures

ELEC 377 Operating Systems. Week 1 Class 2

Processes and Threads

System Call. Preview. System Call. System Call. System Call 9/7/2018

Module 3: Operating-System Structures

Operating Systems Fundamentals. What is an Operating System? Focus. Computer System Components. Chapter 1: Introduction

CHAPTER-1: INTRODUCTION TO OPERATING SYSTEM:

CSCE 313 Introduction to Computer Systems. Instructor: Dezhen Song Spring 2015

Operating System Support

Operating Systems Course 2 nd semester 2016/2017 Chapter 1: Introduction

Chapter 1: Introduction

Chapter 14 Operating Systems

Chapter 14 Operating Systems

File Systems. OS Overview I/O. Swap. Management. Operations CPU. Hard Drive. Management. Memory. Hard Drive. CSI3131 Topics. Structure.

CS 390 Chapter 2 Homework Solutions

1.Explain with the diagram IVT of 80X86. Ans-

CSCE-313 Introduction to Computer Systems

Four Components of a Computer System

Topics. Operating System. What is an Operating System? Let s Get Started! What is an Operating System? Where in the Book are we?

Transcription:

G. S. Mandal s MARATHWADA INSTITUTE OF TECHNOLOGY Affiliated to Dr. Babasaheb Ambedkar Marathwada Universtiy, Aurangabad. Department of Computer Science & Engineering Third Year Engineering Academic Year: 2017-18 (Semester-I) Course: Operating System (CSE 301) Q.1 a) Simple Batch Systems Model Answer Paper for Unit Test 1 Memory Layout for a Simple Batch System The first Batch OS was developed in the mid-1950s by General motors for use on IBM 701. Use of Monitor is the central idea. User no longer has direct access to the processor. User submits the job on cards or tape to a operator. Operator batches the jobs and places the batch on an input device, for use by the monitor. Reduce setup time by batching similar jobs Automatic job sequencing automatically transfers control from one job to another. First rudimentary operating system. Resident monitor

initial control in monitor control transfers to job when job completes control transfers back to monitor Advantage The Simple batch system improves utilization of the computer. Disadvantage Some main memory is now occupied by monitor. Some processor time is consumed by the monitor. Q.1 b) Ans Smart Card Operating Systems The smallest OS run on smart cards, containing a CPU chip. They have very severe processing power and memory constraints. They can handle a single function such as electronic payments. Often these are proprietary systems. Some are powered by contacts in the reader and some are inductively powered. Some smart cards are Java oriented. ROM holds an interpreter for the JVM. Java applets (small programs) are downloaded to the card and are interpreted by the JVM interpreter. Resource mgmt. and protection are an issue sometimes. Q.1 C) Ans Thread 1. Threads are used for small tasks 1. A program in execution is known as 2. Thread is a lightweight process 3. es are used for more heavyweight tasks 4. Threads within the same process share the same address space 3. Different processes do not. Q.1 D) Ans Race conditions are a result of uncontrolled access to shared data. A condition in which the value of a shared data item d s resulting from execution of operations ai and aj on ds in interacting processes may be different from both fi(fj(ds)) and fj(fi(ds)).

working together may share data, that may be in main memory or a share file. e.g. A print spooler When process wants to print a file, it enters a file name in spooler directory. Printer daemon process periodically checks directory for file name, which are to be printed. If available, print them and remove their names from directory. e.g. A spooler directory has many slots and 2 shared variable in & out Two variables are kept on a two word file available to all process. A reads in and stores its value in local variable next_free_slot which is 7. Clock interrupt occurred. B started running reads in=7, puts its file there and calculate new in=8 After some time A starts, already read value of in which is 7, update contexts at location 7 and calculates in=8. Situations like this, where two or more processes are reading or writing some shared data and the final result depends on who runs precisely when are called race condition. Q.2 Ans A request that a program makes to the kernel through a software interrupt. System calls is the interface users contact with OS and hardware. System calls vary from system to system, but the underlying concepts are similar. These calls are generally available as routines written in C and C++. Low level tasks may need to be written using assembly-language instructions.

Figure indicates steps in making the system call read(fd, buffer, nbytes).

Q.2 b) ANS 1. Monolithic Operating system structure is- A basic structure for the Operating system: 1. A main program that invokes the requested service procedure. 2. A set of service procedures that carry out the system calls. 3. A set of utility procedures that help the service procedures. For each system call, there is one service procedure that takes care of it and executes it. The utility procedures do things that are needed by several service procedures. Core OS is loaded when the computer is booted, extensions such as I/O device drivers and file systems are loaded on demand. Early operating systems had a monolithic structure. The entire OS runs as a single program in kernel mode. The OS is written as a collection of procedures, linked together into a single large executable binary program. Each procedure is free to call any other one. One first compiles all the individual procedures or files and then binds them all together into a single executable file using the system linker. The services provided by the OS are requested by putting the parameters in a welldefined place (e.g. stack) and then executing a trap instruction.

2. Layered Operating System structure Figure: - Structure of the THE operating system. It attacks the complexity and cost of developing and maintaining an OS. A routine situated in one layer does not know data structures or instructions in the lower layer. Information hiding also implies that an OS layer may be modified without affecting other layers. This structure simplify testing, debugging, modification of an OS. Three problems of layered design The operation of a system may be slowed down by the layered structure. Every layer must provide all features and facilities to above layer. This poses a problem in ordering of layers. The stratification of OS functionalities. A new functionality requires new code to be added in many layers of the OS which in turn may require changes in the layer interfaces. Layered strucuture does not guarantee high portability. Q.3 a) Ans A process is a program in execution. A program becomes a process when an executable file is loaded into memory. A process is an active entity. PC specifying the next instruction to execute and a set of associated resources. Two processes may be associated with the same program. Although the text sections are equivalent the data, heap and stack sections vary.

States: - Figure in memory

As a process executes, it changes state new: The process is being created. running: Instructions are being executed. waiting: The process is waiting for some event to occur. ready: The process is waiting to be assigned to a process. terminated: The process has finished execution. Q.3 b) ANS B.T. P1 10 P2 1 P3 2 P4 1 P5 5 1. FCFS - P1 P2 P3 P4 P5 0 10 11 13 14 19 2. SJF - P2 P4 P3 P5 P1 0 1 2 4 9 19 FCFS: - TAT P1 10 P2 11 P3 13 P4 14 P5 19 SJF: - TAT P1 19 P2 1 P3 4 P4 2 P5 9

WT process FCFS SJF P1 0 9 P2 10 0 P3 11 2 P4 13 1 P5 14 4 Awt 9.6 3.2