0% found this document useful (0 votes)
23 views16 pages

8D403 Co&os

Idol

Uploaded by

708preetham1
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
0% found this document useful (0 votes)
23 views16 pages

8D403 Co&os

Idol

Uploaded by

708preetham1
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 16
H.T No Regulations: Sreenidhi Institute of Science and Technology A20 (An Autonomous Institution} Code No: 8D403 Date: 14-Aug-2023 (FN) B.Tech Il-Year II- Semester External Examination, Aug - 2023 (Regular & Supplementary) COMPUTER ORGANIZATION AND OPERATING SYSTEMS (ECM) Time: 3 Hours Max.Marks:70 (Note: a) No addtional answer sheets wil be provided. ) All sub-parts of a question must be answered at one place only, otherwise it wil not be valued. ©) Missing data can be assumed suitably Bloom's Cognitive Levels of Learning (BCL) [Sena Ts AoA | Evaate ma Understand [2 Analyze Ua Create ts Part - A Max.Marks:20 ra ANSWER ALL QUESTIONS ecu €0l) ae A 1 Give the structure of BUS. Li CO! [aM 2. Define system call L1 coz 2M) 3. What is the need for algorithms in segmentation L2 cos aM) 4 Whatis Address Sequencing? 12 cos eM] 5 What is DMA? 12 005 [2M] 8 Define Dead locks. U1 605 [2M] 7 Explain about Arithmetic and Logic Micro operations L2 Or [aM] 8 List out various types of Memories. L1 cos [2M] 9 Whatis fle system mounting. L2 cos [2M] 10 Narrate PCI interconnect. L3 cos [2M Part-B Max.Marks:60 ANSWER ANY FIVE QUESTIONS. EACH QUESTION CARRIES 10 MARKS. SCL Cols) Maks 11. a) Explain about various Instruction Formats. 12 col ESM] b) Discuss about various Data representations? 13 col [SM 12. a) Describe in detail about overview of System calls. 13 co2 [5M] b) Explain in detail various Generations of Operating Systems 2 co2 [BM] 13. a) Give the detail view on semi conductor memories. 12 coo [5M b) Discus about page replacement Algorithms? 13 cos [5M 14. a) Explain the detail design of control unit. 2 cot 5M b) Differentiate between Hardwired Vs Micro -programmed control. L4 cos [5M] 15. a) List out various Data Transfer Modes? Explain. Li 605 [5M b) What is Serial Communication? Discuss in detail 12 605 [5M] 16. a) Explain Dead lock Characterization. 12 608 [5My b) Describe various File allocation Methods 13 COS [5M] 17. a) Explain about Interrupt services. L2 cot [4My b) Discuss about Operating System functionalities? 13 002 [3M c) Explain about Demand Paging. 12 603 [3M] 18. a) Define Address sequencing Lt 004 [4M] b) What is Asynchronous Data transfer? 12 005 [3M ©) Explain Dead lock prevention and Avoidance. 12 008 [3M] — 00 -- 00 - Page 1 of f B.Tech II Year Il Semester External Examination, August 2023, A20 Regulation Subject Name: Computer Organization and Operating System (8D403) Key (ECM) Pat Single-Bus structure tf ie Bus Struc 2. Assystem call is a method for a computer program to request a service from the kernel of the ‘operating system on which it is running. 2M A system call is a method of interacting with the operating system via programs. A system call is a request from computer software to an operating system's kernel 3. Segmentation is a memory management technique that can be used to improve the performance of an operating system. By dividing physical memory into segments, the operating system can better manage its memory use, improving efficiency and performance. 2M 4, The address sequencing capabilities required in a control memory are: Incrementing of the control address register. Unconditional branch or conditional branch, depending on status bit conditions. A mapping process from the bits of the instruction to an address for control memory. 2M. 5. Direct memory access (DMA) is the process of transferring data without the involvement of the processor itself. It is often used for transferring data to/from input/output devices. 2M 6. Adeadlock in OS is a situation in which more than one process is blocked because itis holding @ resource and also requires some resource that is acquired by some other process. 2M 7. Examples of arithmetic operations are addition, subtraction, multiplication, and division. Examples of logic operations are comparisons of values such as NOT, AND, and OR. All information in a computer is stored and manipulated in the form of binary numbers, ie. 0 and 1. 2M 8. Memory consists of four types of memory chips: RAM, ROM, CMOS and flash. 2M 9. Mounting makes file systems, files, directories, devices, and special files available for use at 2 particular location. It is the only way a file system is made accessible. The mount command instructs the operating system to attach a filesystem at a specified directory. 2M 10. Peripheral Component Interconnect (PCI) is a hardware interface for connecting peripheral devices to a computer. 2M 11. A. Instruction formats © A computer instruction is often divided into two parts. 3M. ‘An opcode (Operation Code) that specifies the operation for that instruction ‘* Anaddress that specifies the registers and/or locations in memory to use for that operation. Example of Instructions: 2m ‘Three-Address Instructions ADD R1, R2, R3 RL ER2+R3 ‘Two-Address instructions ‘ADD R1, R2 RLERL+R2 ‘One-Address Instructions ‘ADD M AC € AC + M[AR] Zero-Address Instructions ADD TOS € TOS + (TOS-1) Data Representations 25M Tuner Data Peeper eee TI} uFined Point 3-3 Fixed-Point Representation 2) Floating Pot © Computers must represent everything with 1's and 0°s, including the sign of a number and fixed/floating point number aay 4 Binay/Decimal Point ‘The postion ath isydecimal point i needed to cpr factions ge cr med integer ction sabe # Two ways of specifying the postion of the binary point na register ‘© 1) Fixed Point : the binary point is always fixed in one position > Abinary pot in the extreme lef ofthe cegister Fraction : O28) v» Abinary putt in the extrome right of the register Unteger xxXXX 0) Do bina poi orth presen, Bu he aber stored ‘¢ 2) Floating Point: the second cegister is used to designate the position of the binary point in the frst registen(refer to 3-4) 4 tego Representation 7 ; © Signed mingnitide representition oon 1001110 => er ene sear eceeamtt tal og totes or dT ve Signed." complemen representation “goto 1181000 2.5M ion = 3.4 Floating-Point Representa ‘© The floating-point representation of a number has two parts 1) Moots: signed fixed-point umber _--“* Desinal 6150769) {2} Enponen potion of binaytecinal poi”, Ean @ Scientific notation: 1x 1° (-0.6132789 x 10° © manasa, r: radix, e exponent s ¢ Example :mix2"=+(1001110),27" —ae ‘Normalization 1 Mos significant dit of mantissa is nonzero 12. A. System Calls 2m In computing, a system call is a programmatic way in which a computer program requests a service from the kernel of the operating system it is executed on. A system call is a way for programs to interact with the operating system. Services Provided by System Calls 3m. = Process creation and management + Main memory management File Access, Directory, and File system management = Device handling(I/0) = Protection = Networking, etc Process control: end, abort, create, terminate, allocate, and free memory. File management: create, open, close, delete, read files, etc. Device management Information maintenance Communication enerations of Operating System iM Operating Systems have evolved over the years. So, their evolution through the years can be mapped using generations of operating systems. There are four general ns of operating systems. These can be described as follows ~ The First Generation (1945 - 1955): Vacuum Tubes and Plug boards am Digital computers were not constructed until the second world war. Calculating engines with mechanical relays were built at that time. However, the mechanical relays were very slow and were later replaced with vacuum tubes. These machines were enormous but were still very slow. ‘The Second Generation (1955 - 1965): Transistors and Batch Systems 1M Transistors led to the development of the computer systems that could be manufactured and sold to paying customers. These machines were known as mainframes and were locked in air-conditioned computer rooms with staff to operate them. The Third Generation (1965 - 1980): Integrated Circuits and Multiprogramming 1M Until the 1960's, there were two types of computer systems i.e., the scientific and the commercial computers. These were combined by IBM in the System/360. This used integrated circuits and provided a major price and performance advantage over the second generation systems. The Fourth Generation (1980 - Present): Personal Computers 1M Personal Computers were easy to create with the development of large-scale integrated circuits. These were chips containing thousands of transistors on a square centimeter of silicon, Because of these, microcomputers were much cheaper than minicomputers and that made it possible for a single individual to own one of them. 13, A. Semiconductor memories 2M Semiconductor memory is a type of semiconductor device tasked with storing data. ‘Read onty memory (ROM) ste rlemary (RAM) Masked ROM PROM EPROM EEPROM Static RAM Dynamic RAM Fig, 3.68 Classification of semiconductor memories Uses capacitor for storing Uses Flip flop information More cells per unit area due Needs more space for same to smaller cell size. capacity Cheap and smaller in size Expensive and bigger in size Slower and analog device Faster and digital device Requires refresh circuit No need Used in main memory Used in cache 1M ROM is uses random access method, It is used for storing programs that are permanent and the tables of constants that do not change. ROM store program called bootstrap loader whose function is to start the computer software when the power is turned on. When the power is turned ‘on, the hardware of the computer sets the program counter to the first address of the bootstrap loader. 2M © It is non-volatile memory, which retains the data even when power is removed from this memory. Programs and data that cannot be altered are stored in ROM. * ROM is used for storing programs that are PERMANENTLY resident in the computer and for tables of constants that do not change in value once the production of the computer is completed. ‘* The ROM portion of main memory is needed for storing an initial program called bootstrap loader, which is to start the computer operating system when power turned on, ‘Types of ROMs = PROM - EPROM - EEPROM = Flash Page Replacement Algorithms 2M “LIFO Page Replacement FIFO Page Replacement Algorithm 3am 1. FIFO Page Replacement Algorithm Itis a very simple way of Page replacement and is referred to as First in First Out. This algorithm mainly replaces the oldest page that has been present in the main memory for the longest time. This algorithm is implemented by keeping the track of all the pages in the queue. ‘As new pages are requested and are swapped in, they are added to the tail of a queue and the page which is at the head becomes the victim. This is not an effective way of page replacement but it can be used for small systems. Advantages ‘© This algorithm is simple and easy to use. ‘© FIFO does not cause more overhead. Disadvantages © This algorithm does not make the use of the frequency of last used time rather it just replaces the Oldest Page. ‘© There is an increase in page faults as page frames increases, «The performance of this algorithm is the worst. 2. LIFO Page Replacement Algorithm This Page Replacement algorithm stands for “Last In First Out", This algorithm works in a similar way to the LIFO principle. In this, the newest page is replaced which is arrived at last in the primary memory ‘This algorithm makes use of the stack for monitoring all the pages. 3, LRU Page Replacement Algorithm in OS This algorithm stands for "Least recent used” and this algorithm helps the Operating system to search those pages that are used over a short duration of time frame. The page that has not been used for the longest time in the main memory will be selected for replacement. This algorithm is easy to implement. This algorithm makes use of the counter along with the even-page. ‘Advantages of LRU + tis anefficient technique. * With this algorithm, it becomes easy to identify the faulty pages that are not needed for along time. ‘© Ithelps in Full analysis. Disadvantages of LRU + Itis expensive and has more complexity. There isa need for an additional data structure. 4, Optimal Page Replacement Algorithm This algorithm mainly replaces the page that will not be used for the longest time in the future. The practical implementation of this algorithm is not possible. Practical implementation is not possible because we cannot predict in advance those pages‘that will not be used for the longest time in the future. This algorithm leads to less number of page faults and thus is the best-known algorithm, Also, this algorithm can be used to measure the performance of other algorithms. Advantages of OPR + This algorithm is easy to use. ‘+ This algorithm provides excellent efficiency and is less complex. ‘* For the best result, the implementation of data structures is very easy Disadvantages of OPR _Inthis algorithm future awareness of the program is needed, * Practical Implementation is not possible because the operating system is unable to track the future request 5, Random Page Replacement Algorithm {As indicated from the name this algorithm replaces the page randomly. This Algorithm can work like any other page replacement algorithm that is LIFO, FIFO, Optimal, and LRU. ‘ 14, A. Control Unit Design 2.5M ayer a Tey eu ote eee are eo ric} aes | cee fegie Cireul [ins. Cyote seate] y Plier eee Hardwired Control Unit Vs Microy rammed Control Unit 2.5M ‘S.No. Hardwired Control Unit Microprogrammed Control Unit The hardwired control unit induces the control signals required for the processor. The microprogrammed control unit induces the control signals through microinstructions. Hardwired control unit is quicker than a Microprogrammed control unit is slower 2, _ | microprogrammed contro! unit. thon a hardwired control unit. 3. | ttishard to moaity. Itis easy to mociity. tis more expensive as compared to the itis affordable as compared to the 4. | microprogrammed contro! unit. hardwired control unit. IMfaces difficulty in managing the complex instructions because the design of the circuit | it can easily manage complex 5. | isalso complex. instructions, It can generate contro! signals for many 6. | Itcanuse limited instru instructions. 15, A. Data Transfer Modes: 2M. Synchronous - All devices derive the timing information from common clock line Asynchronous - No common clock ‘Asynchronous data transfer between two independent units requires that control signals be transmitted between the communicating units fo indicate the time at which data is being transmitted. Strobe pulse 3M - _Astrobe pulse is supplied by one unit to indicate the other unit when the transfer has to. occur Handshaking = Acontrol signal is accompanied with each data being transmitted to indicate the presence of data + The receiving unit responds with another control signal to acknowledge receipt of the data Strobe Methods = Source-Initiated = The source unit that initiates the transfer has no way of knowing whether the destination unit has actually received data - _ Destination-Initiated = The destination unit that initiates the transfer no way of knowing whether the source has actually placed the data on the bus = Tosolve this problem, the HANDSHAKE method introduces a second control signal to provide a Reply to the unit that initiates the transfer. Serial Communication 2M In serial communication, data is in the form of binary pulses. In other words, we can say Binary One represents a logic HIGH or 5 Volts, and zero represents a logic LOW or 0 Volts. Serial communication can take many forms depending on the type of transmission mode and data transfer. 3M ‘The transmission modes are classified as Simplex, Half Duplex, and Full Duplex. There will be a source (also known as a sender) and destination (also called a receiver) for each transmission mode. = Simplex method: one-way communication technique. Only one client (either the sender or receiver is active at a time). If a sender transmits, the receiver can only accept, Radio and Television transmission are the examples of simplex mode. - Half Duplex mode: Both sender and receiver are active but not at a time, i.e. if a sender transmits, the receiver can accept but cannot send and vice versa. A good example is an internet. Ifa client (laptop) sends a request for a web page, the web server processes the application and sends back the information. : = Full Duplex mode: Widely used communication in the world. Here both sender and receiver can transmit and receive at the same time. An example is your smartphone. 16. A. Dead Lock Characterization aM ‘A deadlock happens in operating system when two or more processes need some resource to complete their execution that is held by the other process. 1M - Mutual exclusion - One or more than one resource must be held by a process in a non-sharable (exclusive) mode. = Only 1-process can share resource at a time (Non-sharable) (Ex. Narrow road) - Hold and Wait 1M = Aprocess holds a resource while waiting for another resource. - Process waits for one another's action indefinitely. (Ex. Drawing book -Pencil) No Preemption 1M - There is only voluntary release of a resource - nobody else can make a process give up a resource - Circular Wait 1m ~ Process A waits for Process B waits for Process C.... waits for Process A. B. File allocation methods: 2M The allocation methods define how the files are stored in the disk blocks. There are three main disk space or file allocation methods. 1. Contiguous Allocation 2. Linked Allocation 3. Indexed Allocation ‘The main idea behind these methods is to provide: - _ Efficient disk space utilization. - Fast access to the file blocks. Contiguous Allocation 1M In this scheme, each file occupies a contiguous set of blocks on the disk. The directory entry for a file with contiguous allocation contains + Address of starting block - Length of the allocated portion. 10 2. Linked List Allocation 1M In this scheme, each file is a linked list of disk blocks which need not be contiguous. The disk blocks can be scattered anywhere on the disk. 3. Indexed Allocation 1M In this scheme, a special block known as the Index block contains the pointers to all the blocks occupied by a file. Each file has its own index block. 17. A. Interrupt Service 2M The interrupt is a signal emitted by hardware or software when a process or an event needs immediate attention. It alerts the processor to a high-priority process requiring interruption of the current working process. In I/O devices one of the bus control lines is dedicated for this purpose and is called the Interrupt Service Routine (ISR). 2M Main program gk Interrupt 10 devin is eady for data vanstor Performing dots arse vith VO eaves a B. Operating System functionalities: 3M ‘An operating system is a piece of software. Functions of an Operating System Process ~ ‘management = Operating (=) = (&) oo ™ Securty ) ( nesorie ) Cen ¢. Demand Paging 3m + Demand paging system loads pages only on demand, not in advance «Instead of swapping the entre process into memory, the pages or the lazy swapper is. oveae e919 5 3G rrr page een : secoreanc “+ Alazy swapper brings only the Teor Chat necessary pages into memory , 18, A. Address sequencing: 2M Sequencer (Micro program Sequencer) ‘A Micro Program Control Unit that determines the Microinstructi executed in the next clock cycle -In-line Sequencing -Branch Conditional Branch “Subroutine -Loop -Instruction OP-code mapping, 2 2M Spear GmoeeD eet Contra! memory (ROM) Branch naivene Microcpessens: 7 B. Asynchronous Data Transfer 2M Asynchronous Data Transfer between two independent units requires that control signals be transmitted between the communicating units so that the time can be indicated at which they send data. These two methods can achieve this asynchronous way of data transfer: Strobe control: A strobe pulse is supplied by one unit to indicate to the other unit when the transfer has to occur. Handshaking: This method is commonly used to accompany each data item being transferred with a control signal that indicates data in the bus. The unit receiving the data item responds with another signal to acknowledge receipt of the data. SOURCE-INITIATED TRANSFER USING HANDSHAKE 1M Block Diagram ot — 7 | . Timing Diagram es Sequence of Events source unt entination wit 2B C. Dead Lock Prevention and Avoidance 15M 1. Deadlock Prevention Mutual exclusion: * Automatically holds for printers and other non-sharable. ‘+ Shared entities (read only files) don’t need mutual exclusion (and aren't susceptible todeadlock.) Prevention not possible, since some devices are intrinsically non-sharable. Hold and wai * Collect all resources before execution. * A particular resource can only be requested when no others are being held. A sequence of resources is always collected beginning with the same one. * Utilization is low, starvation possible, No preemption: © Release any resource already being held if the process can't get an additional resource © Allow preemption - if a needed resource is held by another process, which is also waiting on some resource, steal it. Otherwise wait. Circular wait: ‘* Number resources and only request in ascending order. ‘© EACH of these prevention techniques may cause a decrease in utilization and/or resources. For this reason, prevention isn't necessarily the best technique. * Prevention is generally the easiest to implement. 2. Deadlock Avoidance by Safety Algorithm 15M 1. Initialize work available Initialize finish{i] false, fori=1,2,3,.n 2. Find ani such that: finish{i] == false and need{i] ork If no such i exists, go to step 4, 3. work work + allocation{i] finish{i] =true goto step 2 4. iffinish{i] == true for alli, then the system is in a safe state. 14

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