Welcome to Scribd, the world's digital library. Read, publish, and share books and documents. See more
Standard view
Full view
of .
Look up keyword
Like this
0 of .
Results for:
No results containing your search query
P. 1
student copy.doc

student copy.doc

Ratings: (0)|Views: 18|Likes:
Published by Anshul Mishra
Uploaded from Google Docs
Uploaded from Google Docs

More info:

Published by: Anshul Mishra on Jan 08, 2012
Copyright:Attribution Non-commercial


Read on Scribd mobile: iPhone, iPad and Android.
download as DOC, PDF, TXT or read online from Scribd
See more
See less





T. Y. BSc. (Computer Science) Revised Course.Solution Set- PIII-Operating system and LinuxQuestion: Write a short note on20Timesharing : (5 Marks)Important points:
multitasking –logical extension of multiprogramming-the CPUexecutes multiple jobs by switching among them- user can interact with eachprogram while it is running- response time should be short typically within 1 second-A time shared operating system allows many users to share the computer. A time-shared operating system uses CPU scheduling and multiprogramming. They aremore complex then multiprogrammed OS.
_____________________________________________________________________________________Safe and Unsafe State: ( 5 Marks ) with diagrams .a.Important points:
Diagram, -system can allocate resources to each process insome order and still avoid deadlock-safe sequence <P1, P2,…., Pn>-request of Pican be satisfied by currently available resources plus resources held by all the Pjwith j <i. A deadlock state is an unsafe state. Not all unsafe state-it may lead todeadlock. Illustration.
Environmental variables: ( 5 Marks )Important points:
Store information about the shell session and workingenvironment. Two types-global variables, local variables-printenv command-setcommand. Removing Environmental variables. Setting path for environmentalvariables.
_____________________________________________________________________________________c.Awk command: ( 5 Marks )Important points:
Advanced filter- Basic format-awk options- ,-f storing awkPrograms in a file, -v, -awk variables-data fields and record variable-awk programfeatures. NR= built in varaibles# awk –F “|” ‘ /sales/ { print $2, $3,$4.$6 }’ emp.lst
d.Type of system calls: ( 5 Marks )Important points:
System calls provide the interface between a process and theoperating system. Process control end, abort - load, execute
File management :
create file, delete file - open, close - read, write, reposition
Device management:
request device, release device - read, write, reposition
Information maintenance:
get time or date, set time or date - get system data,set system dataget process, file, or device attributes- set process, file, or device attributes
create, delete communication connection- send, receivemessages - transfer status information - attach or detach remote devices _____________________________________________________________________________________ 
e.Linux file permissions:Important points:
File permissions-
file permission symbols
–for files, d fordirectories, l for links, c for character devices, b for block devices, n for networkdevices, r-read permission, w for write permission, x for execute permission. Ownerof the object, group of the object, others. And their permission. Linux file permissioncodes.
Chmod command
for changing permissions. __________________________________________________________________________________  ___________________________________________________________________________________ 
Q.2 a) Answer any two
i) Explain the Round Robin scheduling algorithm. Calculate theaverage waiting timefor the following processes using Round Robin policy with a timeslice 10
.ProcessP1P2P3P4P5Burst Time1032040814
Explanation + Gantt chart + Avg. wt timeImportant points:
The round-robin
scheduling algorithm is designedespecially for timesharing systems. It is similar to FCFS scheduling, but preemptionis added to switch between processes. A small unit of time, called a time quantum(or time slice), is defined. A time quantum is generally from 10 to 100 milliseconds. Theready queue is treated as a circular queue.
Gantt chart:
P1, 0-10P2, 10-20P3, 20-24P4, 24-32P5, 32-42P2, 42-52P5, 52-56P2, 56-66P2, 66-68Average waiting time: P1=0, P2=78, P3 = 20, P4= 24, P5=52 Total wt time =174
Average waiting time =174/5 =34.8
 __________________________________________________________________________________  __________________________________________________________________________________ 
ii) Define a Thread. Explain the three common ways of establishing therelations betweenUser Level and Kernel Level thread.Mark Distribution :
Thread diagram 1 Mark and definition 2 marks
Important points:
A thread, sometimes called a lightweight process
is abasic unit of CPUutilization; it comprises a thread ID, a program counter, a register set, and a stack.It shares with other threads belonging to the same process its code section, datasection, and other operating-system resources, such as open files and signals. Three common ways of establishing relations between User Level and Kernel Level Thread:Many to one modeldefinition+ diagramOne to One model‘’Many to Many model __________________________________________________________________________________ 
iii) What is a monitor? Explain its usage
Important points:
A monitor is characterized by a set of programmer-definedoperators. The representation of a monitor type consists of declarations of variableswhose values define the state of an instance of the type, as well as the bodies of procedures or functions that implement operations on the type. The syntax of amonitor is
shared variable declarations
procedure body P1
( .... .) {}
procedure body P2
( ... ){}
procedure body Pn
( ... ){}{initialization code}}Schematic view of a monitor.
A monitor solution to the dining-philosopher problem. OR A monitor to allocate a single resource.

You're Reading a Free Preview

/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->