Вы находитесь на странице: 1из 4

OPERATING SYSTEMS QUESTIONS

1. What are the basic functions of an operating s ste!" - Operating system controls and coordinates the use of the hardware among the various applications programs for various uses. Operating system acts as resource allocator and manager. Since there are many possibly conflicting requests for resources the operating system must decide which requests are allocated resources to operating the computer system efficiently and fairly. Also operating system is control program which controls the user programs to prevent errors and improper use of the computer. It is especially concerned with the operation and control of I/O devices. . Wh paging is use#" - !aging is solution to e"ternal fragmentation problem which is to permit the logical address space of a process to be noncontiguous# thus allowing a process to be allocating physical memory wherever the latter is available. $. Whi$e running %OS on a P&' (hich co!!an# (ou$# be use# to #up$icate the entire #is)ette" dis%copy &. What resources are use# (hen a threa# create#" *o( #o the #iffer fro! those (hen a process is create#" - 'hen a thread is created the threads does not require any new resources to e"ecute the thread shares the resources li%e memory of the process to which they belong to. (he benefit of code sharing is that it allows an application to have several different threads of activity all within the same address space. 'hereas if a new process creation is very heavyweight because it always requires new address space to be created and even if they share the memory then the inter process communication is e"pensive when compared to the communication between the threads. ). What is +irtua$ !e!or " - *irtual memory is hardware technique where the system appears to have more memory that it actually does. (his is done by timesharing# the physical memory and storage parts of the memory one dis% when they are not actively being used. +. What is Throughput' Turnaroun# ti!e' (aiting ti!e an# Response ti!e" (hroughput number of processes that complete their e"ecution per time unit. (urnaround time amount of time to e"ecute a particular process. 'aiting time amount of time a process has been waiting in the ready queue. ,esponse time amount of time it ta%es from when a request was submitted until the first response is produced# not output -for time-sharing environment.. /. What is the state of the processor' (hen a process is (aiting for so!e e+ent to occur" - 'aiting state 0. What is the i!portant aspect of a rea$,ti!e s ste! or Mission &ritica$ S ste!s" - A real time operating system has well defined fi"ed time constraints. !rocess must be done within the defined constraints or the system will fail. An e"ample is the operating system for a flight control computer or an advanced 1et airplane. Often used as a control device in a dedicated application such as controlling scientific e"periments# medical imaging systems# industrial control

systems# and some display systems. ,eal-(ime systems may be either hard or soft real-time. *ar# rea$,ti!e2 Secondary storage limited or absent# data stored in short term memory# or read-only memory -,O3.# 4onflicts with time-sharing systems# not supported by general-purpose operating systems. Soft rea$,ti!e2 5imited utility in industrial control of robotics# 6seful in applications -multimedia# virtual reality. requiring advanced operating-system features. 7. What is the #ifference bet(een *ar# an# Soft rea$,ti!e s ste!s" - A hard real-time system guarantees that critical tas%s complete on time. (his goal requires that all delays in the system be bounded from the retrieval of the stored data to the time that it ta%es the operating system to finish any request made of it. A soft real time system where a critical real-time tas% gets priority over other tas%s and retains that priority until it completes. As in hard real time systems %ernel delays need to be bounded 18. What is the cause of thrashing" *o( #oes the s ste! #etect thrashing" Once it #etects thrashing' (hat can the s ste! #o to e$i!inate this prob$e!" (hrashing is caused by under allocation of the minimum number of pages required by a process# forcing it to continuously page fault. (he system can detect thrashing by evaluating the level of 4!6 utili9ation as compared to the level of multiprogramming. It can be eliminated by reducing the level of multiprogramming. 11. What is !u$ti tas)ing' !u$ti progra!!ing' !u$ti threa#ing" - Mu$ti progra!!ing2 3ultiprogramming is the technique of running several programs at a time using timesharing. It allows a computer to do several things at the same time. 3ultiprogramming creates logical parallelism. (he concept of multiprogramming is that the operating system %eeps several 1obs in memory simultaneously. (he operating system selects a 1ob from the 1ob pool and starts e"ecuting a 1ob# when that 1ob needs to wait for any i/o operations the 4!6 is switched to another 1ob. So the main idea here is that the 4!6 is never idle. Mu$ti tas)ing2 3ultitas%ing is the logical e"tension of multiprogramming .(he concept of multitas%ing is quite similar to multiprogramming but difference is that the switching between 1obs occurs so frequently that the users can interact with each program while it is running. (his concept is also %nown as time-sharing systems. A time-shared operating system uses 4!6 scheduling and multiprogramming to provide each user with a small portion of time-shared system. Mu$ti threa#ing2 An application typically is implemented as a separate process with several threads of control. In some situations a single application may be required to perform several similar tas%s for e"ample a web server accepts client requests for web pages# images# sound# and so forth. A busy web server may have several of clients concurrently accessing it. If the web server ran as a traditional single-threaded process# it would be able to service only one client at a time. (he amount of time that a client might have to wait for its request to be serviced could be enormous. So it is efficient to have one process that contains multiple threads to serve the same purpose. (his approach would multithread the web-server process# the server would create a separate thread that would listen for client requests when a request was made rather than creating another process it would create another thread to service the request. (o get the advantages li%e responsiveness# ,esource

