Oslessonplan24 Deceafter

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 25

K. L. E.

Society's

B. V. Bhoomaraddi College of Engineering & Technology, Hubli.

DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING

FMTH0301/Rev.5.2
Course Plan

Semester: VI Semester Year: 2016-2017


Course Title: Operating System Course Code: CSC324
Total Contact Credits: 4 Duration of SEE Credits: 3
SEE Marks: 50 CIA Marks: 50
Lesson Plan Author: Mrs.Shantala Giraddi, , Nagarathna D. K. Date: 19-12-2016
Checked By: Mr.Vijay Biradar Date: 23-12-2016

Prerequisites:
Computer Organization, Data Structures, High level language such as C and knowledge of assembly
language

Course Outcomes (COs):


At the end of the course the student should be able to:

i. Understand the role that the operating system plays in the management of the various
resources of computer system.
ii. Discuss the basic issues in process management.
iii. Distinguish between the different deadlock prevention and avoidance schemes.
iv. Evaluative and analyze various algorithms in memory management
v. Implement operating system components

Powered by www.ioncudos.com Page 1 of 25.


K. L. E. Society's

B. V. Bhoomaraddi College of Engineering & Technology, Hubli.

DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING

Course Articulation Matrix: Mapping of Course Outcomes (COs) with Program


Outcomes (POs)
Course Title: Operating System Semester: 6 - Semester
Course Code: CSC324 Year: 2016-17

Course Outcomes (COs) / Program 1 2 3 4 5 6 7 8 9 10 11 12 13 14


Outcomes (POs)
1. Understand the role that the operating M
system plays in the management of
the various resources of computer
system.
2. Discuss the basic issues in process L M
management.
3. Distinguish between the different H M
deadlock prevention and avoidance
schemes.
4. Evaluative and analyze various L M
algorithms in memory management
5. Implement operating system L M
components

Degree of compliance L: Low M: Medium H: High

Powered by www.ioncudos.com Page 2 of 25.


K. L. E. Society's

B. V. Bhoomaraddi College of Engineering & Technology, Hubli.

DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING

Competency addressed in the Course and corresponding Performance Indicators

Competency Performance Indicators


1.4 :Demonstrate competence in computer 1.4.1. Apply knowledge of suitable data structures
science engineering knowledge. and / or programming paradigm to solve problems.
1.4.4 Apply machine dependent/independent
features to build system modules.
2.1 :Demonstrate an ability to identify and 2.1.3. Identify the mathematical, engineering and
characterize an engineering problem other relevant knowledge that applies to a given
problem.
14.1 :Demonstrate an ability to construct a 14.1.2 Construct a software system of varying
software system using appropriate design and complexity using structured programming paradigm.
development principles

Eg: 1.2.3: Represents Program Outcome ‘1’, Competency ‘2’ and Performance Indicators
‘3’.

Self study component

CO Activity Deliverables Assessment Weight Week of


parameters age in conduct
marks
1. Implement Implementation of Demonstrate  Implementation 10M 1-4th week
operating operating system
system shell  Functionality of
components command.

2. Implement Porting of XINU to Demonstrate Working of 15M 10th week


operating Raspberry pi Raspberry pi with
system OS
components

Course Content

Powered by www.ioncudos.com Page 3 of 25.


K. L. E. Society's

B. V. Bhoomaraddi College of Engineering & Technology, Hubli.

DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING

Course Code: CSC324 Course Title: Operating System


L-T-P-Self Study: 4-0-0-0 Credits: 4 Contact Hrs: 4
CIA Marks: 50 SEE Marks: 50 Total Marks: 100
Teaching Hrs: 4 Exam Duration: 3 hrs

