Cie 1 2019

Download as pdf or txt
Download as pdf or txt
You are on page 1of 3

USN

Department of Information Science and Engineering


R V College of Engineering, Bangalore-59
( Autonomous Institution affiliated to VTU, Belgaum )

CIE I : Question Paper

Course: OPERATING SYSTEMS Semester : IV


(Code) (16IS43) UG/PG UG
Date : FEB 2019 Duration : 90 Min Staff : KSN
Note: Answer ALL questions. Max. Marks : 50

Q. No Marks Level CO
1. Give an overview of the operating system services with a neat diagram. 10 L1 CO1
2a. Differentiate between an API and a System call. Give the description of a
6 L3 CO3
standard API with an example.
2b. What is a process? Explain with an example how a process is represented in
4 L1 CO2
Linux systems.
3a. Discuss the solution to the producer-consumer problem using shared
6 L4 CO2
memory communication model.
3b. Differentiate between i) CPU Scheduler and Job Scheduler
4 L3 CO1
ii) CPU-bound process and I/O-bound process.
4a. Explain the dual-mode and multimode operations of an operating system
6 L2 CO3
with a neat diagram.
4b. Discuss the activities of an OS with respect to mass-storage management. 4 L2 CO1
5a. Explain the traditional UNIX system structure with the architecture.
6 L2 CO4
Compare it with the layered approach.
5b. Discuss the POSIX API for shared memory. 4 L1 CO4

Marks Distribution

L1- 18 L2-16 L3-10 L4-06 L5-0 L6-0 CO1-18 CO2-10 CO3-12 CO4-10

L1-34% L2-34% L3-20% L4-12% L5-0% L6-0% CO1-36% CO2-20% CO3-24% CO4-20%

Course Outcomes (COs)

CO1: Analyse the basic working, functions, and design issues related to different operating systems.
CO2: Conceptualize and evaluate the different techniques and algorithms used in management of
processes, memory and files.
CO3: Demonstrate and analyse the internal working and implementation of the different modules
and its interaction in the OS.
CO4: Perform administrative and security tasks on various OS.
Department of Information Science and Engineering
R V College of Engineering, Bangalore-59
( Autonomous Institution affiliated to VTU, Belgaum )
CIE I : Scheme and Solution

Course: OPERATING SYSTEMS Semester : IV


(Code) (16IS43) UG/PG UG
Date : FEB 2019 Duration : 90 Min Staff : KSN
Note: Answer ALL questions. Max. Marks : 50

Q.
Marks
No
1

4+6

.
Diagram with explanation
2a. API: specifies set of functions that are available to the programmer
System call: Programming interface to the services provided by the OS 2+2+2
Example of an API: read() function in Unix/Linux systems.
2b. Process – a program in execution; process execution must progress in sequential fashion. Program
is passive entity stored on disk (executable file), process is active.

Represented by the C structure task_struct

pid t_pid; /* process identifier */


2+2
long state; /* state of the process */
unsigned int time_slice /* scheduling information */
struct task_struct *parent; /* this process’s parent */
struct list_head children; /* this process’s children */
struct files_struct *files; /* list of open files */
struct mm_struct *mm; /* address space of this process */
3a. Solution to the producer-consumer problem:
Shared data
#define BUFFER_SIZE 10
typedef struct {
...
} item;
item buffer[BUFFER_SIZE];
int in = 0;
3+3
int out = 0;
item next_produced;
while (true) {
/* produce an item in next produced */
while (((in + 1) % BUFFER_SIZE) == out)
; /* do nothing */
buffer[in] = next_produced;
in = (in + 1) % BUFFER_SIZE; }
3b. Short-term scheduler (or CPU scheduler) – selects which process should be executed next and
allocates a CPU.Sometimes the only scheduler in a system
Short-term scheduler is invoked frequently (milliseconds)  (must be fast)
Long-term scheduler (or job scheduler) – selects which processes should be brought into the
ready queue.Long-term scheduler is invoked infrequently (seconds, minutes)  (may be slow) 2+2
The long-term scheduler controls the degree of multiprogramming
Processes can be described as either:
I/O-bound process – spends more time doing I/O than computations, many short CPU bursts
CPU-bound process – spends more time doing computations; few very long CPU bursts
4a.
A mechanism that allows the OS to protect itself and other system components
Two modes:
User mode and Kernel mode
Mode bit (0 or 1) provided by hardware.Provides ability to distinguish when system is running
user code or kernel code.Some instructions designated as privileged, only executable in kernel
mode.Systems call by a user asking the OS to perform some function changes from user mode
to kernel mode. Return from a system call resets the mode to user mode.

4+2

4b. Activities of an OS with respect to mass-storage management:


OS provides uniform, logical view of information storage
Abstracts physical properties to logical storage unit - file
Files are stored in a number of different storage medium.
4
Disk, Flash Memory, Tape
Each medium is controlled by device drivers (i.e., disk drive, tape drive)
Varying properties include access speed, capacity, data-transfer rate, access method (sequential or
random)
5a.

3+3

Unix system structure


A system can be made modular in many ways. One method is the layered approach, in which the
operating system is broken into a number of layers (levels). The bottom layer (layer 0) is the
hardware; the highest (layer N) is the user interface.
The main advantage of the layered approach is simplicity of construction and debugging. The layers
are selected so that each uses functions (operations) and services of only lower-level layers.
This approach simplifies debugging and system verification.
5b. POSIX shared memory:
4
Memory-mapped files, which associate the region of shared memory with a file

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy