Download Os 2marks - Erode Sengunthar Engineering College

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Library (computing) wikipedia , lookup

Spring (operating system) wikipedia , lookup

RSTS/E wikipedia , lookup

DNIX wikipedia , lookup

OS 2200 wikipedia , lookup

VS/9 wikipedia , lookup

CP/M wikipedia , lookup

Unix security wikipedia , lookup

Burroughs MCP wikipedia , lookup

Paging wikipedia , lookup

Process management (computing) wikipedia , lookup

Transcript
ERODE SENGUNTHAR ENGINEERING COLLEGE
THUDUPATHI – 57.
II M.Sc(Software Engg.) IV Semester
Operating System and System Software (XSE242)
Two Marks
UNIT-I
1. Define language processor.
A language processor is software which bridges a specification or execution gap.
Specification gap is the semantic gap between two specifications of the same task.
Execution gap is the gap between the semantic of programs written in different
programming language.
2. What are the requirements of language processor?
The requirements of language processor are
 Language translator - bridges an execution gap to a machine language of a
computer
 De-translator - bridges the execution gap as the language translator but in the
reversal order.
 Pre-processor is a language processor which bridges the execution gap but not the
language translator.
 Language migratory bridges the specification gap between two phases.
3. What are the language processing activities?
The fundamental language processing activities can be divided into those that bridges
the specification gap & the execution gap.
There are two types of language processing activities. They are
 Program generation activities- Automatic generation of a program
 Program execution activities – organizes execution of program written in PL
4. Define the process in Instruction Execution Cycle and Interpretation Cycle.
Instruction Execution Cycle – Three Steps
 Fetch the instructions
 Decode the instructions
 Execute the instructions
Interpretation Cycle – Three Steps
 Fetch the statement
 Analyze the statement and determine its meaning i.e., operands and
computations to be performed
 Execute the meaning of the statement
5. What are the features of assembly language?
Assembly Language
 Machine dependent
 Low-level programming language
 Specific to certain computer system
The features of assembly language are
 Mnemonic operation code
 Symbolic Operands
 Data declaration
6. What are the types of assembly language statements?
There are three types of assembly language statements. They are
 Imperative statements – action to be performed during execution of assembled
program
 Declarative statements
DS – Declare storage – reserves areas of memory and names
DC – Declare constant – constructs memory words containing constants
 Assembler directives – Instructs assembler to perform certain actions during the
assembly of a program
7. What are the Design Specification of an assembler?
 Identify the information necessary to perform a task
 Design a suitable data structure to record the information
 Determine the processing necessary to obtain and maintain the information.
 Determine the processing necessary to perform the task.
8. What is backpatching?
LC processing and construction of the symbol table processed as in two pass
translation. The problem of forward references is tracked using a process called
backpatching.
9. How many phases are there in assembly language? What are they?
There are two phases in assembly language. They are
 Synthesis phase
 Analysis phase
10. What are the tasks performed in Analysis phase?
 Isolate the label, mnemonic opcode and operand fields of a statement
 If a label is present, enter the pair (symbol,<LC contents>) in a new entry of a
symbol table
 Check validity of mnemonic opcode through a look-up in the mnemonic table
 Perform LC processing
11. What are the tasks performed in Synthesis phase?
 Obtain the machine opcode corresponding to the mnemonic from the Mnemonics
table
 Obtain the address of a memory operand from the symbol table
 Synthesize a machine instruction or the machine form of a constant
12. Explain the task performed by the two pass assembler.
Pass I :
 Separate the symbol table, mnemonic opcode and operand fields
 Build the symbol table
 Perform LC processing
 Construct intermediate representation.
Pass II :
 Synthesize the target program.
13. Explain the advanced assembler directive.
ORIGIN
Syntax : ORIGIN <address spec>
where <address spec> is an <operand spec> or <constant>
EQU
Syntax : <Symbol> EQU <address spec>
where <address spec> is an <operand spec> or <constant>
14. What are the data structure used in Pass I assembler.
There are three types of data structure used in Pass I assembler .
They are:
OPTAB: A table of mnemonics opcodes and related information.
SYMTAB: Symbol table
LITTAB: The table of literals used in the program.
15. Explain DC statement, START and ORIGIN directives and LTORG
Statement.
DC statement:
 It must be represented in IC.
 The mnemonic field contains the pair (DL, 01).
 The operand field may contain the value of the constant in the source form or in