Content Hrs
Unit - 1
Chapter No. 1.Introduction and Systems structures 5 hrs
Operating system definition; Operating System operations; Different types of operating
system – Mainframe systems, Multi programmed systems, Time sharing systems, Desktop
systems, Parallel systems, Distributed systems, Real time systems, Clustered systems,
Handheld systems. Operating System Services; User - Operating System interface; System
calls; Types of system calls; Operating System structure; Virtual machines
Chapter No. 2. Process Management 8 hrs
Process concept; Process scheduling; Operations on processes; Inter-process
communication. Multi-Threaded Programming: Overview; Multithreading models; Thread
Libraries; Threading issues. Process Scheduling: Basic concepts; Scheduling criteria;
Scheduling algorithms; Multiple-Processor scheduling; Thread scheduling.
Chapter No. 3.Process Synchronization 7 hrs
Synchronization: The Critical section problem; Peterson’s solution; Synchronization
hardware; Semaphores; Classical problems of synchronization; Monitors.
Unit - 2
Chapter No. 4.Deadlocks 7 hrs
Deadlocks: System model; Deadlock characterization; Methods for handling deadlocks;
Deadlock prevention Deadlock avoidance; Deadlock detection and recovery from deadlock.
Chapter No. 5. Memory Management 8 hrs
Memory Management Strategies: Background; Swapping; Contiguous memory allocation;
Paging; Structure of page table; Segmentation. Virtual Memory Management: Background;
Demand paging, Page replacement; Allocation of frames; Thrashing.
Chapter No. 6. File System, Implementation of File System 5 hrs
File System: File concept; Access methods; Directory structure; File system mounting; File
sharing; Protection. Implementing File System: File system implementation; Directory
implementation; Allocation methods; Free space management.
Unit - 3
Chapter No. 7.Embedded Operating Systems 5 hrs
Introduction to Embedded operating system, comparison of Embedded Operating System
and GPOS , Characteristics of Embedded Operating System , Case study of ECOS .
Chapter No. 8. Mobile Operating Systems 5 hrs

Powered by www.ioncudos.com Page 4 of 25.


K. L. E. Society's

B. V. Bhoomaraddi College of Engineering & Technology, Hubli.

DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING

Introduction to Android, App Developer's View, Overall Architecture, Linux Kernel ,Wake
locks, Hardware Support ,Native User-Space Dalvik and Android's Java, System Services,
Stock AOSP Packages, System Startup

Powered by www.ioncudos.com Page 5 of 25.


K. L. E. Society's

B. V. Bhoomaraddi College of Engineering & Technology, Hubli.

DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING

Text Book (List of books as mentioned in the approved syllabus)

1. Abraham Silberschatz, Peter Baer Galvin, Greg Gagne: Operating System Principles, 9th
edition, Wiley-India, 2006.
2. William Stallings,”Operating System Internals and Design Principles”, 5edition, Pearson
Education, Asia, 2005
3. Smart phone operating system concepts with Symbian O.S. A tutorial guide by Michael J.
Jipping. Symbian Press, Wiley

References

1. Gary Nutt,” Operating System”3 edition, Pearson Education,2004


2. D.M Dhamdhere: Operating systems - A concept based Approach, 2nd Edition, Tata
McGraw- Hill, 2002.
3. P.C.P. Bhatt: Operating Systems, 2nd Edition, PHI, 2006.

Evaluation Scheme
CIE Scheme

Assessment Weightage in Marks


Minor Exam 1 20
Minor Exam 2 20
Activity 10
Total 50

Powered by www.ioncudos.com Page 6 of 25.


K. L. E. Society's

B. V. Bhoomaraddi College of Engineering & Technology, Hubli.

DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING

Course Unitization for Minor Exams and Semester End Examination

No. of No. of No. of


Topics / Chapters Teaching Questions Questions Questions
hours in Minor in Minor in SEE
Exam 1 Exam 2
Unit I
1.Introduction and Systems structures 5 0.75 -- 0.75
2. Process Management 8 1.25 -- 1.25
3. Process Synchronization 7 1.00 -- 1.00
Unit II
4. Deadlocks 7 -- 1.00 1.00
5. Memory Management 8 -- 1.50 1.50
6. File System, Implementation of File System 5 -- 0.50 0.50
Unit III
7. Embedded operating systems 5 -- -- 1
8.Mobile Operating Systems 5 -- -- 1

Note
1. Each Question carries 20 marks and may consists of sub-questions.
2. Mixing of sub-questions from different chapters within a unit (only for Unit I and Unit II) is
allowed in Minor I, II and SEE.
3. Answer 5 full questions of 20 marks each (two full questions from Unit I, II and one full
question from Unit III) out of 8 questions in SEE.

Date: Head of Department

Powered by www.ioncudos.com Page 7 of 25.


K. L. E. Society's

B. V. Bhoomaraddi College of Engineering & Technology, Hubli.

DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING

Chapter wise Plan

Course Code and Title: CSC324 / Operating System


