Sunteți pe pagina 1din 7

OPERATING SYSTEMS LAB Expected Viva Questions

1. What is an operating system? a. Operating system is an important part of almost every computer system 2. What are the components present in computer? a. A computer system can be divided roughly into four components, the operating system, the application programs, and the user. 3. What is symmetric multiprocessing? a. Each processor runs an identical copy of the operating system, and these copies communicate ith one another as needed. !ist out the types in mainframe systems i" #atch system ii" $ultiprogrammed systems iii" %ime&sharing system What is file&server systems? i" 'ile&server system provides a file system interface here clients can create, update, read, and delete files (. What is )ob scheduling? a. *f several )obs are ready to be brought in to memory, and if there is not enough room for all of them, then the system must choose among them. $a+ing this decision is )ob scheduling. 1. ,efine non&preemptive scheduling b. 'irst come first serve scheduling -fcfs" c. .hortest )ob first scheduling 2. ,efine dispatcher and its functions? i. . itching conte/t ii.. itching to user mode ii. 0umping to the proper location in the user program to restarts the program 3. ,efine dispatch latency? d. %he time ta+en for the dispatcher to stop one process and start another running process is +no n as dispatch latency. 1. What is mean by '2'. scheduling? a. '2'. also +no n as 'irst&in&first&out-'*'O" hich is the simplest scheduling policy. arriving )obs are inserted into the tail-rear"of the ready 3ueue. 1. ,efine 245 scheduling. b. 245 scheduling is the process of s itching the 245 among various processes. 245 scheduling is the basis of multi programmed operating systems. #y s itching the 245 among processes, the operating system can ma+e the computer more productive. 2. What is a ,ispatcher? c. %he dispatcher is the module that gives control of the 245 to the process selected by the short&term scheduler. %his function involves6 7 . itching conte/t 7 . itching to user mode 7 0umping to the proper location in the user program to restart that program. 3. What is turnaround time?

d. %urnaround time is the interval from the time of submission to the time of completion of a process. e. *t is the sum of the periods spent aiting to get into memory, aiting in the ready 3ueue, e/ecuting on the 245, and doing *8O. 1. What are privileged instructions? f. .ome of the machine instructions that may cause harm to a system are designated as privileged instructions. %he hard are allo s the privileged instructions to be e/ecuted only in monitor mode. 2. 9o can a user program disrupt the normal operations of a system? g. A user program may disrupt the normal operation of a system by 7 *ssuing illegal *8O operations 7 by accessing memory locations ithin the O. itself 7 :efusing to relin3uish the 245 3. 9o is the protection for memory provided? %he protection against illegal memory access is done by using t o registers. %he base register and the limit register. %he base register holds the smallest legal physical address; the limit register contains the si<e of the range. %he base and limit registers can be loaded only by the O. using special privileged instructions. What is turnaround time? %urnaround time is the interval from the time of submission to the time of completion of a process. *t is the sum of the periods spent aiting to get into memory, aiting in the ready 3ueue, e/ecuting on the 245, and doing *8O. b. ,efine race condition. When several process access and manipulate same data concurrently, then the outcome of the e/ecution depends on particular order in hich the access ta+es place is called race condition. %o avoid race condition, only one process at a time can manipulate the shared variable. c. ,efine entry section and e/it section. %he critical section problem is to design a protocol that the processes can use to cooperate. Each process must re3uest permission to enter its critical section. %he section of the code implementing this re3uest is the entry section. %he critical section is follo ed by an e/it section. %he remaining code is the remainder section What is logical address space and physical address space? %he set of all logical addresses generated by a program is called a logical address space; the set of all physical addresses corresponding to these logical addresses is a physical address space. 2. What is the main function of the memory&management unit? h. %he runtime mapping from virtual to physical addresses is done by a hard are device called a memory management unit -$$5". 3. ,efine s apping. i. A process needs to be in memory to be e/ecuted. 9o ever a process can be s apped temporarily out of memory to a bac+ing tore and then brought bac+ into memory for continued e/ecution. %his process is called s apping. (. What do you mean by best fit? ). #est fit allocates the smallest hole that is big enough. 9is entire list has to be searched, unless it is sorted by si<e. 9is strategy produces the smallest leftover hole.

=. What do you mean by first fit? a. 'irst fit allocates the first hole that is big enough. .earching can either start at the beginning of the set of holes or here the previous first&fit search ended. .earching can be stopped as soon as a free hole that is big enough is found. What is a semaphore? ->O?8,E2 @A" b. A semaphore B.B is a synchroni<ation tool hich is an integer value that, apart from initiali<ation, is accessed only through t o standard atomic operations; ait and signal. .emaphores can be used to deal ith the n process critical section problem. *t can be also used to solve various synchroni<ation problems. %he classic definition of B aitB ait -." C hile -.DE@" ; .&& ;F the classic definition of BsignalB signal -." C.GG ;F 2. ,efine busy aiting and spin loc+. -A4:*!8$AH 1@" c. When a process is in its critical section, any other process that tries to enter its critical section must loop continuously in the entry code. %his is called as busy aiting and this type of semaphore is also called a spin loc+, because the process hile aiting for the loc+. 3. What is a thread? ->ov8,E2 @I" d. A thread other ise called a light eight process -!W4" is a basic unit of 245 utili<ation, it comprises of a thread id, a program counter, a register set and a stac+. *t shares ith other threads belonging to the same process its code section, data section, and operating system resources such as open files and signals. e. What are the common strategies to select a free hole from a set of available holes? f. %he most common strategies are a. 'irst fit b. #est fit c. Worst fit 1. What do you mean by best fit? -A4:*!8$AH @I" g. #est fit allocates the smallest hole that is big enough. 9is entire list has to be searched, unless it is sorted by si<e. 9is strategy produces the smallest leftover hole. 2. What do you mean by first fit? ->O?8,E2 @J" h. 'irst fit allocates the first hole that is big enough. .earching can either start at the beginning of the set of holes or here the previous first&fit search ended. .earching can be stopped as soon as a free hole that is big enough is found. 1. What is a reference string? i. An algorithm is evaluated by running it on a particular string of memory references and computing the number of page faults. %he string of memory reference is called a reference string. 2. What is a file? -A4:*!8$AH @A" -$AH805>E 2@11" ). A file is a named collection of related information that is recorded on secondary storage. A file contains either programs or data. A file has certain KstructureK based on its type. 7 'ile attributes6 >ame, identifier, type, si<e, location, protection, time, date a. 7 'ile operations6 creation, reading, riting, repositioning, deleting, truncating, appending, +. renaming b. 7 'ile types6 e/ecutable, ob)ect, library, source code etc.

