Академический Документы
Профессиональный Документы
Культура Документы
COMPUTER
ORGANIZATION
&OPERATING
SYSTEMS
2.SYLLABUS
Computer types, functional unit, basic operational concepts, bus structures, software,
performance ,multiprocessors and multi computers, data representation, fixed point
representation, floating-point representation.
UNIT II
UNIT III
UNIT V:
File system Interface: the concept of a file, Access Methods, Directory structure, File
system mounting, file sharing, protection.
File System implementation: File system structure, file system implementation,
directory implementation, directory implementation, allocation methods, free-space
management.
TEXT BOOKS
3. Operating System Concepts- Abraham Silberchatz, Peter B. Galvin, Greg Gagne 7th
Edition, John Wiley.
REFERENCE BOOKS
1.computer organization and architecture-William Stallings 6th Edition, Pearson
Course objectives:
Course Outcomes:
8. Prerequisites :
.
UNIT-2:
UNIT-3:
UNIT-4:
No of Periods
methodology
Lecture
SNO Unit No Date Topic Covered
BB,
22 01-08-2015 Tutorial Class 1 Learning
by doing
BB,
52 03-10-2015 Tutorial Class 1 Learning
Unit-5
by doing
methodo
Lecture
Periods
No of
logy
SNO Unit No Date Topic Covered
28-07-2015 1
26 30-07-2015 Decimal arithmetic unit & operations 1 BB
Semiconductor RAM &ROM memories,
27 31-07-2015 1 BB
hierarchy
BB,
Learning
28 01-08-2015 Tutorial Class 1
by
Doing
29 03-08-2015 Cache memory 1 BB
30 04-08-2015 Virtual memories 1 BB
31 06-08-2015 Secondary storage devices 1 BB
32 07-08-2015 Raid levels 1 BB
Peripheral devices, i/o interfaces,
33 10-08-2015 1 BB
asynchronous data transfer modes
UNIT-3
ECE-C
Date No of Lecture
SNO Unit No Topic Covered
Periods methodology
1. UNIT-1 22/06/2015, Computer Types, 2 BB
24/06/2015 Generations,
Functional units
BB
7/8/2015 Semiconductor RAM 1 BB
24 &ROM memories,
hierarchy
25 8/8/2015, Cache memory 3 BB
10/8/2015,
12/8/2015.
26 13/8/2015, Virtual memories and 2 BB
14/8/2015. secondary storage
devices
27 17/8/2015, Raid levels 2 BB
19/8/2015.
UNIT-3 BB
27 20/8/2015, Peripheral devices, i/o 2 BB
21/8/2015. interfaces,
asynchronous data
transfer modes
28 22/8/2015, Priority interrupt, 2 BB
24/8/2015. DMA
29 26/8/2015, I/O processor serial 2 BB
27/8/2015. communication,
introduction to
peripheral
components
30 28/8/2015 Introduction to 1 BB
standard serial
protocols like
rs232,usb,IEEE1394
UNIT-4 BB
31 29/8/2015 Introduction to OS 1 BB
32 Computer-system - 1 BB
31/8/2015 overview
33 Computer-system 1 BB
2/9/2015 architecture
BB
ECE-D
Date No of Lecture
SNO Unit No Topic Covered
Periods methodology
9. UNIT-1 22-06-2015 Computer Types, 2 BB
Generations,
Functional units
UNIT-4
31 7-09-2015 Introduction to OS 1 BB
32 Computer-system - 1 BB
7-09-2015 overview
33 Computer-system 1 BB
7-09-2015 architecture
BB
22-09-2015
45. Free frames 1 BB
26-09-2015
46. Structure of page table 1 BB
26-09-2015
47. Segmentation 1 BB
28-09-2015
48. Case study 1 BB
28-09-2015
49. Tutorial class 1 BB
29-09-2015
50 Discussion hour 1 BB
30-09-2015
51 Deadlocks 1 BB
1-10-2015
52 Deadlock 1 BB
3-10-2015 characteristics
53 Deadlocks avoidance 1 BB
5-10-2015
54 Deletion algorithm 1 BB
5-10-2015 usage
55 Tutorial class 1 BB
6-10-2015
56 Discussion hour 1 BB
7-10-2015
57 Deadlock detection 1 BB
10-10-2015
58 Unit-5 File system interface: 1 BB
12-10-2015 concept, structure
59 File system interface: 1 BB
12-10-2015 mounting
60 protection 1 BB
14-10-2015
61 File system 1 BB
17-10-2015 implementation
62 Tutorial class 1 BB
19-10-2015
63 Discussion hour 1 BB
20-10-2015
64 File sharing 1 BB
24-10-2015
14.DETAILED NOTES
Unit I
Basic Structure of Computers
Computer Types
• Micro Computer
• Laptop Computer
• Work Station
• Super Computer
• Main Frame
• Hand Held
• Multi core
Hand Held: It is also called a PDA (Personal Digital Assistant). A computer that
fits into a pocket, runs on batteries, and is used while holding the unit in your
hand. Typically used as an appointment book, address book, calculator and
notepad.
Multi Core: Have Multiple Cores – parallel computing platforms. Many Cores
or computing elements in a single chip. Typical Examples: Sony Play station,
Core2Duo,i3,i7etc
Functional Unit
A computer in its simplest form comprises five functional units namely input
unit, output unit memory unit, arithmetic & logic unit and control unit. Figure
2 depicts the functional units of a computer system.
• Secondary
• Memory/Auxiliary
Primary memory is a semiconductor memory that provides access at
high speed. Run time program instructions and operands are stored in
the main memory. Main memory is classified again as ROM and RAM.
ROM holds system programs and firmware routines such as BIOS, POST,
I/O Drivers that are essential to manage the hardware of a computer.
RAM is termed as Read/Write memory or user memory that holds run
time program instruction and data. While primary storage is essential, it
is volatile in nature and expensive. Additional requirement of memory
could be supplied as auxiliary memory at cheaper cost. Secondary
memories are non volatile in nature.
3. Arithmetic and logic unit: ALU consist of necessary logic circuits like
adder, comparator etc., to perform operations of addition, multiplication,
comparison of two numbers etc.
OPCODE OPERAND/s
ADD LOCA, R0
Step 1: Fetch the instruction from main memory into the processor
Step 2: Fetch the operand at location LOCA from main memory into the
processor
Step 3: Add the memory operand (i.e. fetched contents of LOCA) to the
contents of register R0 Step 4: Store the result (sum) in R0.
Load LOCA, R1
Add R1, R0
The steps to execute the instructions can be enumerated as below:
Step 1: Fetch the instruction from main memory into the processor
Step 2: Fetch the operand at location LOCA from main memory into
the processor Register R1
Step 3: Add the content of Register R1 and the contents of register R0
Step 4: Store the result (sum) in R0.
Figure 3 below shows how the memory and the processor are connected. As
shown in the diagram, in addition to the ALU and the control circuitry, the
processor contains a number of registers used for several different purposes.
The instruction register holds the instruction that is currently being executed.
The program counter keeps track of the execution of the program. It contains
the memory address of the next instruction to be fetched and executed. There
are n general purpose registers R0 to Rn-1 which can be used by the
programmers during writing programs.
The interaction between the processor and the memory and the direction of
flow of information is as shown in the diagram below:
Group of lines that serve as connecting path for several devices is called a bus
(one bit per line). Individual parts must communicate over a communication
line or path for exchanging data, address and control information as shown in
the diagram below. Printer example – processor to printer. A common approach
is to use the concept of buffer registers to hold the content during the transfer.
SOFTWARE
Let‘s assume computer with 1 processor, 1 disk and 1 printer and application
program is in machine code on disk. The various tasks are performed in a
coordinated fashion, which is called multitasking. t0, t1 …t5 are the instances
of time and the interaction during various instances as given below:
PERFORMANCE
The total time required to execute a program is the most important measure of
performance for a computer. (t0-t5 of earlier example). Compiler, instruction
set and hardware architecture, program all have impact on performance.
T = (N * S) / R
CACHING
CISC vs RISC
Reduced instruction set computer
– Large N, small S
Complex instruction set computer
– Small N, large S
COMPILER
PERFORMANCE MEASUREMENT
Register Transfer
15
Arithmetic Logic Shift Unit
A program that acts as an intermediary between a user of a computer and the computer
hardware Operating system goals:
Operating system
Controls and coordinates use of hardware among various applications and users
Application programs – define the ways in which the system resources are used to
solve the computing problems of the users
Word processors, compilers, web browsers, database systems, video games
Users
People, machines, other computers
OS is a resource allocator
Manages all resources
Decides between conflicting requests for efficient and fair resource use
OS is a control program
Controls execution of programs to prevent errors and improper use of the computer
No universally accepted definition
Everything a vendor ships when you order an operating system‖ is good
approximation
but varies wildly.
―The one program running at all times on the computer‖ is the kernel. Everything
else is either a system program (ships with the operating system) or an application
program.
Computer-system operation
One or more CPUs, device controllers connect through common bus providing
access to shared memory
Concurrent execution of CPUs and devices competing for memory cycles
Computer-System Operation
Interrupt Handling
The operating system preserves the state of the CPU by storing registers and the
program counter
Determines which type of interrupt has occurred:
polling
vectored interrupt system
Separate segments of code determine what action should be taken for each type of
interrupt
Interrupt Timeline
Storage Hierarchy
Storage systems organized in hierarchy
Speed
Cost
Volatility
Caching – copying information into faster storage system; main memory can be viewed as a
last cache for secondary storage
Caching
Computer-System Architecture
Most systems use a single general-purpose processor (PDAs through mainframes)
Most systems have special-purpose processors as well
Multiprocessors systems growing in use and importance
Also known as parallel systems, tightly-coupled systems
Advantages include
Clustered Systems
Operating-System Operations
Provides ability to distinguish when system is running user code or kernel code
System call changes mode to kernel, return from call resets it to user
Memory Management
A pair of base and limit registers define the logical address space
Address binding of instructions and data to memory addresses can happen at three
different stages
Compile time: If memory location known a priori, absolute code can be generated;
must recompile code if starting location changes
Load time: Must generate relocatable code if memory location is not known at
compile time
Execution time: Binding delayed until run time if the process can be moved during
its execution from one memory segment to another. Need hardware support for
address maps (e.g., base and limit registers)
Multistep Processing of a User Program
The concept of a logical address space that is bound to a separate physical address
space is central to proper memory management
Logical address – generated by the CPU; also referred to as virtual address
Physical address – address seen by the memory unit
Logical and physical addresses are the same in compile-time and load-time address-
binding schemes; logical (virtual) and physical addresses differ in execution-time
address-binding scheme
Swapping
A process can be swapped temporarily out of memory to a backing store, and then brought
back into memory for continued executionnBacking store – fast disk large enough to
accommodate copies of all memory images for all users; must provide direct access to these
memory imagesnRoll out, roll in – swapping variant used for priority-based scheduling
algorithms; lower-priority process is swapped out so higher-priority process can be loaded
and executednMajor part of swap time is transfer time; total transfer time is directly
proportional to the amount of memory swappednModified versions of swapping are found
on many systems (i.e., UNIX, Linux, and Windows)
System maintains a ready queue of ready-to-run processes which have memory images on
disk
Paging
Paging Example
Frame #
Page #
Paging Hardware With TLB
EAT = (1 + e) a + (2 + e)(1 – a)
=2+e–a
Memory Protection
Hierarchical Paging
Hashed Page Tables
Inverted Page Tables
Hierarchical Page Tables
A logical address (on 32-bit machine with 1K page size) is divided into:
a page number consisting of 22 bits
a page offset consisting of 10 bits
Since the page table is paged, the page number is further divided into:
a 12-bit page number
a 10-bit page offset
Thus, a logical address is as follows:
where pi is an index into the outer page table, and p2 is the displacement within the
page of the outer page table
12 10 10
Address-Translation Scheme
Segmentation Architecture
Protection
With each entry in segment table associate:
validation bit = 0 Þ illegal segment
read/write/execute privileges
Protection bits associated with segments; code sharing occurs at segment level
Since segments vary in length, memory allocation is a dynamic storage-allocation
problem
A segmentation example is shown in the following diagram
Segmentation Hardware
Example of Segmentation
P1 and P2 each hold one disk drive and each needs another one
P0 P
System Model
Resource types R1, R2, . . ., Rm.CPU cycles, memory space, I/O devices
request
use
release
Deadlock Characterization
Hold and wait: a process holding at least one resource is waiting to acquire
additional resources held by other processes
Deadlock Prevention
Mutual Exclusion – not required for sharable resources; must hold for
nonsharable resources
Deadlock Avoidance
Banker’s Algorithm
Safety Algorithm
2. Find and i such that both: (a) Finish [i] = false(b) Needi £ Work If no
such i exists, go to step 4
4. If Finish [i] == true for all i, then the system is in a safe state
Detection Algorithm
Detection-Algorithm Usage
nWhen, and how often, to invoke depends on: lHow often a deadlock is likely
to occur?
lHow many processes will need to be rolled back?
UNIT-V
File Concept
lData
numeric
character
binary Program
File Structure
nNone - sequence of words, bytes Simple record structure Lines Fixed length
Variable length Complex Structures Formatted document Relocatable load
file Can simulate last two with first method by inserting appropriate control
characters Who decides: Operating system, Program.
Access Methods
nSequential Access read next, write next ,reset , no read after last write,
(rewrite)
Sequential-access File
Example of Index and Relative Files
Directory Structure
Disk Structure
Mount Point
File Sharing
Uses networking to allow file system access between systems Manually via
programs like FTP Automatically, seamlessly using distributed file systems
Semi automatically via the world wide web
Protection
15.ADDITIONAL TOPICS
17.QUESTION BANK
(b) Hardwired control unit is faster than micro programmed control unit.
Justify this statement.
2.What are the different types of Mapping Techniques used in the usage of
Cache Memory? Explain.
3. (a) Draw the block diagram of a computer system and describe each of its
parts along with their functions. Also designate the information flow
between the parts with arrows.
4. (a) Explain commonly employed bit shift operators such as shift left, right,
circular shift left/right and arithmetic shift left/right. Give 8-bit examples.
(b) Design a circuit for combined shift left/right operations. Assume register
length is 4 bits and employ RS flip-flops.
5. Draw circuit for BCD addition and subtraction. Explain its functionality
with
mathematical background.
6. (a) What are the different types of I/O communication techniques? Give
brief
notes.
(b) In the above techniques, which is the most efficient? Justify your
answer.
7. (a) Explain the variety of techniques available for sequencing of
microinstructions
based on the format of the address information in the microinstruction.
(b) Hardwired control unit is faster than microprogammed control unit.
Justify
this statement.
(b) Show the memory hierarchy and give the brief explanation.
9. What do you mean by instruction set architecture (ISA). What is the
completeness?
and orthogonality with respect to ISA. What are the design issues related to
ISA?
10. (a) Find the actual number from its IEEE 754 representation.
Sign = 0
Exponent = 1000 0000
Mantissa = 1100 0000 0000 0000 0000 000
(b) What is meant by normalization in oating point representation? Why do
we
need it? What is bias? What normalization is used in IEEE 754 standard?
18.Assignment Topics
1. Define: Program, Instruction set, Hardware & software.
2. List out the main function of an Operating System.
3. Explain in details the function units of computer with the help of the
diagram.
4. Explain in brief the concept of stored program.
5. Differentiate between Primary Memory & Secondary Memory.
6. Write to state characteristics of primary memory.
7. Explain in brief the characteristics of storage.
8. Define: System Nucleus, swapping.
9. Write a short note on device controller (Draw necessary diagram).
10. Explain in brief device interface signals.
11. Explain in brief the meaning of following terms.
1. I/O Device
2. Word length
3. Memory Capacity
4. Access Time
5. Settling Time
6. Cycle Time
7. Bandwidth
12. Explain in brief synchronous interface & Asynchronous
interface.
13. What is Memory Addressability?
14. Explain Interface Cycle in detail with the help of diagrams.
15. Explain in brief two steps of CPU.
16. What is CPU Registers?
17. What is Cache Memory?
18. Write short note on CPU registers (draw a diagram)
19. Define: Frequency, Time period, Pulse width and Duty cycle.
20. What is Macro Operation? Explain Micro operation with the help
of example.
21. What is Interrupt Service Routing?
22. Explain in details the concept of interrupt OR Explain in brief
1. Interrupt service routing,
2. Nested interrupt
3. Interrupt priority
4. Interrupt masking
5. Interrupt non-masking.
23. Write a short note on method of data transfer or explain in
details software method to transferred data.
24. Explain in brief the following terms.
1. I/O Routing
2. I/O Drivers
3. I/O Ports
25. What is BUS? Explain in brief a concept of BUS with help of
simple structure OR Explain in brief the functions of Address BUS,
Data BUS & Control BUS.
26. Explain in brief the concept of BUS cycle.
27. Explain in brief the characteristics of different type of computer
(each three have any one).
28. Explain in brief the factors are response to improve the
performance of a computer.
29. What is Multiprogramming, Multi Tasking and Multiprocessing.
30. -What is Operating System? What are the goals of OS.
31. Write Operating System services and functions.
32. What is System call? Explain the categories of System call.
33. Explain Operating System Structure.
(A) Boolean values (B) whole numbers (C) real integers (D) integers
Ans: C
(A) 9‘s complement (B) 10‘s complement (C) 1‘s complement (D) 2‘s
complement
Ans: D
Q. 3 (2FAOC)16 is equivalent to
(A) (195 084)10 (B) (001011111010 0000 1100)2 (C) Both (A) and (B) (D)
None of these
Ans: B
(A) Decimal Number system (B) Excess 3-cod (C) Binary number System (D)
None of these
Ans: B
Ans: A
Ans: B
Ans: C
Q.8When CPU is executing a Program that is part of theOperating System, it
is said to be in
(A)Interrupt mode (B)System mode
(C)Half mode
(D)Simplex mode
Ans: B
Q.9In computers, subtraction is carried out generally by
(A)1's complement method (B)2's complement method (C)signed magnitude
method (D)BCD subtraction method
Ans: B
Q.10The circuit converting binary data in to decimal is
(A)Encoder (B)Multiplexer (C)Decoder (D)Code converter
Ans: D
Q.11Translation from symbolic program into Binary is done in
(A) Two passes. (B) Directly (C) Three passes. (D) Four passes
Ans: A
Q.12 A floating point number that has a O in the MSB of mantissa is said to
have
(A) Overflow (B) Underflow (C) Important number (D) Undefined
Ans: B
Q.13 A binary digit is called a
(A) Bit (B) Byte (C) Number (D) Character
Ans: A
Ans: A
Q.16Assembly language
Ans :a
Ans: D
Q.18 _________ register keeps track of the instructions stored in program
stored in memory.
Ans: C
Ans: C
(A) Indirect addressing (B) Two-addressing (C) Zero addressing (D) Index
addressing
Ans: C
Q.30A group of bits that tell the computer to perform aspecific operation is
known as
(A) Instruction code (B) Micro-operation (C) Accumulator (D) Register
Ans: A
Q.31he communication between the components in a microcomputer takes
place via the address and
(A) I/O bus (B) Data bus (C) Address bus (D) Control lines
Ans: B
Q.32 A microprogram sequencer
(A) Routine
(B) Subroutine
(C) Vector
(D) Address
Ans: A
Q.34Status bit is also called
(A) Binary bit (B) Flag bit
(C) Signed bit (D) Unsigned bit
Ans: B
Q35.The maximum addressing capacity of a micro processor which uses 16
bit database & 32 bit address base is
(A)64 K.
(B)4 GB.
(C)both (A)& (B)
.(D)None of these.
Ans:B
Q38) The kernel of the operating system remains in the primary memory
because ________.
1 It is mostly called (used)
2 It manages all interrupt calls
3 It controls all operations in process
4 It is low level
Right Ans ) 1
Q43) A process is
1 program in execution
2 a concurrent program
3 any sequential program
4 something which prevents deadlock
Right Ans ) 1
Q46) Which of the following will determine your choice of systems software
for your computer ?
1 Is the applications software you want to use compatible with it ?
2 Is it expensive ?
3 Is it compatible with your hardware ?
4 Both 1 and 3
Right Ans ) 4
Q49) Routine is not loaded until it is called. All routines are kept on disk in
a relocatable load format. The main program is loaded into memory & is
executed. This type of loading is called _________
1 Static loading
2 Dynamic loading
3 Dynamic linking
4 Overlays
Right Ans ) 3
Q54) If the Disk head is located initially at 32, find the number of disk
moves required with FCFS if the disk queue of I/O blocks requests are
98,37,14,124,65,67.
1 310
2 324
3 315
4 321
Right Ans ) 4
Q62) Which of the following file name extension suggests that the file is
Backup copy of another file ?
1 TXT
2 COM
3 BAS
4 BAK
Right Ans ) 4
Q63) Which technique was introduced because a single job could not keep
both the CPU and the I/O devices busy?
1 Time-sharing
2 SPOOLing
3 Preemptive scheduling
4 Multiprogramming
Right Ans ) 4
Q66) PCB =
1 Program Control Block
2 Process Control Block
3 Process Communication Block
4 None of the above
Right Ans ) 2
Q68) Switching the CPU to another Process requires to save state of the old
process and loading new process state is called as __________.
1 Process Blocking
2 Context Switch
3 Time Sharing
4 None of the above
Right Ans ) 2
Q71) A thread
1 is a lightweight process where the context switching is low
2 is a lightweight process where the context switching is high
3 is used to speed up paging
4 none of the above
Right Ans ) 1
1. https://www.cs.dal.ca/~mheywood/CSCI3121.
2. uic.edu.hk/~hpguo/teaching/spring2011/co/index.html
REFERENCES