Chapter Number and Title: 1.Introduction and Systems structures Planned Hours: 5 hrs

Learning Outcomes:-
At the end of the topic the student should be able to:

Topic Learning Outcomes COs BL CA Code


1. Define Operating System CO1 L1 1.4
2. Identify the goals of an operating system CO1 L2 1.4
3. Discuss the different kinds of operating systems CO1 L2 1.4
4. Explain the concept of spooling CO1 L2 1.4
5. Discuss the services provided by Operating system CO1 L2 1.4
6. Explain different types of system calls CO1 L2 1.4
7. Compare the characteristics of different structures of the Operating CO1 L3 1.4
Systems
8. Compare Virtual machine and non- Virtual machine CO1 L3 1.4

Lesson Schedule
Class No. - Portion covered per hour
1. Operating System definition : Operating System operations
2. Different types of operating systems: Mainframe Systems, Multi-programmed systems,
Time sharing systems, Desktop Systems
3. Parallel systems, Distributed Systems, Real Time Systems. Clustered Systems, Handheld
Systems.
4. Operating System services: User-operating system interface;
5. System calls ;types of system calls; system structure; Virtual machines

Review Questions
Sl.No. - Questions TLOs BL PI Code
1. Give an example of an operational environment when the system would TLO3 L2 1.4.4
have to be both multi-programming and on-line system
2. When do we say a system is "multi-programming"? When do we say it is TLO3 L2 1.4.4
an "online" system?
3. Explain the difference between platform and environment TLO3 L2 1.4.4

Powered by www.ioncudos.com Page 8 of 25.


K. L. E. Society's

B. V. Bhoomaraddi College of Engineering & Technology, Hubli.

DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING

4. Differentiate between multiprogramming and timesharing systems. TLO3 L2 1.4.4


5. With a neat diagram explain SPOOLING. What is impact of SPOOLING TLO4 L2 1.4.4
on system performance?
6. Compare layered and modular structuring of OS TLO7 L2 1.4.4
7. What is the main advantage for an OS designer of using virtual machine TLO8 L2 1.4.4
architecture?
8. Compare virtual machine and non-virtual machine. TLO8 L2 1.4.4

Powered by www.ioncudos.com Page 9 of 25.


K. L. E. Society's

B. V. Bhoomaraddi College of Engineering & Technology, Hubli.

DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING

Course Code and Title: CSC324 / Operating System


Chapter Number and Title: 2. Process Management Planned Hours: 8 hrs

Learning Outcomes:-
At the end of the topic the student should be able to:

Topic Learning Outcomes COs BL CA Code


1. Define and Explain different states of a process CO2 L2 1.4
2. Explain the information in Process Control Block CO2 L2 1.4
3. Explain various types of operation performed on a process CO2 L3 1.4
4. Apply and Compare the performance of various scheduling CO2 L3 2.1
algorithms
5. Compare the different types of Threads CO2 L3 1.4
6. Compare and contrast process and Thread CO2 L3 1.4

Lesson Schedule
Class No. - Portion covered per hour
1. Process Concept: Process scheduling
2. Operations on processes
3. Inter-process communication.
4. Multithreaded Programming: Overview
5. Multithreading models; Thread libraries; threading issues.
6. CPU scheduling: Basic concepts; Scheduling criteria
7. Scheduling algorithms
8. Multiple processor scheduling; Thread scheduling

Review Questions
Sl.No. - Questions TLOs BL PI Code
1. With the help of a detailed process state diagram, explain the different TLO1 L2 1.4.4
states in which a process can be in the system highlighting the different
transitions.
2. Differentiate between different exec system calls. TLO1 L2 1.4.4
3. Typically what is the process information Unix OS maintains? TLO2 L2 1.4.4

Powered by www.ioncudos.com Page 10 of 25.


K. L. E. Society's

B. V. Bhoomaraddi College of Engineering & Technology, Hubli.

DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING

4. What is the use of a process control block? Discuss the changes in the TLO2 L2 1.4.4
PCB chains when a. A process makes an I/O request b. A process
completes an I/O Operation.
5. Consider a process with the following code for (i = 0; i < n; i++) fork(); TLO4 L3 1.4.4
How many concurrent tasks can be performed by the code?
6. Suppose we have a single processor, jobs arrive in the order given in TLO4 L3 2.1.3
table below. Process Arrival Time(in ms) Burst Time P0 0 6 P1 1 3 P2 2 1
P3 3 4 Apply the following scheduling algorithms FCFS SJF and RR with
various quantum times With the following assumptions The context
switching takes 1 time unit. None of the jobs require IO. Compare the
performance of various of various algorithms
7. Suppose we have two resident processes P1 and P2 with the TLO4 L3 2.1.3
following burst time observed during the last four CPU allocations
P1 3 3 4 4
P2 5 7 4 4 Using an exponential averaging technique predict the
next burst time for P1 and P2.
8. Consider three processes, all arriving at time zero, with total execution TLO4 L3 2.1.3
time of 10, 20 and 30 units, respectively. Each process spends the first
20% of execution time doing I/O, the next 70% of time doing computation,
and the last 10% of time doing I/O again. The operating system uses a
shortest remaining compute time first scheduling algorithm and schedules a
new process either when the running process gets blocked on I/O or when
the running process finishes its compute burst. Assume that all I/O
operations can be overlapped as much as possible. For what percentage of
time does the CPU remain idle
9. Compare process and thread TLO6 L2 1.4.4

Powered by www.ioncudos.com Page 11 of 25.


K. L. E. Society's

B. V. Bhoomaraddi College of Engineering & Technology, Hubli.

DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING

Course Code and Title: CSC324 / Operating System


Chapter Number and Title: 3.Process Synchronization Planned Hours: 7 hrs

Learning Outcomes:-
At the end of the topic the student should be able to:

Topic Learning Outcomes COs BL CA Code


1. Discuss software race condition problem CO2 L3 1.4
2. Explain the hardware instructions to solve critical section problem CO2 L2 1.4
3. Apply the various mechanisms for process synchronization CO2 L3 2.1

4. Discuss the different Classical problems of synchronization CO2 L3 1.4

Lesson Schedule
Class No. - Portion covered per hour
1. Synchronization: The critical section problem:
2. Peterson’s solution;
3. Synchronization hardware
4. Semaphores
5. Classical problems of synchronization
6. Classical problems of synchronization (cont)
7. Monitors

Review Questions
Sl.No. - Questions TLOs BL PI Code
1.Assume two operations A(counter++) B(counter--) reg1= counter; reg1= TLO1 L3 1.4.4
Reg1+1; Counter = reg1; Show computation sequence to show how race
condition can occur.
2.Discuss the disadvantage of using hardware instruction for solving critical TLO2 L2 1.4.4
section problems .
3.Write the algorithms for wait () and signal () functions. Explain their usage TLO3 L2 1.4.4
in an example .
4.Explain in brief hardware synchronization instructions .How mutual TLO3 L2 1.4.4
exclusion can be implemented using one of them.

Powered by www.ioncudos.com Page 12 of 25.


K. L. E. Society's

B. V. Bhoomaraddi College of Engineering & Technology, Hubli.

DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING

5. Consider the methods used by processes P1 and P2 for accessing their TLO3 L3 2.1.3
critical sections whenever needed, as given below. The initial values of
shared Boolean variables S1 and S2 are randomly assigned. Method Used
by P1 while (S1 == S2) ; Critica1 Section S1 = S2; Method Used by P2
while (S1 != S2) ; Critica1 Section S2 = not (S1); With the above
mechanism, state whether mutual exclusion and progress are achieved by
the system

Powered by www.ioncudos.com Page 13 of 25.


K. L. E. Society's

B. V. Bhoomaraddi College of Engineering & Technology, Hubli.

DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING

Course Code and Title: CSC324 / Operating System


Chapter Number and Title: 4.Deadlocks Planned Hours: 7 hrs

Learning Outcomes:-
At the end of the topic the student should be able to:

Topic Learning Outcomes COs BL CA Code


1. Explain deadlock and identify the necessary conditions for the CO3 L2 1.4
deadlock to occur.
2. Compare different Deadlock Avoidance algorithms to protect the CO3 L3 1.4
system from Deadlock.
3. Discuss the methods for handling deadlocks and preventing CO3 L3 1.4
deadlock.
4. Apply the appropriate algorithm to detect and recover from CO3 L3 2.1
Deadlocks

Lesson Schedule
Class No. - Portion covered per hour
1. Deadlock System Model and Deadlock Characterization
2. Methods for Handling Deadlocks
3. Deadlock Prevention
4. Deadlock Avoidance
5. Deadlock Detection
6. Deadlock Detection(cont)
7. Recovery from Deadlock