the
 Internal machine representation.
START and ORIGIN directives:
 These directives set new values into the LC.
 It is not necessary to retain START and ORIGIN statements in the LC if the LC
contains the address field.
LTORG statement:
 When an LTORG statement appears in the source program it assigns memory
address to the literal in the current pool.

These addresses are entered in the address field of their LITTAB entries.
16. What is Macro and Macro Expansion?
Macro : Macros are used to provide a program generation facility through macro
expansion. A macro is a unit of specification for program generation through
expansion.
Macro Expansion : A macro consists of a name, a set of formal parameters and a
body of code. The use of a Macro name with a set of actual parameter is replaced by
some code generated from its body. This is called macro expansion.
The two kinds of macro expansions are
 Lexical expansion
 Semantic expansion
UNIT -2
1. What Is An Operating System?
An Operating System Is An Important Part Of Almost Every Computer
Systems.Operating System Attempt To Schedule Computational Activity To Ensure
Good Performance Of The Computer System
2. What Are The Reasons For Building Distributed Systems?
(1) Resource Sharing
(2) Computation Speed Up
(3) Reliability
(4) Communication
3.What Are The Types Of Real Time Systems?
There Are Two Types Of Real Time Systems.Hard Real Time Systems And Soft
Real Time Systems
4.What Is Mean By Time Sharing Systems?
A Time Shared Operating System Allows The Many Users To Share The
Computer Simultaneously In A Time Shared Systems Tends To Be Short Only A Little
C.P.U Time Is Needed For Each User
5.What Is Mean By Symmetric Multiprocessing And Asymmetric Multiprocessing?
Symmetric Multiprocessing:
In Symmetric Multiprocessing Model In Which Each Processor Runs An
Identical Copy Of The Operating System And This Copies Communication With
One Another As Needed
Asymmetric Multiprocessing:
In This System Each Processor Is Assigned A Specific Task.A Master
Process Control The System The Other Processes Look To The Master For
Instruction .This Scheme Is Defined As Master Slave Relation.
6.Define Process?
A Process Is A Program In Execution. As A Process Executes It Change State.
The State Of The Process Is Defined By The Process’s Current Activity.
7.What Are The Process States?
New,Running,Waiting,Ready,Terminate.
8.What Is Mean By PCB?
Each Process Is Represented In The Operating System By A Process Control
Block(PCB) Also Called As Task Control Block.
9.What Are The Scheduling Queues?
There Are Several Queues in Scheduling
 Job Queue
 Ready Queue
 Device Queue
10.What Are The Reasons For Providing Cooperation?




Information Sharing
Computation Speed Up
Modularity
Convienience
UNIT - 3
1.Define Thread?
A Thread Sometimes Called Light Weight Process Is A Basic Unit Of C.P.U.
Utilization And Consist Of Program Counter A Register Set And A Stack Space.
2.What Are The Scheduling Algorithms?
(1) Fisrst Come First Servered Scheduling Algorithms
(2) Shortest Job First Scheduling Algorithms
(3) Priority Scheduling Algorithms
(4) Round Robin Scheduling Algorithms
(5) Multi-Level Queue Scheduling Algorithms
3. List The Scheduling Criterias?
CPU Utilization, Throughput, Turn Around Time, Waiting Time Response Time
4.Define Semaphore
The Solution Of The Critical Section Problem Is Prevented By Using This
Semaphore.A Semaphore S Is An Interger Variable Apart From Initialization Is Accessed
Only To Standard Automic Operations.
5.Define Real-Time Scheduling?
A Real Time System Is Used When There Are Rigid Time Requirements On The
Operations Of The Process Or Flow Of Data.
6.What Are The Classical Problems?
The Classical Problems Are
 The Bounded Buffer Problem
 The Readers And Writers Problem
 The Dining Philosophers Problem