3. !ist the various file attributes. l. A file has certain other attributes, hich vary from one operating system to another, but typically consist of these6 >ame, identifier, type, location, si<e, protection, time, and date and user identification (. What is ,irectory? m. %he device directory or simply +no n as directory records information&such as name, location, si<e, and type for all files on that particular partition. %he directory can be vie ed as a symbol table that translates file names into their directory entries. 1. ,efine 5', and $',.->O?8,E2 @I" n. *n the t o&level directory structure, each user has her o n user file directory -5',". Each 5', has a similar structure, but lists only the files of a single user. When a )ob starts the systemBs master file directory -$'," is searched. %he $', is inde/ed by the user name or account number, and each entry points to the 5', for that user. 1. ,efine see+ time and latency time. o. %he time ta+en by the head to move to the appropriate cylinder or trac+ is called see+ time. Once the head is at right trac+, it must ait until the desired bloc+ rotates under the read& rite head. %his delay is latency time. 2. What are the allocation methods of a dis+ space? p. %hree ma)or methods of allocating dis+ space hich are idely in use are a. 2ontiguous allocation b. !in+ed allocation c. *nde/ed allocation 3. What are the advantages of 2ontiguous allocation? 3. %he advantages are a. .upports direct access b. .upports se3uential access c. >umber of dis+ see+s is minimal. (. What are the dra bac+s of contiguous allocation of dis+ space? r. %he disadvantages are a. .uffers from e/ternal fragmentation b. .uffers from internal fragmentation c. ,ifficulty in finding space for a ne file d. 'ile cannot be e/tended e. .i<e of the file is to be declared in advance 1. What are the advantages of !in+ed allocation? s. %he advantages are6 a. >o e/ternal fragmentation b. .i<e of the file does not need to be declared 1. What are the advantages of !in+ed allocation? t. %he advantages are6 a. >o e/ternal fragmentation b. .i<e of the file does not need to be ,E2lared 2. What are the disadvantages of lin+ed allocation? u. %he disadvantages are6 a. 5sed only for se3uential access of files. b. ,irect access is not supported v. $emory space re3uired for the pointers. d. :eliability is compromised if the pointers are lost or damaged 3. What are the advantages of *nde/ed allocation? . %he advantages are

a. >o e/ternal&fragmentation problem b. solves the si<e& ,E2laration problems. b. .upports direct access (. What are the operations that can be performed on a directory? /. %he operations that can be performed on a directory are 7 .earch for a file 7 2reate a file 7 ,elete a file 7 :ename a file 7 !ist directory 7 %raverse the file system 1. What are the most common schemes for defining the logical structure of a directory? y. %he most common schemes for defining the logical structure of a directory 7 .ingle&!evel ,irectory 7 % o&level ,irectory 7 %ree&.tructured ,irectories 7 Acyclic&Lraph ,irectories 7 Leneral Lraph ,irectory 1. ,efine caching. -A5&>O?8,E2 @J" <. A cache is a region of fast memory that holds copies of data. Access to the cached copy is more efficient than access to the original. 2aching and buffering are distinct functions, but sometimes a region of memory can be used for both purposes. 2. ,efine spooling. -A5&$AH805> 2@11" aa. A spool is a buffer that holds output for a device, such as printer, that cannot accept interleaved data streams. When an application finishes printing, the spooling system 3ueues the corresponding spool file for output to the printer. %he spooling system copies the 3ueued spool files to the printer one at a time. 3. What are the various dis+&scheduling algorithms? -A5&A4:8$AH1@" bb.%he various dis+&scheduling algorithms are a. 'irst 2ome 'irst .erved .cheduling b. .hortest .ee+ %ime 'irst .cheduling b. .2A> .cheduling d. 2&.2A> .cheduling cc. e. !OOM scheduling (. What are the different accessing methods of a file? dd.%he different types of accessing a file are6 7 .e3uential access6 *nformation in the file is accessed se3uentially 7 ,irect access6 *nformation in the file can be accessed ithout any particular order. 7 Other access methods6 2reating inde/ for the file, inde/ed se3uential access method -*.A$" etc. 1. What is ,irectory? ee.%he device directory or simply +no n as directory records information&such as name, location, si<e, and type for all files on that particular partition. %he directory can be vie ed as a symbol table that translates file names into their directory entries.

1. 2. 3. (. 1. =. I. A.

What is !inu/? !ist the features of !inu/. !ist the commands used in !inu/. What is .hell? What is +ernel? What is process? What is synchroni<ation? What is semaphore? !ist types of semaphores. What is a system call and rite the e/amples of system calls and its synta/. J. !ist the states of process and corresponding system calls and its synta/? 1@.What is inter&process communication? 9o many ays communication can be established bet een the processes. 11.!ist the system calls and its synta/ for process management, synchroni<ation problems, file management etc.

Expected Viva Questions: 1.9o devices are re3uested in 5>*N?

2.What is OinodeP? 3.#rief about the directory representation in 5>*N? (.What are the 5>*N system calls for *8O? 1.9o do you change 'ile permissions?

=.What are lin+s and symbolic lin+s in 5>*N file system? I.What is '*'O? A.9o do you create special files li+e named pipes and device files?

J.,iscuss the mount and unmount system calls? 1@. 11. 9o does the inode map to data bloc+ of a file?

What is a shell? hile the system

12. #rief about the initial process se3uence boots up.

13. 1(. 11.

What are various *,s associated E/plain for+-" system call.

ith a process?

!ist the system calls used for process management

1=. 9o can you get8set an environment variable from a program? 1I. 1A. 1J. 2@. 9o can a parent and child process communicate?

What is a Qombie? What are the process status in !*>5N? What is the difference bet een process and thread?

21. What is the different *42 techni3ues and give the difference bet een them. 22. 23. 2(. 21. 2=. 2I. 2A. 2J. What are the orphan process? ,efine 4O.*N thread? What are thread attributes? ,efine .emaphore? !ist and e/plain classical synchroni<ation problems? What is an environment variable? ,efine deadloc+? ,efine !imited shell. What are file permissions?

3@. What is the difference bet een counting and binary semaphore? 31. 32. 33. 3(. 31. 3=. E/plain 4&? operation. ,efine mutual e/clusion. ,efine system calls. ,efine O. and +ernel. !ist fe functions of O.. ild card characters.

,efine the purpose of

S-ar putea să vă placă și