Review Questions
Sl.No. - Questions TLOs BL PI Code
1. What is deadlock? How Deadlock can be prevented TLO1 L2 1.4.4
2. List three examples of deadlock that are not related to computer system TLO1 L2 1.4.4
3. Given 3 process A, B, and C , 3 resources x, y, and z and following TLO3 L3 1.4.4
events . 1) A requests x 2) A requests y 3) B request y 4) B requests z 5)
C requests z 6) C requests x 7) C requests y Mention whether the system
is in deadlock. If it is how to recover the deadlock. 1, 3, 5, 2, 6, 4 2) 2, 6, 3,
5, 1, 4, 7

Powered by www.ioncudos.com Page 14 of 25.


K. L. E. Society's

B. V. Bhoomaraddi College of Engineering & Technology, Hubli.

DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING

Course Code and Title: CSC324 / Operating System


Chapter Number and Title: 5. Memory Management Planned Hours: 8 hrs

Learning Outcomes:-
At the end of the topic the student should be able to:

Topic Learning Outcomes COs BL CA Code


1. Explain different methods of memory allocation CO4 L2 1.4
2. Discuss the ways of solving the problem of external fragmentation CO4 L3 1.4
3. Compare the various memory management techniques. CO4 L3 2.1
4. Identify need for Virtual and cache memory. CO4 L3 1.4
5. Explain the concept of demand paging. CO4 L2 1.4

Lesson Schedule
Class No. - Portion covered per hour
1. Memory Management Strategies: Background, Swapping.
2. Contiguous Allocation.
3. Paging.
4. Paging (contd).
5. Segmentation. Virtual Memory Management: Background
6. Demand Paging
7. Page Replacement.
8. Allocation of Frames & Thrashing

Review Questions
Sl.No. - Questions TLOs BL PI Code
1. On scanning primary memory pm addresses 00..0. We find holes of the TLO1 L2 1.4.4
following sizes 10K, 15K, 5K, 32K and 2K. In what order would the
allocation happen if we need to allocate segments having sizes 2K, 7K, 27K
and 1K if we followed a. First fit policy b. Next fit policy c. Best fit policy
2. Describe the action taken by the operating system when a page fault TLO3 L2 1.4.4
occurs
3. What is thrashing? Explain how working set model can be used to solve TLO3 L2 1.4.4
the same
4. If a system has 32 bit virtual addresses and 1 KB page size, what can be TLO3 L3 2.1.3

Powered by www.ioncudos.com Page 15 of 25.


K. L. E. Society's

B. V. Bhoomaraddi College of Engineering & Technology, Hubli.

DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING

the size of page table if 1. one-level page tables are used 2. Two levels of
page tables are used
5. Consider a machine with 64 MB physical memory and a 32-bit virtual TLO3 L3 2.1.3
address space. If the page size is 4KB, what is the approximate size of the
page table? (GATE 2001). Explain the steps with neat diagrams.
6. Indi-Comp is a new computer system. It has 32 bits address space. The TLO3 L2 2.1.3
system employs paging with page of 4K size. Suppose the page table is
stored in a semiconductor memory that requires 0.01 microseconds to load
the page table. Processes are swapped every 10 millisecond. Each time a
process runs – its page table need to be loaded. Compute the percentage
of time that gets used in loading a page as an overload.
7. A process refers to 5 pages in the following order TLO3 L3 2.1.3
A,B,C,D,A,B,E,A,B,C,D,E.How many page faults would occur if the program
has three frames to it using i)FIFO replacement ii)LRU replacement
iii)Optimal Replacement

Powered by www.ioncudos.com Page 16 of 25.


K. L. E. Society's

B. V. Bhoomaraddi College of Engineering & Technology, Hubli.

DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING

Course Code and Title: CSC324 / Operating System


Chapter Number and Title: 6. File System, Implementation of File System Planned Hours: 5 hrs

Learning Outcomes:-
At the end of the topic the student should be able to:

Topic Learning Outcomes COs BL CA Code


1. Discuss the different access methods for files CO4 L2 1.4
2. Explain tree directory structures and acyclic graph directories. CO4 L2 1.4
3. Discuss the different protection approaches for files. CO4 L2 1.4
4. Identify suitable file allocation method for the given set of files CO4 L3 1.4

