Operating system questions

By admin | January 17, 2005 1. What are the basic functions of an operating system? - Operating system controls and coordinates the use of the hard are among the !arious applications programs for !arious uses. Operating system acts as resource allocator and manager. "ince there are many possi#ly conflicting re$uests for resources the operating system must decide hich re$uests are allocated resources to operating the computer system efficiently and fairly. %lso operating system is control program hich controls the user programs to pre!ent errors and improper use of the computer. &t is especially concerned ith the operation and control of &'O de!ices. 2. Why paging is used? - (aging is solution to e)ternal fragmentation pro#lem hich is to permit the logical address space of a process to #e noncontiguous, thus allo ing a process to #e allocating physical memory here!er the latter is a!aila#le. *. While running DOS on a PC, which command would be used to duplicate the entire diskette? dis+copy ,. What resources are used when a thread created? ow do they differ from those when a process is created? - -hen a thread is created the threads does not re$uire any ne resources to e)ecute the thread shares the resources li+e memory of the process to hich they #elong to. .he #enefit of code sharing is that it allo s an application to ha!e se!eral different threads of acti!ity all ithin the same address space. -hereas if a ne process creation is !ery hea!y eight #ecause it al ays re$uires ne address space to #e created and e!en if they share the memory then the inter process communication is e)pensi!e hen compared to the communication #et een the threads. 5. What is !irtual memory? - /irtual memory is hard are techni$ue here the system appears to ha!e more memory that it actually does. .his is done #y timesharing, the physical memory and storage parts of the memory one dis+ hen they are not acti!ely #eing used. 0. What is "hroughput, "urnaround time, waiting time and #esponse time? .hroughput 12345367 num#er of processes that complete their e)ecution per time unit. .urnaround time 12345367 amount of time to e)ecute a particular process. -aiting time 12345367 amount of time a process has #een aiting in the

he operating system selects a <o# from the <o# pool and starts e)ecuting a <o#.ime systems may #e either hard or soft real-time.-aiting state . 8eal-. Often used as a control de!ice in a dedicated application such as controlling scientific e)periments. What is multi tasking.%ulti programming= >ultiprogramming is the techni$ue of running se!eral programs at a time using timesharing.. 7.he system can detect thrashing #y e!aluating the le!el of ?(A utiliCation as compared to the le!el of multiprogramming. "o the main idea here is that the ?(A is ne!er idle.his goal re$uires that all delays in the system #e #ounded from the retrie!al of the stored data to the time that it ta+es the operating system to finish any re$uest made of it. . What is the important aspect of a real$time system or %ission Critical Systems? . . multi programming. &t can #e eliminated #y reducing the le!el of multiprogramming.his concept is also +no n as time-sharing systems.ready $ueue.he concept of multiprogramming is that the operating system +eeps se!eral <o#s in memory simultaneously. medical imaging systems. !irtual reality: re$uiring ad!anced operating-system features. or read-only memory 98O>:. 11. What is the cause of thrashing? ow does the system detect thrashing? Once it detects thrashing.hrashing is caused #y under allocation of the minimum num#er of pages re$uired #y a process. %ulti tasking= >ultitas+ing is the logical e)tension of multiprogramming . not supported #y general-purpose operating systems. not output 9for timesharing en!ironment:.% real time operating system has ell defined fi)ed time constraints. when a process is waiting for some e!ent to occur? . forcing it to continuously page fault. &t allo s a computer to do se!eral things at the same time. hen that <o# needs to ait for any i'o operations the ?(A is s itched to another <o#.% hard real-time system guarantees that critical tas+s complete on time. >ultiprogramming creates logical parallelism. %ulti threading= %n application typically is implemented as a separate process ith se!eral threads .he concept of multitas+ing is $uite similar to multiprogramming #ut difference is that the s itching #et een <o#s occurs so fre$uently that the users can interact ith each program hile it is running. % soft real time system here a critical real-time tas+ gets priority o!er other tas+s and retains that priority until it completes. %s in hard real time systems +ernel delays need to #e #ounded 10. . . ard real$time= "econdary storage limited or a#sent. B. (rocess must #e done ithin the defined constraints or the system ill fail. multi threading? . industrial control systems. %n e)ample is the operating system for a flight control computer or an ad!anced <et airplane. data stored in short term memory. 8esponse time 12345367 amount of time it ta+es from hen a re$uest as su#mitted until the first response is produced. What is the state of the processor. Aseful in applications 9multimedia.. ?onflicts ith time-sharing systems. . % time-shared operating system uses ?(A scheduling and multiprogramming to pro!ide each user ith a small portion of time-shared system. What is the difference between ard and Soft real$time systems? . and some display systems. what can the system do to eliminate this problem? . Soft real$time= @imited utility in industrial control of ro#otics.

1*..0 giga#ytes. the magnetic medium can #e easily erased and re ritten. 2. ?(A scheduling decisions may ta+e place hen a process= 1. the amount of usa#le memory is drastically reduced. %ll other scheduling is preempti!e. *.his approach ould multithread the e#-ser!er process.Eispatcher module gi!es control of the ?(A to the process selected #y the short-term schedulerH this in!ol!es= " itching conte)t. )nternal (ragmentation= &nternal fragmentation is the space asted inside of allocated memory #loc+s #ecause of restriction on the allo ed siCes of allocated #loc+s.. #ut itIs cheap. What is fragmentation? Different types of fragmentation? . What is hard disk and what is its purpose? .Dard dis+ is the secondary storage de!ice. #ut not #eing used 1.he amount of time that a client might ha!e to ait for its re$uest to #e ser!iced could #e enormous. . and this recharging tends to slo do n the performance of E8%> compared to speedier 8%> types.otal memory space e)ists to satisfy a re$uest."elects from among the processes in memory that are ready to e)ecute. . #ut it is not contiguous.Fragmentation occurs in a dynamic memory allocation system hen many of the free #loc+s are too small to satisfy any re$uest. and is a!aila#le almost e!ery here you loo+. What is CP+ Scheduler? . Jumping to the proper location in the user program to restart that program. and a typical des+top machine ill ha!e a hard dis+ ith a capacity of #et een 10 and . and so forth. . is non-preempti!e." itches from running to ready state. &f too much e)ternal fragmentation occurs. 12. E8%> data resides in a cell made of a capacitor and a transistor. "o it is efficient to ha!e one process that contains multiple threads to ser!e the same purpose. What is Dispatcher? . &f the e# ser!er ran as a traditional single-threaded process. ." itches from running to aiting state. "cheduling under 1 and . the ser!er ould create a separate thread that ould listen for client re$uests hen a re$uest as made rather than creating another process it ould create another thread to ser!ice the re$uest. sound.he capacitor tends to lose data unless itIs recharged e!ery couple of milliseconds. 8esource sharing economy and utiliCation of multiprocessor architectures multithreading concept can #e used. 10. hich holds the data in #ul+. % #usy e# ser!er may ha!e se!eral of clients concurrently accessing it. does the <o#. .o get the ad!antages li+e responsi!eness. .Dard dis+s ha!e a hard platter that holds the magnetic medium.erminates. &'ternal (ragmentation= G)ternal Fragmentation happens hen a dynamic memory allocation algorithm allocates some memory and a small piece is left o!er that cannot #e effecti!ely used. What is D#*%? )n which form does it store data? . and allocates the ?(A to one of them. dispatch latency 12345367 time it ta+es for the dispatcher to stop one process and start another running. &n some situations a single application may #e re$uired to perform se!eral similar tas+s for e)ample a e# ser!er accepts client re$uests for e# pages.of control. . %llocated memory may #e slightly larger than re$uested memoryH this siCe difference is memory internal to a partition. Eata is stored onto the dis+ in the form of files.E8%> is not the #est. images." itches from aiting to ready.. it ould #e a#le to ser!ice only one client at a time. " itching to user mode. and it holds the data on the magnetic medium of the dis+. 15.

?ache memory is random access memory 98%>: that a computer microprocessor can access more $uic+ly than it can access regular 8%>. &ts speed !aries from machine to machine. What is Conte't Switch? .his tas+ is +no n as a conte)t s itch. What is a #eal$"ime System? . "ystem is in safe state if there e)ists a safe se$uence of all processes.17. %s the microprocessor processes data. system must decide if immediate allocation lea!es the system in a safe state. What is cache memory? . it loo+s first in the cache memory and if it finds the data there 9from a pre!ious reading of data:. the num#er of registers hich must #e copied.-hen a process re$uests an a!aila#le resource. the e)isted of special instructions9such as a single instruction to load or store all registers:. ?onte)t-s itch time is pure o!erhead. it does not ha!e to do the more time-consuming reading of data from larger memory. 1B." itching the ?(A to another process re$uires sa!ing the state of the old process and loading the sa!ed state for the ne process.% real time process is a process that must respond to the e!ents ithin a certain time period. Eeadloc+ %!oidance= ensure that a system ill ne!er enter an unsafe state. #ecause the system does no useful or+ hile s itching. What is a Safe State and what is its use in deadlock a!oidance? .. 1. % real time operating system is an operating system that can run real time processes successfully . 20. . depending on the memory speed.