7.Define Deadlocks And Starvation?
State Of Waiting For A Process That Will Never Execute Is Deadlock And The State
Of Waiting For A Process That Takes Some Time To Execute Is Starvation.
8.Define Dispature?
The Dispature Is A Module That Gives Control Of The Cpu To The Process Selected
By The Short-Term Scheduler
9.What Is Cooperating Process?
A Cooperating Process Is One That Can Affect Or Affected By The Other Process
Executing In The System.It May Be Either Directly Share A Logical Address Space.
10. What Are The Requirements For Solving The Critical Section Problems?
The Requirements for Solving Critical Section Problems Are
Mutual Exclusion, Progress, Bounded Waiting
UNIT-4
1.Define Deadlock?
A Process Request Resourses If The Resources Are Not Available At That Time
The Process Enters A Wait State It May Be Happen The Waiting Process Will Never
Again Change The State Because The Resources They Have Requested Are Held By
Other Waiting Process This Process Is Called Deadlock
2. What Are The Deadlock Arising Situations?
(1) Mutual Exclusions
(2) Hold And Wait
(3) No Preemption
(4) Circular Wait
3.What Are The Methods For Handling Deadlocks?
There Are Three Methods
(1) We Can Use A Protocol To Ensure That The System Will Never Enter
A Deadlock State
(2) We Can Allow The System To Enter A Deadlock And Then Recover
(3) We Can Ignore The Problem All Together And Pretend The Deadlocks
Never Occur In The Systems.
4.What Are The Deadlock Avoidance Algorithms?
The Deadlock Avoiding Algorithms Are
(1) Safe State
(2) Resource Allocation Graph Algorithm
(3) Banker’s Algorithm
5. Define Paging?
One Possible Solution To The External Fragmentation Is To Permit The Logical
Address Space Of A Process To Be Non-Contiguous Thus Allowing A Process To Be
Allocated Physical Memory Wherever The Latter Is Available .
6. What Is Swapping?
A Process Can Be Swapped Temporarily Out Of Memory to A Backing Store
and Then Brought Back Into Memory for Continued Execution. This Process Is
Swapping.
7. Define Contiguous Allocation?
The Main Memory Must Accommodate Both O.S. And Various User Process
the memory is usually divided into two partitions one For O.S. and other for user Process.
8. What Is Fragmentation?
A Multiprogrammed System Will Generally Perform More Efficiently With A
Higher Level Of Multiprogramming. We Must Reduce Memory Waste. This Memory
Waste Is Called Fragmentation.
9. What Is Sharing?
Another Means for Increasing The Multiprogramming Level Is To Share
Code And Data Among Different Users Sharing Generally Requires That Either Paging
Or Segmentation
10. Define Dynamic Loading?
To Obtain Better Memory Space Utilization We Can Use Dynamic Loading.With
Dynamic Loading A Routine Is Not Loaded Until It Is Called.
UNIT-5
1. Define Virtual Memory?
Virtual Memory Is a Technique That Allows the Execution of the Process That
May Not Completely In Memory
2. What Is Demand Paging?
Virtual Memory Is Commonly Implemented By Demand Paging. A Demand
Paging System Is Similar To Paging With Paging System With Swapping.
3. What is a Page Table?
This table has the ability to mark an entry invalid through a valid-invalid bit or
special value of protection bits
4. What Are The Sequences Occur Due To Page Fault?
(1)
Trap The O.S.
(2)
Save The User Register And Process State.
(3)
Determine That The Interrupt Was A Page Fault.
(4)
Interrupt From The Disk
5. Define Thrashing?
If a process does not have enough memory for its working set, it will thrash.
Providing enough frames to each process to avoid thrashing may require process
swapping and scheduling
6. What Are The File Attributes?
Name, type, location, size, protection, time, date and user identification these are
the attributes of file.
7. What Is File Pointer?
The file pointer is unique to each process operating on the file and therefore must
be kept separate from the on-disk file attributes.
8. What Are The Operations Performed In The Directory?
Search for a file, create a file, delete a file, list a directory, rename a file, and
traverse a file.
9. What Is UFD And MFD?
Each user has own UFD (user file directory) it will list only the file of a single
user. The MFD is indexed by user name or account number and each entry points to the
UFD for that user
10.Define The Logical Structure Of A Directory?
(1)
Single Level Directory
(2)
(3)
(4)
Two Level Directory
Acyclic Graph Directory
General Graph Directory