Lesson Schedule
Class No. - Portion covered per hour
1. File system: File concept; Access methods;
2. Directory structure; File system mounting;
3. File sharing; Protection
4. Implementing File System: File system implementation ; Directory implementation
5. Allocation methods; free space management.

Review Questions
Sl.No. - Questions TLOs BL PI Code
1. What are the different attributes of files? TLO1 L2 1.4.4
2. Explain different directory structures with suitable diagrams. TLO2 L2 1.4.4
3. Describe the interpretation of the following under the command chmod: TLO3 L2 1.4.4
a. 444 b. 111 001 101
4. How do you provide specify protection scheme in UNIX? TLO4 L2 1.4.4
5. Using a diagram, show how an indexed allocation of a file may be done TLO4 L3 2.1.3
for a disked based system with the following characteristics. The disc size
is 30 blocks each of 1024 bytes (may be modeled as 6 X 5 matrix). File f1
is 11 logical records of 112 bytes, file f2 is 890 logical records of 13 bytes,
file f3 is 510 bytes of binary data stream and file f4 is 4 logical blocks of 95
bytes

Powered by www.ioncudos.com Page 17 of 25.


K. L. E. Society's

B. V. Bhoomaraddi College of Engineering & Technology, Hubli.

DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING

Course Code and Title: CSC324 / Operating System


Chapter Number and Title: 7.Embedded Operating Systems Planned Hours: 5 hrs

Learning Outcomes:-
At the end of the topic the student should be able to:

Topic Learning Outcomes COs BL CA Code


1. Discuss the characteristics of RTOS CO1 L2 1.4
2. Compare the characteristics of embedded OS with general purpose CO1 L3 1.4
OS
3. Discuss configurability, components, scheduler and synchronization CO1 L2 1.4
mechanism of eCOS.

Lesson Schedule
Class No. - Portion covered per hour
1. Introduction to Embedded operating system
2. Comparison of Embedded Operating System and GPOS
3. Characteristics of Embedded Operating System
4. Case study of ECOS
5. Case study of ECOS(cont)

Review Questions
Sl.No. - Questions TLOs BL PI Code
1. What is RTOS? TLO1 L2 1.4.4
2. Explain the key characteristics of an RTOS? TLO1 L2 1.4.4
3. What are the relative advantages and disadvantages of an real time OS TLO2 L2 1.4.4
over existing general purpose commercial OS?
4. What are the principle objectives that guided the design of the eCOS TLO3 L2 1.4.4
kernel?

Powered by www.ioncudos.com Page 18 of 25.


K. L. E. Society's

B. V. Bhoomaraddi College of Engineering & Technology, Hubli.

DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING

Course Code and Title: CSC324 / Operating System


Chapter Number and Title: 8. Mobile Operating Systems Planned Hours: 5 hrs

Learning Outcomes:-
At the end of the topic the student should be able to:

Topic Learning Outcomes COs BL CA Code


1. Discuss architecture of Android CO1 L2 1.4
2. How wake locks are used to increase battery life? CO1 L2 1.4
3. List and Explain the various system services of Android CO1 L2 1.4

Lesson Schedule
Class No. - Portion covered per hour
1. Introduction to Android, App Developer\'s View
2. Overall Architecture, Linux Kernel ,Wake locks,
3. Hardware Support ,Native User-Space Dalvik and Android\'s Java
4. System Services, Stock AOSP Packages
5. System Startup

Review Questions
Sl.No. - Questions TLOs BL PI Code
1. What are the benefits of using Android for Mobile application TLO1 L2 1.4.4
development
2. Explain the overall architecture of Android TLO2 L2 1.4.4
3. Discuss the various system services of Android Operating system TLO3 L2 1.4.4

Powered by www.ioncudos.com Page 19 of 25.


K. L. E. Society's

B. V. Bhoomaraddi College of Engineering & Technology, Hubli.

DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING

Question Paper Title: Minor_1 Operating Systems Model paper


Total Duration Course :Operating System Maximum Marks :60
(H:M):75mins (CSC324)
Note :
Q.No. Questions Marks CO BL PO PI
Code

1a What is the motivation for 5 CO1 L2 1 1.4.1


