[go: up one dir, main page]

0% found this document useful (0 votes)
87 views16 pages

New 302 Cs-Al Os

Uploaded by

Payal Govindani
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
87 views16 pages

New 302 Cs-Al Os

Uploaded by

Payal Govindani
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 16

LNCT University, BHOPAL

BTech. III SEM


CSE/AIML , III-Semester

Operating Systems (CS-302)

COURSE OUTCOMES:
After Completing the course student should be able to
CO1 Compare various types of operating systems
CO2 Analyse fcfs, sstf, scan and look disk scheduling algorithm techniques
CO3 Implement fcfs, sjf, priority, rrcpu scheduling algorithm.
CO4 Summarize various memory management techniques.
CO5 Differentiate between remote procedure call and remote method invocation.

Course content

Unit-1 Basics of Operating Systems: Definition – Generations of Operating systems – Types of Operating Systems,
OS Service, System Calls, OS structure: Layered, Monolithic, Microkernel Operating Systems – Concept of Virtual
Machine. Process Management. Processes: Definition , Process Relationship , Process states , Process State
transitions , Process Control Block ,Context switching – Threads – Concept of multithreads , Types of threads.
Process Scheduling: Definition , Scheduling objectives ,Types of Schedulers ,Scheduling criteria : CPU utilization,
Throughput, Turnaround Time, Waiting Time, Response Time (Definition only) , Scheduling algorithms : Pre
emptive and Non , pre emptive , FCFS – SJF – RR , Multiprocessor scheduling , IPC.
UNIT- II Definition, Deadlock characteristics, Deadlock Prevention, Deadlock Avoidance: banker’s algorithm,
Deadlock detection and Recovery. Race Conditions, Critical Section, Mutual Exclusion, Hardware Solution, Strict
Alternation, Peterson’s Solution, The Producer Consumer Problem, Semaphores, Event Counters, Monitors,
Message Passing, and Classical IPC Problems: Reader’s & Writer Problem, Dinning Philosopher Problem etc.,
Scheduling, Scheduling Algorithms
Unit – III Basic Memory Management: Definition, Logical and Physical address map, Memory allocation :
Contiguous Memory allocation – Fixed and variable partition – Internal and External fragmentation and Compaction
, Paging : Principle of operation – Page allocation – Hardware support for paging – ,Protection and sharing –
Disadvantages of paging.
Virtual Memory: Basics of Virtual Memory – Hardware and control structures – Locality of reference, Page fault ,
Working Set , Dirty page/Dirty bit – Demand paging ( Concepts only) – Page Replacement policies : Optimal (OPT)
, First in First Out (FIFO), Second Chance (SC), Not recently used (NRU) and Least Recently used (LRU)
Unit – IV Principles of I/O Hardware: I/O devices, Disk structure, Disk scheduling algorithm File concept, Aaccess
methods, File types, File operation, Directory structure, File System structure, Allocation methods
(contiguous ,linked, indexed), Free-space management (bit vector, linked list, grouping).
Unit -V Security Environment, Design Principles Of Security, User Authentication, Protection Mechanism:
Protection Domain, Access Control List Introduction to Network, Distributed and Multiprocessor Operating
Systems. Case Studies: Unix/Linux, WINDOWS and other Contemporary Operating Systems.
Books Suggested:
1. Modern Operating system by Andrew S. Tanenbaum , PHI
2. Operating system concepts, by Abraham Silberschatz, Willey.

SOCST
LNCT University, BHOPAL

List of Experiment
1. Write a program to implement FCFS CPU scheduling algorithm.
2. Write a program to implement SJF CPU scheduling algorithm.
3. Write a program to implement Priority CPU Scheduling algorithm.
4. Write a program to implement Round Robin CPU scheduling algorithm.
5. Write a program to compare various CPU Scheduling Algorithms over different
Scheduling Criteria.
6. Write a program to implement classical inter process communication problem(producer
consumer).
7. Write a program to implement classical inter process communication problem(Reader
Writers).
8. Write a program to implement classical inter process communication
roblem(Dining_Philosophers).
9. Write a program to implement & Compare various page replacement algorithm.
10. Write a program to implement & Compare various Disk & Drum scheduling Algorithms
11. Write a program to implement Banker’s algorithms.
12. Write a program to implement Remote Proccedure Call(RPC).
13. Write a Devices Drivers for any Device or pheriperal.

SOCST
LNCT University, BHOPAL

Course Planning and Coverage (CPC)

Sub- Name of Subject Academic Branch Sem. w.e.f. Classes


ject Session /Sec.
Code
CS301 Operating System CSE III

Lect. Topics to be Covered (Planning) Topics Actually


