Download Dept. of Computer Science Engineering, School of Engineering

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

Copland (operating system) wikipedia , lookup

RSTS/E wikipedia , lookup

Security-focused operating system wikipedia , lookup

Distributed operating system wikipedia , lookup

Burroughs MCP wikipedia , lookup

Spring (operating system) wikipedia , lookup

DNIX wikipedia , lookup

Process management (computing) wikipedia , lookup

VS/9 wikipedia , lookup

CP/M wikipedia , lookup

Unix security wikipedia , lookup

Paging wikipedia , lookup

Transcript
Dept. of Computer Science Engineering, School of Engineering, Anurag Group of Institutions
III B.Tech I Semester
Academic Dairy
for
Operating System
Faculty: Mrs.G.Sudeepthi
Academic Dairy Handbook III CSE I SEM
1
Dept. of Computer Science Engineering, School of Engineering, Anurag Group of Institutions
DEPARTMENT OF COMPUTER SCIENCE
III/IV CSE –I SEM (2012-2013)
OPERATING SYSTEM
Course objective:
The main objective of this course is to get a brief overview of operating system concepts. The
design and implementation of modern multiprocessing operating systems. Topics include
concurrent programming, real and virtual storage allocation, resource allocation and deadlock
prevention and avoidance, job scheduling, and analytic modeling. Students will be able to
understand the concepts involving concurrency and implement a portion of a multiprocessing
operating system.

To have a grand tour of operating system concepts

To understand the various scheduling algorithms and policies.

To provide a grand tour of the major operating systems components

To provide coverage of basic computer system organization

To describe the services an operating system provides to users, processes, and other
systems

To discuss the various ways of structuring an operating system

To explain how operating systems are installed and customized and how they boot

To understand the various protection and security measures taken in protecting the
system from attacks.

To apply the various disk scheduling techniques

To apply basic algorithms associated with distributed process management
Course Outcomes
Upon successful completion of the course requirements, a student should be able to:
Academic Dairy Handbook III CSE I SEM
2
Dept. of Computer Science Engineering, School of Engineering, Anurag Group of Institutions
1. Describe the basic resource management responsibilities of an operating system
2. Describe the concept of a process and list the various process state transitions
3. Distinguish between a process and a thread
4. Analyze a concurrent programming application and apply appropriate techniques to avoid
control
problems: mutual exclusion, deadlock, and starvation
5. Describe or apply virtual memory concepts
6. Describe scheduling policies appropriate for both uniprocessor and multiprocessor systems.
7. Describe or apply the various disk scheduling techniques
8. Describe or apply basic algorithms associated with distributed process management
9. Design and implement a concurrent programming application using only semaphores for
process control
10. Design and implement a concurrent programming application in the Ada language using the
message passing protocol with advanced control features.
11. Design and implement a concurrent programming application using a monitor for process
control
12. Design and implement a simulation of operating an operating system feature
UNIT-I
Syllabus:
Computer System and Operating System Overview: Overview of computer operating systems
operating systems functions protection and security distributed systems special purpose systems
operating systems structures and systems calls operating systems generation
Academic Dairy Handbook III CSE I SEM
3
Dept. of Computer Science Engineering, School of Engineering, Anurag Group of Institutions
Objectives:

To provide a grand tour of the major operating systems components

To provide coverage of basic computer system organization and system calls.

To know the operating system function and different types of system call
Lecture plan:
S.No
Topic
No. of lectures
1
1
Introduction:
2
Overview of computer operating systems
1
3
operating systems functions
1
4
protection and security
1
5
distributed systems, operating systems structures
1
6
systems special purpose systems
1
7
systems calls operating systems generation
1
8
Revision
1
Total No Of Classes
8
Assignment Questions:
1
Explain the concept of system call and operating system structure
2.
Write about operating system functions and its services
Case Study:
For each of the service examples below, describe whether each should be consider a Kernelspace or a user-space operation (e.g., in a system server) for a microkernel Operating system like
Symbian OS:
1. Scheduling a thread for execution
2. Printing a document
Academic Dairy Handbook III CSE I SEM
4
Dept. of Computer Science Engineering, School of Engineering, Anurag Group of Institutions
3. Answering a Bluetooth discovery query
4. Managing thread access to the screen
5. Playing a sound when a text message arrives
6. Interrupting execution to answer a phone call
Subjective Important Questions :
1. Define operating system. Draw and explain abstract view of components of a
1. computer system.
2. What are the various objectives and functions of Operating Systems?
3. Write about evaluation of Operating Systems?
4. Justify the following statements.
OS can be viewed as a Resource Allocator.
OS is a Control Program
5. Some CPUs provide for more than two modes of operation. What are two possible uses of
these multiple modes? Explain.
6. a) What are OS objectives? Explain them detail.
b) Explain basic structure of a computer system & also explain its basic elements.
7. What are the various services offered by the Operating Systems?
8. What is OS? Describe the different types of Operating systems with the examples.
9. (a) Discuss the Operating system design hierarchy with an example.
(b) Explain the applications of Windows NT Operating System.
10. With the help of neat block diagram, describe the computer components with an example.
11. What are the main differences between operating systems for Mainframes and PCs? Discuss.
Objective Questions:
1. To avoid the race condition the number of processes that may be simultaneously inside their
critical section is [b ]
a) 0 b) 1 c) 2 d) 3
Academic Dairy Handbook III CSE I SEM
5
Dept. of Computer Science Engineering, School of Engineering, Anurag Group of Institutions
2. Which of the following is single user OS? [ c]
a) MS-DOS and UNIX b) UNIX and XENIX c) OS/2 and MS-DOS d) MS-DOS and XENIX
3. Operating system object is to provide [ d]
a) Inconvenience b) In efficiency c) Error correction d) Ability to evolve
4)There are ____ levels in structure of hypothetical model of os.{13}
5) The forms of user interface are _______ and _____ .{command line interface and batch
interface}.
6). Which of the following memory is volatile? [ a]
a) RAM b) ROM c) PROM d) EPROM
7. Which of the following register contains address of the next instruction to be
executed by the CPU? [ d]
a) IR b) PSW c) CR d) PC
8). Which of the following memories has the shortest access time? [ a]
a) Cache memory b) magnetic bubble memory c) magnetic core memory d) RAM
9. The procedure of starting a computer by loading the kernel is known as _________ the
system.{booting}
10. Trap is a ____________ interrupt.{synchronous interrupt}
11)System calls are grouped into ________major categories.{5};
12)unix is a ________structured os.{layered};
13. Interactive multiprogramming systems are also called as _________ systems.{time sharing}
UNIT-II
Syllabus:
Process Management – Process concepts threads, scheduling-criteria algorithms, their
evaluation,
Thread scheduling, case studies UNIX, Linux, Windows
Academic Dairy Handbook III CSE I SEM
6
Dept. of Computer Science Engineering, School of Engineering, Anurag Group of Institutions
Objective:

To understand the concept of threads and their models.

Get an ability to finding best scheduling algorithm and evaluate.
Lecture plan:
S.No
1
Topic
Process concepts
No. of lectures
3
2
threads
2
3
scheduling-criteria algorithms
3
4
Thread scheduling
1
5
Revision
1
Total classes to complete UNIT-II
10
Assisgnment:
1.Explain about single threaded and multi threaded process models with
suitable diagrams.
2.Explain the process concepts its states and their scheduling criteria.
Case Study:
Symbian OS split its kernel design into two layers: the nanokernel and the Symbian OS kernel.
Services like dynamic memory management were too complicated for the nano kernel. Describe
the complicated components of dynamic memory management and why they might not work in a
nano kernel
Subjective Important Questions:
1. What are various steps involved in change of a process state? Explain in detail?
2. What are the various reasons for process suspension? Explain.
Academic Dairy Handbook III CSE I SEM
7
Dept. of Computer Science Engineering, School of Engineering, Anurag Group of Institutions
3. Explain about the following.
(a) Process identification.
(b) Processor state information
4. (a) Define the following
i. Process
Ii. Program
iii. Process control block
iv. Process Scheduling
(b) Explain the process State Transmission diagram with examples.
5.. Discuss about the following:
a) userlevel threads.
(b) Kernel level threads.
(c) Multithreading.
6. a) Describe various operations on threads.
(b) Discuss about threads synchronization.
(c) Write about Kernel level threads.
7. a) Explain the role of process control block in OS.
(b) Differentiate the following
(c ). Process Switching vs Context Switching
(d) Clock interrupt Vs I/O interrupt.
8.
(a) Explain the reasons for process terminations.
(b) Describe the single blocked queue and multiple blocked queues with an example
Academic Dairy Handbook III CSE I SEM
8
Dept. of Computer Science Engineering, School of Engineering, Anurag Group of Institutions
Objective Questions:
1. A program in execution is a ---- ? ANS: process.
2. A process is an ----? A program is a ----? ANS: active
entity, passive entity.
3. What a program counter will contain? ANS: it contains the address of next instruction to be
executed, and set of associated
resources.
4. How many processes running on the processor at any instant? ANS: only
one process executes at a time.
5. Each process is represented in the operating system by ----? ANS:
process control block.
7. What a job queue will contain? ANS: set of all
processes.
8. Where a new process will be kept initially? ANS: in ready
queue.
9. The selection of process from queue is carried out by ---- ? ANS: scheduler.
10. What are different schedulers? ANS: short term schedulers, long term schedulers, medium
term schedulers.
11. Long term scheduler is a ----? Short term scheduler is a ---- ? ANS: job scheduler,
CPU scheduler.
12. Which scheduler will select the jobs form job pool for execution?
A.
B.
C.
D.
Long term
Short term
Medium term.
None of the above.
Academic Dairy Handbook III CSE I SEM
9
Dept. of Computer Science Engineering, School of Engineering, Anurag Group of Institutions
ANS: A.
13. Which scheduler will selects the process among the processes selected for
execution?
A.
B.
C.
D.
Long term
Short term
Medium term.
None of the above.
ANS: b.
14. I/O bound process spend much of is time in doing ---? ANS: UO operation than
computation.
15. What will CPU bound process will do?
ANS: it will perform more computation than I/O.
16. If all process are UO bound then what will be happen?
ANS: ready queue will be almost empty.
17. If all process are CPU bound then what will be happened?
ANS: device queue will be empty.
UNIT-III
Syllabus:
Concurrency : Process synchronization, the critical- section problem, Peterson’s Solution,
synchronization Hardware, semaphores, classic problems of synchronization, monitors,
Synchronization examples, atomic transactions. Case studies UNIX, Linux, Windows
Objective:

To be able to solve the classical problems of synchronization.

To understand the concept of semaphores and monitors

To understand the process synchronization.
Academic Dairy Handbook III CSE I SEM
10
Dept. of Computer Science Engineering, School of Engineering, Anurag Group of Institutions
Lecture plan:
S.No
1
Topic
Process synchronization
No. of lectures
2
2
the critical- section problem
1
3
Peterson’s Solution
1
4
synchronization Hardware
2
5
semaphores
1
6
classic problems of synchronization
1
7
Synchronization examples, atomic transactions
2
Revision
1
Total classes to complete UNIT-III
10
8
Assisgnment:
1. Explain the concept of process synchronization
2. Give short note about the following :
a. Critical section problem
b. Petersons solution
c. Atomic transactions
Case Study:
Consider the operation below. For LINUX ,UNIX OS, describe whether each can be
implemented as a process or as a thread. Explain your answer.
1. Using a user application—say, a Web browser
2. Processing user input from a phone keypad for a game
3. Changing the color of a portion of the screen for an application
Academic Dairy Handbook III CSE I SEM
11
Dept. of Computer Science Engineering, School of Engineering, Anurag Group of Institutions
4. Scheduling the next execution unit on the processor
Objective Questions:
1) Long term scheduler selects which process should be brought into the ----- queue.
Ans: ready.
2) The processes in Long term scheduling executes frequently.
a) more
b) Less
c) Cannot be determined
d) None
Ans : b) less.
3) CPU bound spends much of its time in computations than doing --- . Ans :
V0.
4) the system with best performance is the combination of -------------- bound and
process. Ms : UO and CPU.
5) Short term schedulers will select the processes for -- .
CPU.
Ms
bound
:
6) The processes in Short term scheduling executes frequently.
a) more
b) less
c) cannot be determined
d) none
Ms : a) more.
7) The major difference between long term and Short term schedulers is ------ . Ans :
`frequency of operation' .
8) The short term schedulers executes at least once in seconds.
a) 1 second
b) 10 seconds
c) 1 millisecond
d) d) 100 milliseconds.
Ans : d) 100 milliseconds.
9) Time sharing Systems uses ------------- schedulers.
Academic Dairy Handbook III CSE I SEM
12
Dept. of Computer Science Engineering, School of Engineering, Anurag Group of Institutions
a)
b)
c)
d)
Long term
Short term.
Medium term
None
Ans; c) Medium term
10) Medium term scheduling is also called as -------------------------------------------------------------------- .
Ms : Swapping.
11) CPU scheduling decides the allocation of CPU to the processes present in the ------------------------------------------------------------------------------------------------------------------- ---queue.
Ms : Ready.
12) The degree of multiprogramming is depending on ------schedulers.
a)
b)
c)
d)
Long term
Short term
Medium tern
None.
Ms : a) Long term.
13) In FCFS algorithm the process which requested the CPU - will be served ------- .
Ans : first,first.
14) Calculate Average Waiting Time using FCFS if there are 4 processes p1,p2,p3 and p4 (
specified in the order of arrival) assume all are arrived at same time and the burst times
are 8,6,5,12.
a) 5.25
b) 8.25
c) 9.75
d) 10.25
Ans : d) 10.25
Academic Dairy Handbook III CSE I SEM
13
Dept. of Computer Science Engineering, School of Engineering, Anurag Group of Institutions
15) For the above problem assume the arrival orders are 0,1,3,4. Now Calculate Average
Waiting Time using FCFS.
a) 7.25
b) 8.25
c) 9.75
d) 6.75
Ans : b) 8.25
16) For problem 14 Calculate Average Waiting Time using SJF .
a) 7.25
b) 8.25
c) 8.75
d) 9.25
Ans : c) 8.75
17) For problem 15 Calculate Average Waiting Time using preemptive SJF .
e) 7.5
f) 8.5
g) 7.25
h) 8.25
Ans : a)7.5
18) Difficulty with the SJF algorithm is, knowing the length of the ---request. Ans : next.
CPU
19) A preemptive SJF algorithm will preempt the currently executing process, whereas a
non preemptive SJF algorithm will allow the currently running process to
.
Ans : finish its CPU burst.
20) Preemptive SJF scheduling is sometimes called as ----------------------------- . Ans
: `shortest-remaining-time-first scheduling'.
21) The SJF algorithm is a special case of the ------------------ algorithm,
Academic Dairy Handbook III CSE I SEM
14
Dept. of Computer Science Engineering, School of Engineering, Anurag Group of Institutions
Ans: priority-scheduling.
22) In priority scheduling algorithm a priority is associated with each process, and the CPU
is allocated to the process with priority.
Ans : highest.
23) When there are equal-priority processes then they are scheduled in ----- order. Ans
: FCFS.
24) A non preemptive priority-scheduling algorithm will simply put the new process at the head
of the
queue.
Ans : ready.
25) A major problem with priority-scheduling algorithm is ------------------- . Ans :
`starvation'.
26) A solution to the problem of indefinite blockage of low-priority processes is --------- . Ans
: `Aging'.
27) ------------------------ is a technique of gradually increasing the priority of processes that wait in
the system for a long time.
Ans: Aging.
28) --------------------- is similar to FCFS scheduling, but preemption is added to switch
between processes.
Ans : Round Robin.
29) -----------------------algorithm is designed especially for `timesharing
systems'. Ans : Round Robin.
30) - In Round Rodin algorithm ready queue is treated as a --------------: circular queue.
. Ans
31)
In Round Robin algorithm if the CPU burst of the process is longer than 1 time
quantum, the timer will cause an interrupt to the operating system and ----------will be
executed.
Ans : a context switch.
Academic Dairy Handbook III CSE I SEM
15
Dept. of Computer Science Engineering, School of Engineering, Anurag Group of Institutions
32) ------------------------------------------------------------------------------------------------------- In
multilevel queue scheduling there will be two types of processes they are ------------------and ---------------------------- .
Ans : foreground processes and background processes.
33) ------------------------ ------------------------------------------------------- processes may
have priority over -- -------------------------------------------------------- processes. Ans :
Foreground, Background.
34)
algorithm partitions the ready queue into several separate queues.
Ans: multilevel queue scheduling.
35) ----------------------------------scheduling allows a process to move between queues.
Ans: Multilevel feedback queue.
36)
In -------------------------------------------------------------------------------algorithm, processes are permanently assigned to a queue they do not move
between queues.
Ans: multilevel queue-scheduling.
37). A multilevel feedback queue scheduler is defined by which of the following parameters
a.
b.
c.
d.
The number of queues
The scheduling algorithm for each queue
The method used to determine when to upgrade a process to a higher priority queue
All the above
Ans : d) All the above.
38) Organization of UO function deals with how the I/O data can be exchanged between UO
devices,
main memory and
.
Ans: CPU registers.
Academic Dairy Handbook III CSE I SEM
16
Dept. of Computer Science Engineering, School of Engineering, Anurag Group of Institutions
39) In programmed I/O data transfer technique -------------triggers bus lines to select
the proper device and to move bits into or put of a device register.
Ans: UO instruction.
40) In ---------------- technique a separate address range is allocated for UO
devices. Ans: UO mapped UO.
41) Intechnique same instruction can be used to access both the memory and UO devices.
Ans: Memory mapped I/O.
42) The CPU hardware has ---------------------every instruction.
line that the CPU senses after executing
Ans: an interrupt-request.
43) When the CPU detects that a controller has asserted a signal on the interrupt request line, the
CPU saves the current value of the instruction pointer, and jumps to
at a fixed address in
memory.
Ans: interrupt handler routine.
44) ------------------------------ interrupts can't be suspended.
Ans: Non mask able.
45) ------------------ Interrupts are reserved for unrecoverable memory errors.
Ans : Non mask able.
46) Interrupts can also be used to manage --------- with in the kernel.
Ans: flow control.
47) To initiate a DMA transfer, the host writes a --------------- block into memory.
Ans: DMA command.
Academic Dairy Handbook III CSE I SEM
17
Dept. of Computer Science Engineering, School of Engineering, Anurag Group of Institutions
48) The distributed system should appear as a conventional and ----- system to the user.
Ans: centralized.
49) The user interface of transparent distributed system should not distinguish between and------------- resources.
Ans: local and remote.
50) The fault tolerance specifies the distributed system should continue to function in the case
of ---------------------------------------------------------------------------------------------------Ans: Failures.
51) ------------ specifies as demands increase, the system should easily accept the addition of
new resources to accommodate the increased demand.
Ans: Scalability.
52) Adding new resources might solve the problem of graceful degradation but it indirectly
increases
over other resources.
Ans: load.
53) A collection of semi-autonomous machines that acts as a single system is called as
. Ans: Cluster.
54) A cluster consists of set of machines and a dedicated ----- .
Ans: cluster server.
55) The 2 types of buffering are --------------------- --------------------------- and
. Ans: Block-oriented and Stream Oriented.
56) is the time for the disk arm to move the heads to the cylinder containing the desired
sector.
Ans: seek time.
57) ------------ is the additional time waiting for the disk to rotate the desired sector to the
disk head.
Academic Dairy Handbook III CSE I SEM
18
Dept. of Computer Science Engineering, School of Engineering, Anurag Group of Institutions
Ans: Rotational Latency.
UNIT-IV
Syllabus:
Memory Management : Swapping, contiguous memory allocation, paging, structure of the page
table , segmentation, virtual memory, demand paging, page-Replacement, algorithms, case studies
UNIX, Linux, Windows
Objective:

To provide a detailed description of various ways of organizing memory hardware

To discuss various memory-management techniques, including paging and segmentation

To provide a detailed description of the Intel Pentium, which supports both pure
segmentation and segmentation with paging
Lecture plan:
S.No
1
Topic
No. of lectures
Swapping, contiguous memory allocation
1
2
paging, structure of the page table
1
3
Segmentation
2
4
virtual memory, demand paging
1
5
page-Replacement, algorithms
1
7
Total classes to complete UNIT-IV
6
Assisgnment:
1 .Explain about protection technique of critical section in LINUX.
2. .(a) What is the cause of thrashing? How does the system detect thrashing, and
once detected what steps are taken by the system do to eliminate it?
Academic Dairy Handbook III CSE I SEM
19
Dept. of Computer Science Engineering, School of Engineering, Anurag Group of Institutions
(b) Discuss about demand paging technique.
© discuss about swapping ,virtual memory,paging and segmentation in brief
Case Study:
We know I/O processing is more efficient. Do you think an application could use multiple active
objects at the same time? How would the system react when multiple I/O events required
action.Consider the situation in symbian operating system and support your statement
Subjective Important Questions:
1(a) Define Memory Management.
(b) Explain in detail the requirements that memory management needs to satisfy
2 a) Explain in detail about the fetch policy supported by the Operating System
(b) A computer has a cache main memory and a disk used for virtual memory.
If a referenced word is in the cache, 20 nanoseconds are required to access it. If it is in the main
memory but not in the cache, 60 nanoseconds are needed to load it into the cache, and then the
reference is started again. If the word is not in main memory, 12 milliseconds are required to
fetch the work from disk, followed b 60 nanoseconds to copy it to the cache, and then reference
is started again. The cache hit ratio is 0.9 and the main memory hit ratio is 0.6. What is the
average time in nanoseconds required to access a referenced word on this system?
(c) Differentiate using a neat sketch between direct and associate lookup for page
table entries.
3. Explain paging scheme for memory management, discuss the paging hardware and
paging model.
4 Explain any two techniques for structuring the page table. Discuss with suitable examples.
5 a) Define Memory Management.
(b) Explain in detail the requirements that memory management needs to satisfy
6 Compare the main memory organization scheme of contiguous memory allocation,
Academic Dairy Handbook III CSE I SEM
20
Dept. of Computer Science Engineering, School of Engineering, Anurag Group of Institutions
pure segmentation and pure paging with respect to the following issues.
(a) External fragmentation
(b) Internal fragmentation
(c) Ability to share code across processes.
7 Explain contiguous memory allocation scheme for memory management. What are
its advantages and disadvantages?
8 (a) Contrast resident set with working set.
(b) What are the advantages of an inverted page table? Explain.
9 a) What is paging? What is the purpose of paging the page table?
b) Discuss the hardware support required to support the demand paging.
10 Write short notes on following terms:
a) second chance page replacement algorithm
b) pure demand paging
c) effective memory access time
d) inverted page tables [16]
11 a) Explain various contiguous memory allocation strategies.
b) Describe the hardware required to support the segmentation.
Objective Questions:
1. In the Dining philosopher's problem if one of the philosopher's is lefty and all
others are righties this arrangement may solve
(a) Dead lock
(b) starvation
(c ) neither (a) & (b)
(d) neither a or b
Academic Dairy Handbook III CSE I SEM
21
Dept. of Computer Science Engineering, School of Engineering, Anurag Group of Institutions
2. The bankers algorithm is being run in system with `m' resources classes and `n' process,
the number of operations that must be performed to check a state for safety is proportional
to ma nb.
(a) a= 1, b= 1
(b) a=2, b= 1
(c) a= 1, b= 2
(d) a= 2, b= 2
3. A system is composed of four processes, {P 1 , P2, P3, P4} and three types of resources,
{R I, R2, R3, R4} , the number of resources are C= <3,2,2>
1. process P lholds 1 unit of R land requests 1 unit of R2.
2. P2holds 2 units of R2 and requests 1 unit each of RI and R3.
3. P3 holds 1 unit of RI and requests 1 unit of R2 .
4. P4 holds 2 units of R3 and requests 1 unit of RI .
Which of the following statement is correct.(d)
(a) P1 must be executed as third process in safe sequence
(b) P3 must be executed as third process
(c) safe sequence doesn't exist
(d) none of the above
4. Consider a system with a total of 150 units of memory allocated three process as shown:
Process
Max
Hold
1
70
45
2
60
40
3
60
13
Academic Dairy Handbook III CSE I SEM
22
Dept. of Computer Science Engineering, School of Engineering, Anurag Group of Institutions
Apply bankers algorithm to determine weather it would be safe to grant each of the
following
(c )
1.
2.
(a)
(b)
(c)
(d)
requests.
A fourth process arrives, with a maximum memory need of 60 and an initial need of
25 units.
A fourth process arrives, with a maximum memory need of 60 and an initial need of
30 units.
1 is safe but not 2
2 is safe but not 1
Both 1 and 2 are safe
1 and 2 are not safe.
(5) `m' process share `n' resources of the same type. The maximum need of each process don't
exceed `n' and the sum of all their maximum needs is always less than m+n. In this set (a)
(a) Dead lock never occur
(b) Dead lock may occur
(c) Dead has to occur
(d) none.
UNIT-V
Syllabus:
Principles of deadlock – system model, deadlock characterization, deadlock prevention,
detection and avoidance, recovery form deadlock, I/O systems, Hardware, application interface,
kernel I/O subsystem, Transforming I/O requests Hardware operation, STREAMS, performance.
Objective:

Ability to identify deadlock in a system

Ability to prevent the deadlock .

Abilty to identify deadlock detect it and recover system from deadlock by using various
algorithms.
Academic Dairy Handbook III CSE I SEM
23
Dept. of Computer Science Engineering, School of Engineering, Anurag Group of Institutions
Lecture plan:
S.No
Topic
No. of
lectures
1
1
deadlock characterization
2
deadlock prevention, detection
2
3
avoidance, recovery form deadlock
1
I/O systems, Hardware, application interface, kernel I/O
subsystem
2
4
2
5
Transforming I/O requests Hardware operation, STREAMS,
performance.
7
Total classes to complete UNIT-V
8
Assisgnment:
1. Discuss various deadlock prevention and detection strategies.
2. Write a short note on streams and bankers algorithm
Case Study:
For each of the following below situations explain wheather it will or likely to improve cpu
utilization in windows and Linux operating system
1 Install a bigger page disk
2 Install a faster cpu
3 Increase the degree of multiprogramming
4 Install more main memory
5 Increase page size
6 Install faster hard disk or multiple controllers with multiple hard disks
Academic Dairy Handbook III CSE I SEM
24
Dept. of Computer Science Engineering, School of Engineering, Anurag Group of Institutions
Subjective Important Questions:
1. Explain the RAG algorithm for deadlock detection.
2. Discuss briefly about I/O devices, machine readable devices and communication
devices.
3. What are the various mechanisms for device interaction? Explain.
4. . Discuss about Direct Memory Access.
5. Explain the interrupt-driven I/O cycle.
Objective Questions:
1) _______fetches instructions from memory for execution. Ans:
CPU.
2) The collection of processes on the disk that is waiting to be brought into memory
for execution forms
.
Ans: input queue.
3) The address space of the computer starts at --------------- .
Ans: 00000H.
4) If we know where the process will reside in memory at compile time, then --------- can
be generated.
Ans: absolute code.
5) In Compile time Binding if at some time later, the starting location changes, then it
will be necessary to
this code.
Ans: recompile.
6) If memory location of an instruction is not known at compile then the compiler must
generate
code.
Ans: re locatable.
Academic Dairy Handbook III CSE I SEM
25
Dept. of Computer Science Engineering, School of Engineering, Anurag Group of Institutions
7) For --------------- address binding scheme we need hardware support for address maps
(e.g., base and limit registers).
Ans: Execution time.
8) Address generated by CPU is referred to as ------------address.
Ans: Logical.
9. Logical address is also referred to as --------------------- address.
Ans: Virtual.
10.The run-time mapping from virtual to physical addresses is done by a hardware device
called --------------------------------Ans : memory-management unit (MMU).
11. The base register is called ----------------- register.
Ans: relocation.
12. In MMU, the user program deals with `logical
addresses', it never sees the real -------------addresses.
Ans : Physical.
13. In MMU scheme, the value in the
register is added to every address generated by a
user process at the time it is sent to memory .
Ans: relocation.
3. With ------------- loading, a routine is not loaded until it is called.
Ans: dynamic.
4. Better memory-space utilization is done in ---------------- scheme.
Ans: Dynamic loading .
5. In Dynamic loading all routines are kept on disk in ---------------- format.
Academic Dairy Handbook III CSE I SEM
26
Dept. of Computer Science Engineering, School of Engineering, Anurag Group of Institutions
Ans: Re locatable load.
6. ---------- loading does not require special support from the operating system.
a) Static
b) Dynamic
c) Both
d) None Ans:
b) Dynamic.
7. The advantage of dynamic loading is that an routine is never loaded. Ans:
unused.
8. With dynamic linking, a ----------------is included in the image for each library-routine
reference.
Ans: Stub.
9. The piece of code that replaces itself with the address of the routine, and executes the
routine is called as
.
Ans: Stub.
10. henever the CPU scheduler decides to execute a process, it calls ---------------- .
Ans: the dispatcher.
11. swaps out a process currently in memory and swaps in the desired process. Ans:
Dispatcher.
12. The total transfer time is directly proportional to the ------------------- .
Ans: `amount of memory swapped'.
13. In Contiguous memory allocation scheme memory is usually divided into partitions.
Ans: Two.
14. In Contiguous memory allocation scheme the partitions are ------------ and --------------Ans: resident operating system and User processes.
15. ------------------- register contains range of logical addresses.
Ans: Limit.
Academic Dairy Handbook III CSE I SEM
27
Dept. of Computer Science Engineering, School of Engineering, Anurag Group of Institutions
16. -------------------- register contains value of smallest physical address.
Ans: Relocation.
17. In memory allocation techniques degree of multiprogramming is bound by ------------------ .
Ans: the number of partitions.
UNIT-IV
Syllabus:
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, efficiency and performance, case studies. UNIX, Linux, Windows
Objective:

Ability to identify file access methods

Ability to understand the various allocation methods of free space management.

Ability to understand the concept of file
Lecture plan:
S.No
Topic
No. of
lectures
1
1
concept of a file, Access Methods
2
Directory structure, protection
1
3
File system mounting, file sharing
1
4
File System implementation- File system structure
2
3
5
allocation methods, free-space management, efficiency and
performance
7
Revision
1
Total classes to complete UNIT-VI
9
Academic Dairy Handbook III CSE I SEM
28
Dept. of Computer Science Engineering, School of Engineering, Anurag Group of Institutions
Assisgnment:
1. What is a file? Discuss the concept of file and its structure and various operations performed on a file
2. Write short notes on
a. sequential file
b. indexed file
c. indexed sequential file
d .direct file
e free space management
f file allocation methods
Case Study:
Consider a file system where a file can be deleted and its disk space reclaimed while links to that
file still exists.what problem occurs when a new file is created in the same storage area or with
the same absolute path name .how can these problems will be avoided in UNIX operating
system.
Subjective Important Questions:
1. Briefly explain file sharing.
2. Explain in detail about file protection mechanism.
3. Define file system. What are its design problems? Explain the layered file system architecture.
4. Give an overview of file system implementation.
5. Write short notes on
a. partitions and mounting
b. virtual file system
c. Describe the linear list and hash table directory implementation methods.
6. Describe various file allocation methods.
Academic Dairy Handbook III CSE I SEM
29
Dept. of Computer Science Engineering, School of Engineering, Anurag Group of Institutions
7. Write about free space management.
8. Write about efficiency and performance of a disk.
9. Briefly write about file and directory structure in UNIX operating system
10. Explain the file management process in LINUX.
11. Write about file management in WINDOWS OS
12. What are the various ways of accessing a file?
13. 23.’A file is associated with certain information when it is opened’. Support your answer.
14. Describe indexed file and indexed sequential file organization
15. What is tree structured directory?
Objective Questions:
1) For convenient use of the computer system, the operating system provides a uniform ---- view of information storage.
Ans: Logical.
2) A is a sequence of bits, bytes, lines, or records that is stored in a permanent memory.
Ans : File.
3) Files are normally organized into -------- for easy usage.
Ans: `directories'.
4) Identify simplest access method?
a)
b)
c)
d)
Direct access.
Sequential access.
Index access.
Linked access.
Ans: b) Sequential access.
5) In Sequential access a read operation reads a portion of the file and automatically
advances a - -------------Ans: file pointer.
Academic Dairy Handbook III CSE I SEM
30
Dept. of Computer Science Engineering, School of Engineering, Anurag Group of Institutions
6) In direct access, a file is made up of fixed length that allows programs to read and write
records in any order.
Ans: logical records.
7) In direct access, a file is made up of fixed length logical records that allow programs to read
and write records
order.
Ans: in any.
8) In Direct access, the block number provided by the user is called as ---------- .
Ans : relative block number.
9) In Direct access, given a logical record length L, a request for record is turned into an UO
request for L bytes starting at location
within the file.
Ans: L * (N-1).
10) ------------------------------------------------------ The directory can be viewed as that
translates file names into their directory entries.
Ans: Symbol table.
11) --------------------------------------------------------------------------- The
problems
with Single level Directory structure are ------------------------------- and ----------- .
Ans: Naming problem & Grouping problem.
12) ------------------------------------------------------------------------------------------------------In Single
level Directory structure all files in the same directory must have -----------------------------names.
Ans: Unique.
Academic Dairy Handbook III CSE I SEM
31
Dept. of Computer Science Engineering, School of Engineering, Anurag Group of Institutions
UNIT-VII
Syllabus:
Mass-storage structure overview of Mass-storage structure, Disk structure, disk attachment disk
scheduling, swap-space management, RAID structure, stable-storage implementation, Tertiary
storage structure
Objective:

Ability to understand the concept of disk and RAID structure

Ability to get an overview of storage structure
Lecture plan:
S.No
1
Topic
overview of Mass-storage structure
No. of lectures
1
2
Disk structure
1
3
disk attachment, swap-space management
2
4
RAID structure, stable-storage implementation,
2
Tertiary storage structure
1
Total classes to complete UNIT-VII
7
5
Assisgnment:
1. Write about territory storage structure
2. Explain briefly about RAID,disk and mass storage structure
Case Study:
In Symbian OS, server-based protection of shared resources is used extensively. List out three
advantages that this type of resource coordination has in a microkernel environment. Speculate
as to how each of your advantages might affect a different kernel architecture.
Academic Dairy Handbook III CSE I SEM
32
Dept. of Computer Science Engineering, School of Engineering, Anurag Group of Institutions
Subjective Important Questions:
1. Discuss in detail about various tertiary devices.
2. What are the performance issues of tertiary-storage devices.
3. Discuss the problems with RAID.
4. How does an operating system support the removable storage media.
5. Discuss in detail about swap space management with example.
6. Write about different methods of disk management.
7. Describe about various disk performance parameters.
8. Explain the different disk scheduling algorithms with examples.
9. Briefly explain, disk formatting, Boot block, Bad blocks.
Objective Questions:
1. The memory allocation scheme subject to external fragmentation is [ d]
a) Multiple contiguous fixed partitions b) Pure and demand paging
c) Swapping d) Segmentation
2. with segmentation, if there are 64 segments, and the maximum segment size is 512 words, the
length Of the logical address in bits is _______.{15}
3. Fixed partitions are very ________ in memory utilization.{inefficient}.
4. RAID 4 levels give ……… [ c]
a) Mirrored disks b) bit-interleaved parity
c) Blocks – interleaved parity d) non- redundant stripping
5). RAID level 6 is also called …………….. {P+Q redundancy scheme.}
6) RAID level 5 is also called______.{block interleaved distributed parity}.
7) In RAID level 6 instead of parity, error correcting codes ______ are used.{Reed-Solomon
codes}.
Academic Dairy Handbook III CSE I SEM
33
Dept. of Computer Science Engineering, School of Engineering, Anurag Group of Institutions
8) RAID LEVEL 4 is also called as ______.{block interleaved parity organization}.
9) RAID level 3 is called bit interleaved parity organization.
10) RAID level 1 refers to__________{disk mirroring}.
11) RAID level 2 is called memory style error-correcting code organization.
12) A magneto optic disk comes under ________storage devices.{tertiary};
13) Phase change disk technology used in ______.{optical disk};
14) Swap space is only used as a backing store for pages of__________memory.{anonymous};
15. NAS device is a storage system that is accessed ____________ over a data network [c ]
a) Sequentially b) randomly c) remotely d) none
16. Scan and c-scan perform better for system that place_______________ on the disk [b ]
a) Light load b) heavy load c) average load d) specific load
17. A disk controller is used to perform a ………….. Operation {disk I/O operation}
18. File is ……………………….……. {Logical collection of data}..
19. NAS device is a storage system that is accessed ____________ over a data network [c]
a) Sequentially b) randomly c) remotely d) none
UNIT-VIII
Syllabus:
Protection : Protection, Goals of Protection, Principles of Protection, Domain of protection
Access Matrix, Implementation of Access Matrix, Access control, Revocation of Access Rights,
Capability- Based systems, Language – Based Protection, Security- The Security problem,
program threats, system and network threats cryptography as a security tool, user authentication,
implementing security defenses, firewalling to protect systems and networks, computer –security
classifications, case studies UNIX, Linux, Windows
Academic Dairy Handbook III CSE I SEM
34
Dept. of Computer Science Engineering, School of Engineering, Anurag Group of Institutions
Objective:

Ability to understand the concept of protection

Ability to identify program threats

Ability understand the concept of security

Ability finding usage of firewalls in protecting the system
Lecture plan:
S.No
Topic
No. of
lectures
1
1
Protection, Goals of Protection,
Principles of Protection
2
Domain of protection Access Matrix,
1
Implementation of Access Matrix,
Access control
1
3
4
Revocation of Access
1
1
5
Based systems, Language – Based
Protection
6
The Security problem, program threats,
1
1
7
system and network threats
cryptography as a security tool, user
authentication
1
8
implementing security defenses,
firewalling to protect systems and
networks
computer –security classifications
2
Total classes to complete UNIT-VIII
10
9
Academic Dairy Handbook III CSE I SEM
35
Dept. of Computer Science Engineering, School of Engineering, Anurag Group of Institutions
Assisgnment:
1) What are the goals and principles of protection?
2) What is an Access Matrix? How can it be used for protection? Explain some
implementation schemes of it. And compare various implemenatation techniques of
access matrix
Case Study:
Security in Symbian OS is focused on installation and Symbian signing of an installed
application? Is this enough? Would there ever be scenario where an application could be placed
in storage for execution without being installed?
Subjective Important Questions:
1) Write a short notes on
(a) Trojan horse.
(b) Trap door.
(c) Logic bomb.
(d) Viruses.
2) Discuss stack and buffer overflow attack with an example.
3) Discuss any two threats to system and network.
4) Explain in detail Denial of Service attack.
5) What is encryption? Explain symmetric and asymmetric encryption algorithm.
6) Describe different methods of message authentication?
7) Write about key distribution?
8) Explain with an example the implementation of cryptography?
9) Explain different methods of user authentication. Also discuss their advantages and
disadvantages.
Academic Dairy Handbook III CSE I SEM
36
Dept. of Computer Science Engineering, School of Engineering, Anurag Group of Institutions
Objective Questions:
1. The ability to do an operation on object is called? ANS: access right.
2. Access-right = -----------------rights-set>
?
ANS:
<object-name,
3. Will domains allowed to share the access rights? ANS: Yes; they are allowed to
share the access rights.
4. at are the 2 domains that System consists of ------------ ?
Supervisor domain.
5. In UNIX system each file has associated with ---
ANS:
User
domain,
? ANS: setuid bit
6. at is the use of Access matrix ----? ANS: with this we can view the protection as
matrix.
7. at `columns' and `rows' in Access matrix represents ------------ ?
domains, Columns represent objects
ANS:
Rows
represent
8. Threat is ? ANS: Potential security violation
9. Trojan horse environment.
? ANS: A code segment that misuses its
10. Logic bomb ? ANS: Program that initiates a security incident
under certain circumstances
11. Worm ------ ? ANS: It is a standalone program, use spawn
mechanism;
12. Domain is -------? ANS: it is set of objects and types of operations performed on
objects.
Academic Dairy Handbook III CSE I SEM
37
Dept. of Computer Science Engineering, School of Engineering, Anurag Group of Institutions
13. Objects are essentially ---abstract types.
? ANS:
14. What is the operation of domain, over policy, mechanism? ANS:
domain will separate the policy and mechanism.
15. What will a mechanism do? ANS: mechanism will decide how some
thing will be done.
16. What will a policy do? ANS: Policy decides what
will be done.
17. Each object will have a list of bit patterns called ---locks.
?ANS:
18. Each domain will have a list of bit patterns called ----- ? ANS: keys.
19. A master key associate with each object can be defined or replaced
with ------------------------------------------------------------- ? ANS: set-key
Academic Dairy Handbook III CSE I SEM
38