a. Multi-programming and
b. Time sharing
1b Assume two operations A(counter++) B(counter--) 5 CO2 L2 1 1.4.4
reg1= counter; reg1= Reg1+1; Counter = reg1; Show
computation sequence to show how race condition can
occur.
1c Consider the following set of processes. Find out the 10 CO2 L3 2 2.1.3
turnaround time and waiting time for
• Shortest job first (SJF) without preemption
• Round Robin (RR) with quantum of 2

Analyze the results and comment on the performance


of these algorithms from user point of view and system
point of view.
2a Write the algorithms for wait () and signal () functions 5 CO2 L3 2 1.4.4
2b Analyze the following multi level feedback queue and 10 CO2 L3 2 2.1.3
comment about the turnaround and response time.
Rearrange these queues to improve the response time.
Justify your answer

2c Write a short note on system call and its interface 5 CO1 L2 1 1.4.1
3a Explain distributed and parallel systems. 5 CO1 L2 1 1.4.1
3b Discuss the various solutions for critical section 10 CO2 L3 2 1.4.4
problem.

3c Explain the message passing technique IPC. 5 CO2 L2 1 1.4.4

Powered by www.ioncudos.com Page 20 of 25.


K. L. E. Society's

B. V. Bhoomaraddi College of Engineering & Technology, Hubli.

DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING

Question Paper Title: Minor_2 Operating systems Model Paper


Total Duration (H:M):75 Course :Operating System Maximum Marks :60
mins (CSC324)
Note :
Q.No. Questions Marks CO BL PO PI Code

1a On scanning primary memory addresses 00..0. 10 CO4 L3 2 2.1.3


We find holes of the following sizes 10K, 15K, 5K, 32K
and 2K.Find the amount of internal fragmentation and
external fragmentation for various memory allocation
algorithms if the process has the following memory
requirements. P1 2K P2 7K P3 27K and P4 1K

1b Write a solution to the dinning philosopher’s problem 10 CO3 L2 1 1.4.4


which avoids deadlock.
2a Consider a machine with 64 MB physical memory and a 10 CO4 L3 2 2.1.3
32-bit virtual address space.
If the page size is 4KB, what is the approximate size of
the page table?Explain the steps with neat diagrams .

2b What is Belady’s anomaly? 10 CO4 L3 1 1.4.4


Which page replacement algorithm overcomes it the
most? How many page faults occur for the following
reference string with the same algorithm?
1,2,3,4,5,3,4,1,6,7,8,7,8,9.

3a Detect whether system with following snapshot is in 10 CO3 L2 1 1.4.4


dead lock or not? Total number of instances for resource
A=7,B=2 and C=6? Indicate your solution with neat
steps. P0 requests holds 1 unit of B P1 requests holds 2
unit of A and requests 2 units of A and 2 units of C. P2
requests holds 3 unit of A and 3 units of C P3 requests
holds 2 unit of A , 1 unit of B 1 unit of C and requests 1
units of A. P4 requests holds 2 unit of C and requests 2
units of C.
3b Using a diagram, show how an indexed allocation of a 10 CO4 L3 2 2.1.3
file may be done for a disked based system with the
following characteristics. The disc size is 30 blocks each
of 1024 bytes (may be modeled as 6 X 5 matrix). File f1
is 11 logical records of 112 bytes, file f2 is 890 logical
records of 13 bytes, file f3 is 510 bytes of binary data
stream and file f4 is 4 logical blocks of 95 bytes

Powered by www.ioncudos.com Page 21 of 25.


K. L. E. Society's

B. V. Bhoomaraddi College of Engineering & Technology, Hubli.

DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING

Question Paper Title: Model Question Paper for Semester End Examination
Total Duration (H:M):180 Course :Operating System Maximum Marks :100
mins (CSC324)
Note :Answer two full questions from Unit I, Unit II, and 1 full question from Unit III.

UNIT 1
Q.No. Questions Marks CO BL PO PI
Code

1.a Compare virtual and non-virtual machine. . 10 CO1 L2 1 1.4.1

b Illustrate race condition with an example. . 5 CO2 L2 1 1.4.4

c What are the requirements of solution to critical section 5 CO2 L2 1 1.4.4


problem?

2.a Explain scheduling queues of process scheduling with 5 CO2 L2 1 1.4.4


diagram?
b How mutual exclusion can be implemented using 10 CO2 L2 1 1.4.4
hardware instructions? What are the drawbacks of
using the same?
c Consider following two process P1 and P2 5 CO2 L3 2 2.1.3
P1 represents credit transaction P2 represents debit
transaction,