No. Taught (Covered)
Title Dat Tar- Instructional Title Dat Covere
e get Meth Aid Refer- e d CO
CO od ences No.
No.
Introduction to Oper- CO1
ating Systems
1 Definition and Function of CO1 Book1
Operating Systems R1
2 Generations of Operating CO1 Book1
system
3 Various Types of Operat- CO1 Book1
ing System
4 Differentiate and working CO1 Book1
ways of Various Types of
Operating
5 System providing these CO1 Book3
Services – Utility Pro-
grams, System Calls
6 How to generate various CO1 Book3
types of system calls in C
language
7 OS structure CO1 Book1

8 Concept of virtual machine CO1 Book2

9 Processes: CO1 Book1


Defination,states

SOCST
LNCT University, BHOPAL

10 PCB,Context switching CO1


Book1

11 Threads, concept of multi- CO1


threads Book1

12 Types of threads ,Types of CO1 Book1


Schedulars

13 Process Scheduling: Ob- CO1


jectives ,Types, Criteria Book1

14 Numerical on different CO1 Book1,


types of CPU Scheduling BOOK
Algorithms 3
15 Numerical on different CO1 Book1,
types of CPU Scheduling BOOK3
Algorithms and compar-
ison between various CPU
scheduling algorithms
16 CPU utilization Criteria CO1 BOOK1

17 Multiprocessor CO1 Book1


Scheduling,IPC
18 Deadlock CO2

19 Deadlock:Defination,Char- CO2 Book1


acteristics Examples
20 Deadlock Prevention , CO2 Book1
Deadlock Avoidance:
Banker’s Algorithm
21 Numerical on Banker’s CO2 Book1
Algorithm
22 Deadlock Detection and re- CO2 Book1
covery
23 Race condition and solu- CO2 Book2
tion on Critical Section
Problem
24 Concept of Mutual Exclu- CO2 BOOK3
sion and its Hardware solu-
tion
25 Petersons solution , Produ- CO2 BOOK3
cer consumer problem and
its solution
26 Concepts of Semaphores CO2 BOOK3
and Monitors

SOCST
LNCT University, BHOPAL

27 Message Passing and Clas- CO2 BOOK3


sical IPC Problems
28 Examples of Classical IPC CO2 BOOK3
Problems

29 Examples of Classical CO2 BOOK3


IPC Problems

30 Memory Management: CO3

31 Definition ,Logical Vs CO3 BOOK1


Physical address mapping

32 Different types of Memory CO3 BOOK1


Allocation Techniques
33 Pros and Cons of Different CO3 BOOK1
types of Memory Alloca-
tion Techniques

34 Numerical on Fixed and CO3 BOOK1


Variable partition

35 memory allocation tech- CO3 BOOK1


niques
36 Numerical on Contiguous CO3 BOOK1
and non-contiguous
memory allocation tech-
niques
37 Concept of Fragmentation CO3 BOOK1
and its types
38 Various Methods to solve CO3 BOOK1
the problem of Fragmenta-
tion, Compaction
37 Concept of paging: Defini- CO3 BOOK1
tion, Memory allocation
method through Paging
38 Numerical on Paging CO3 BOOK1

39 Pros and Cons of Paging CO3 BOOK1


Memory Allocation tech-
niques
40 Concept of Segmentation CO3 BOOK1
and its Numerical
41 Comparison between Pa- CO3 BOOK1
ging and Segmentation

SOCST
LNCT University, BHOPAL

42 Virtual Memory: Defina- CO3 BOOK1


tion,Hardware and control
structure
43 Give more concepts of Vir- CO3 BOOK1
tual Memory Advantages
and Disadvantages
44 Demand Paging, Pure Vir- CO3 BOOK1
tual Memory
45 Locality of refer- CO3 BOOK1
ence, Page fault
46 Concept of working set CO3 BOOK1
model and various Page re-
placement policies
47 Comparison between vari- CO3 BOOK1
ous Page replacement al-
gorithms
48 Numerical on various CO3 BOOK1
Page replacement al-
gorithms
Principles of I/O Hard- CO4
ware

49 I/O devices, Disk structure CO4 BOOK2

50 Disk scheduling algorithm, CO4 BOOK1


Compassion of various al-
gorithms

51 Advantages and Disadvant- CO4 BOOK1


ages of Each Disk Schedul-
ing Algorithms
52 Numerical on Disk CO4 BOOK1
Scheduling Algorithms
53 File concept, Access meth- CO4 BOOK1
ods, File types,
54 File operation, Directory CO4 BOOK1
structure

55 FileAllocation methods CO4 BOOK1


Free-space management
56 Numerical on Free-space CO4 BOOK
management 1
Security

SOCST
LNCT University, BHOPAL

57 Security Environment, De- CO5 BOOK


sign Principles Of Security 3

58 User Authentication, Pro- CO5 BOOK