sharing economy and utili9ation of multiprocessor architectures multithreading concept can be used. 1 . What is har# #is) an# (hat is its purpose" - :ard dis% is the secondary storage device# which holds the data in bul%# and it holds the data on the magnetic medium of the dis%.:ard dis%s have a hard platter that holds the magnetic medium# the magnetic medium can be easily erased and rewritten# and a typical des%top machine will have a hard dis% with a capacity of between 18 and &8 gigabytes. ;ata is stored onto the dis% in the form of files. 1$. What is frag!entation" %ifferent t pes of frag!entation" - <ragmentation occurs in a dynamic memory allocation system when many of the free bloc%s are too small to satisfy any request. E-terna$ .rag!entation2 ="ternal <ragmentation happens when a dynamic memory allocation algorithm allocates some memory and a small piece is left over that cannot be effectively used. If too much e"ternal fragmentation occurs# the amount of usable memory is drastically reduced. (otal memory space e"ists to satisfy a request# but it is not contiguous. Interna$ .rag!entation2 Internal fragmentation is the space wasted inside of allocated memory bloc%s because of restriction on the allowed si9es of allocated bloc%s. Allocated memory may be slightly larger than requested memory> this si9e difference is memory internal to a partition# but not being used 1&. What is %RAM" In (hich for! #oes it store #ata" - ;,A3 is not the best# but its cheap# does the 1ob# and is available almost everywhere you loo%. ;,A3 data resides in a cell made of a capacitor and a transistor. (he capacitor tends to lose data unless its recharged every couple of milliseconds# and this recharging tends to slow down the performance of ;,A3 compared to speedier ,A3 types. 1). What is %ispatcher" - ;ispatcher module gives control of the 4!6 to the process selected by the short-term scheduler> this involves2 Switching conte"t# Switching to user mode# ?umping to the proper location in the user program to restart that program# dispatch latency time it ta%es for the dispatcher to stop one process and start another running. 1+. What is &PU Sche#u$er" - Selects from among the processes in memory that are ready to e"ecute# and allocates the 4!6 to one of them. 4!6 scheduling decisions may ta%e place when a process2 1.Switches from running to waiting state. .Switches from running to ready state. $.Switches from waiting to ready. &.(erminates. Scheduling under 1 and & is non-preemptive. All other scheduling is preemptive. 1/. What is &onte-t S(itch" - Switching the 4!6 to another process requires saving the state of the old process and loading the saved state for the new process. (his tas% is %nown as a conte"t switch. 4onte"t-switch time is pure overhead# because the system does no useful wor% while switching. Its speed varies from machine to machine# depending on the memory speed# the number of registers which must be copied# the e"isted of special instructions-such as a single instruction to load or store all registers.. 10. What is cache !e!or " - 4ache memory is random access memory -,A3. that a computer microprocessor can access more quic%ly than it can access regular ,A3. As the microprocessor processes data# it loo%s first in the cache memory

and if it finds the data there -from a previous reading of data.# it does not have to do the more time-consuming reading of data from larger memory.

1. What is a Safe State an# (hat is its use in #ea#$oc) a+oi#ance" - 'hen a process requests an available resource# system must decide if immediate allocation leaves the system in a safe state. System is in safe state if there e"ists a safe sequence of all processes. ;eadloc% Avoidance2 ensure that a system will never enter an unsafe state. . What is a Rea$,Ti!e S ste!" - A real time process is a process that must respond to the events within a certain time period. A real time operating system is an operating system that can run real time processes successfully

Вам также может понравиться