Both of which are manipulating the bank balance of a


person

With the following code whether they will be able to


update bank balance successfully

Code Used by P1

while (S1 == S2) ;

Critica1 Section

Powered by www.ioncudos.com Page 22 of 25.


K. L. E. Society's

B. V. Bhoomaraddi College of Engineering & Technology, Hubli.

DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING

S1 = S2;

Code Used by P2

while (S1 != S2) ;

Critica1 Section

S2 = not (S1);

3.a 5. Consider a process with the following code for (i = 0; 5 CO1 L3 1 1.4.1
i < n; i++) fork(); How many concurrent tasks can be
performed by the code?
b Explain layered and microkernel approaches of 5 CO1 L2 1 1.4.1
operating system structure
c What is a mail box and give a detailed description on 10 CO2 L3 1 1.4.4
how it may be utilized for IPC

UNIT 2
Q.No. Questions Marks CO BL PO PI
Code

4.a Consider the following page reference string, 0 1 3 6 2 10 CO2 L3 2 2.1.3


452503125410
Use appropriate page replacement algorithm to show
the effect of number of frames on the number of faults
and plot a graph to show the effect.

b Suppose that a disk drive has 5,000 cylinders, 10 CO4 L3 1 1.4.4


numbered 0 to 4999. The drive is currently serving a
request at cylinder 143, and the previous request was
at cylinder 125.
The queue of pending requests, in FIFO order, is:
86,1470, 913, 1774, 948, 1509, 1022,1750,130 Starting
from the current head position,

What is the total distance (in cylinders) that the disk


arm moves to satisfy all the pending requests for each
of the following disk-scheduling algorithms? FCFS,
SSTF, SCAN

5.a Consider a simple paging system with the following 10 CO4 L3 2 2.1.3
parameters: 2 32 bytes of physical memory; page size of

Powered by www.ioncudos.com Page 23 of 25.


K. L. E. Society's

B. V. Bhoomaraddi College of Engineering & Technology, Hubli.

DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING

2 10 bytes; 216 pages of logical address space.


Perform the mapping between the logical address
spaces to physical address space, with Illustration.

a. How many bits are in a logical address?

b. How many bytes in a frame?

c. How many bits in the physical address specify the


frame?

d. How many entries in the page table?

b Detect whether system with following snapshot is in 5 CO3 L3 1 1.4.4


dead lock or not?
Total number of instances for resource A=7,B=2 and
C=6?
Indicate your solution with neat steps.
Allocation Request
A B C A B C
P0 0 1 0 0 0 0
P1 2 0 0 2 0 2
P2 3 0 3 0 0 0
P3 2 1 1 1 0 0
P4 0 0 2 0 0 2
6.a What is address binding? Given memory partitions of 10 CO4 L3 1 1.4.4
100k, 500k, 200k, 300k and 600k. How would each of
the first fit, best fit and worst fit algorithms place
processes of 212k, 417k, 112k, and 426k Which
Algorithm is more efficient?
b A system has five processes P1 through P5 and four 10 CO3 L3 2 2.1.3
resource types CD, printer, scanner and speaker.
There are 2 units of each resource type. Given that:

P1 holds 1 unit of CD and requests 1 unit of speaker


P2 holds 1 unit of scanner and requests 1 unit of printer
P3 holds 1 unit of printer and requests 1 unit of scanner
P4 requests 1 unit of speaker P5 holds 1 unit of
scanner and 1 unit of printer, and requests 1 unit of
scanner

when all the process are run concurrently starting at


time t=0, check whether the system is in safe state

Powered by www.ioncudos.com Page 24 of 25.


K. L. E. Society's

B. V. Bhoomaraddi College of Engineering & Technology, Hubli.

DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING

UNIT 3
Q.No. Questions Marks CO BL PO PI
Code

7.a What are the relative advantages and disadvantages of 10 CO1 L2 1 1.4.4
an real time OS over existing general purpose
commercial OS?

b Compare and contrast the different thread 10 CO1 L3 1 1.4.4


synchronization mechanism in eCos .
8.a Discuss the detailed architecture of Linux kernel 10 CO1 L2 1 1.4.1

b Discuss the various system services of Android 10 CO1 L2 1 1.4.1


Operating system

Powered by www.ioncudos.com Page 25 of 25.

You might also like