tection 3
59 Protection Protection Do- CO5 BOOK
main, Access Control List 3
Mechanism,
60 Introduction to Network, CO5 BOOK3
Distributed OS
62 Case Studies: Unix/Linux CO5
63 Case Studies: WINDOWS CO5 BOOK3
and other Contemporary
OS

Signature with Date


Start End of Session
Name Designation
of
Ses-
sion
Faculty
Checked By Dr. Megha Kamble HOD
Approved By Dr.A.K Sachan Principal

References
ABRAHAM SILBERSCHATZ, PETER B. GALVIN, GREG GAGNE, “Operating System
R1: Concepts”, Wiley, 9/E
R2: William Stallings,"Operating Systems" Internals and Design Principles, Pearson
R3: D.M DHAMDARE “Operating System and System Programming”

Operating System CS-302


Assignment SheetAssignment 1 (CO1)

SOCST
LNCT University, BHOPAL

1) What is an Operating System? Write down its desirable characteristics.


2) Discuss different types of operating System with example of each.
3) What is meant by a System Call? How it can be used? How does an application program use
these calls during execution?
4) Explain the concept of a process with its component.
5) Define process state.
6) Draw the diagram of PCB? Explain its various entities with their usefulness.
7) What is process scheduling? Explain short, mid/medium and long term scheduler?

Assignment 2 (CO 2)
1) Explain Deadlock. What are the necessary conditions for deadlock?
2) What is safe state? Describe an algorithm to check whether a given state is safe or not.
3) Discuss Banker’s algorithm with example.
4) Compare deadlock prevention and deadlock avoidance.
5) Explain Dinning Philosopher problem

Assignment 3 (CO 3)

1) What is Virtual Memory? Explain the concept of Demand Paging.


2) What is thrashing? Explain various causes of thrashing?
3) Compare paging and segmentation with example.
4) Consider the main memory with capacity of 3 frames assume that page of process are referenced
in the order as given below. 7,0,1,2,0,3,0,4,2,3,0,3 Which one is better FIFO or LRU and why?
5) What is fragmentation? Give difference between internal fragmentation and internal fragmenta-
tion.

Assignment 4 (CO 4)

1) Explain various disk scheduling algorithms.


2) Discuss various file allocation method with an example.
3) Explain the disk architecture.
4) A disk drive has 200 cylinders, numbered 0 to 199. The drive is currently serving a request at
cylinder 53. The queue of pending requests in FIFO order is 98, 183, 37, 122, 14, 124, 65, 67.
Starting from the current head position, What is the total distance that the disk arm moves to sat-
isfy all the pending request for each of the following disk algorithms- a) FCFS b) SSTF c)
SCAN d) LOOK e) C-SCAN f) C-LOOK

Assignment 5 (CO 5)

1) Write short note on:

SOCST
LNCT University, BHOPAL

a) Distributed and Multiprocessor Operating System


b) Features of Windows and Linux.
2) Explain network Operating system.
3) Compare the file system of Windows and Unix\Linux.
LNCT UNIVERSITY

First Mid Semester Examination

Subject Name (CS/AIML-302)

Branch :CS/AIML Semester:

Time 1:30 Hrs Max. Marks 20


Note: All questions are compulsory

Q.1 What is Operating System? Give the types of Operating System


OR

Q.1 What is Thread? Explain thread structure. (CO 1 5marks)

Q.2. What is Scheduler? Explain queuing diagram representation of process Scheduler with figure.
OR
Q.2 What is Process Control Block? Give the difference between a process and a program.
(CO1 5marks)

Q.3. What do you mean by Deadlock Avoidance? Explain the use of Banker’s Algorithm for Deadlock
Avoidance with illustration. OR

Q.3 What is Virtual Memory? Explain (CO2 5 marks)

Q.4What is Deadlock? List the conditions that lead to deadlock. How Deadlock can be prevented?
OR

Q.4. Five batch jobs A to E arrive at same time. They have estimated running times 10,2,6,8,4 minutes. Their
priorities are 3,2,5,4,1 respectively with 5 being highest priority. For each of the following algorithm
determine mean process turnaround time. Ignore process swapping overhead. Round Robin (q=3), Priority
Scheduling, FCFS, SJF. (CO2 5 marks)

Second Mid Semester Examination

Operating system (CS/AL-302)

Branch :CS/AIML/DS Semester: III

Time 1:30 Hrs Max. Marks 20

Note: All questions are compulsory

SOCST
LNCT University, BHOPAL

6
Q.1 What is Page Fault? Explain the process with the help of diagram. Also, define swapping CO3 (6marks)

OR

Q.1 Explain the LRU page replacement algorithm. Why is it difficult to implement it in pure form?

Q.2What is File system and what are the various File access method?
CO4 (6 marks)

OR

Q.2 Compare various disk scheduling algorithm by taking suitable example.

Q.3 What do you mean by Virtual memory? Why is it needed? Discuss the hardware support required by the operating
system to implement the virtual memory concept. CO5 (8 marks)

OR

Q.3 What is location of reference and explain its use? What is working set? What is it used for? Also discuss the working
set medal in detail.

END SEM SAMPLE PAPER

LNCT UNIVERSITY, BHOPAL


Enrolment No. ………………

CS-302/ AL-301
B.TECH (CSE/AIML/DS)V SEMESTER
EXAMINATION
OPERATING SYSTEM

Maximum Marks: 70 Time Allowed: 3Hours

SOCST
LNCT University, BHOPAL

Note:- Attempt all questions internal choice are given.

(SECTION –A)

1. Short Answer Type Question (Attempt Any Five) [5x6=30]

i. Define an operating system? What are the services of operating system?


ii. Write a semaphore solution for dining philosopher’s problem.
iii. What is Virtual memory? Explain page replacement policies.
iv.

v. iii. Write a short note on


a) Disk Allocation methods
b) Free space management

iv. What do you mean by the term user Authentication and Access control list.
vi. What is file? Explain file attributes and file operations.
vii. What is Fragmentation? Explain Difference between Internal and External Fragmentation.

(SECTION –B)

2. Long Answer Type Question (Attempt Any Four) [4x10=40]

i. Consider the following set of processes.


Process Burst time Arrival time
P1 3 0
P2 5 1
P3 2 2
P4 5 3
P5 5 4

Develop a Gantt-chart and calculate the average waiting time using:


a. SJF
b. Round Robin (time quantum=2)
ii. What is a deadlock? What methods are used for handling deadlock? How can we get recovery from deadlock?

iii. Explain classification of Memory management scheme? Discuss the advantages and disadvantages of non-con -
tiguous storage allocation.
iv. Suppose that a disk drive has 200 cylinders, numbered 0 to 199. The work queue is: 23, 89, 132, 42, 187. The
disk head starts at number 100. Determine the total distance for the following disk scheduling algorithms:
a) Scan b) Look c) C-Look d) FCFS
v. Discuss case study of LINUX and UNIX operating system.

SOCST
LNCT University, BHOPAL

6
vi. What is Race condition? Explain Producer Consumer problem.
Define Process and Process States. Draw the diagram of PCB.

Quiz/Assignments Sheets (CO-Based)


Unit – I

1) Which of the following is not an operating system?


 Windows
 Linux
 Oracle
 DOS
2) BIOS is used?
 By operating system
 By compiler
 By interpreter
3 ) By application software When was the first operating system developed?
 1948
 1949
 1950
1951
4) What type of scheduling is round-robin scheduling?
 Linear data scheduling
 Non-linear data scheduling
 Preemptive scheduling

SOCST
LNCT University, BHOPAL

6
Non-preemptive scheduling

5) Which of the following scheduling algorithms is preemptive scheduling?


 FCFS Scheduling
 SJF Scheduling
 Network Scheduling
SRTF Scheduling

Unit – II
1) Which of the following algorithms is used to avoid deadlock? (C02)
 Dynamic Programming algorithm
 Primarily algorithms
 Banker's algorithm
 Deadlock algorithm
2) RAG stands for : (C02)
 Resource and Graph
 Resource Allocation Graph
 Resource and Graph
 None of these
3) A safe state is : (C02)
 Deadlock state
 No deadlock state
 Polling state
 None of these

4) To recover deadlock method is used : (C02)


 Process termination
 Resource preemption
 Both above

SOCST
LNCT University, BHOPAL

 None of these
Unit – III

1) Moving a process from main memory to disk is called : (C03)


 Scheduling
 Caching
 Swapping
 Spooling
2) When does page fault occur? (C03)

The page is present in memory.


The deadlock occurs.
The page does not present in memory.
The buffering occurs.
3) If the page size increases, the internal fragmentation is also? (C03)
 Decreases
 Increases
 Remains constant
 None of these
4) MMU stands for (C03)
 Main memory unit
 Main management unit
 Memory management unit
 None of these
5) CPU generates (C03)
 Logical addresses
 Physical addresses
 Relocatable addresses

SOCST
LNCT University, BHOPAL

 None of these
Unit – IV
What is the full name of FAT? (CO4)
 File attribute table
 File allocation table
 Font attribute table
 Format allocation table
Which method is the best among file allocation methods? (CO4)
 Linked
 Contiguous
 Indexed
 None of the these
A collection of related information defined by its user is known as (CO4)
 File
 Directory
 Disk
 None of the these
A heart of NTFS is (CO4)
 MVT
 MFT
 MDT
 None of the these

Unit – V
Which of the following operating system does not require a command to run? (CO5)
 Kali Linux
 Windows

SOCST
LNCT University, BHOPAL

 Unix
 All of the these

SOCST

You might also like