27 votes 27 votes Which one of the following statements is true? Macro definitions cannot appear within other macro definitions in assembly language programs Overlaying is used to run a program which is longer than the address space of a computer Virtual memory can be used to accommodate a program which is longer than the address space of a computer It is not possible to write interrupt service routines in a high level language Operating System gate1994 operating-system normal virtual-memory + – Kathleen asked Oct 4, 2014 recategorized Apr 25, 2021 by Lakshman Bhaiya Kathleen 8.4k views answer comment Share Follow See all 6 Comments See all 6 6 Comments reply Show 3 previous comments Shivam Chauhan commented Oct 6, 2017 reply Follow Share Option B says Overlaying is used to run a program which is longer than the address space of a computer. Program longer than it's logical address space doesn't make any sense. So it is false. Option C says Virtual memory can be used to accommodate a program which is longer than the address space of a computer. It is also false because of above reason. Have I done correct reasoning? 6 votes 6 votes srestha commented Nov 30, 2017 reply Follow Share @shivam Overlay is used when virtual memory is absent. But question is indirectly asked if it work in requirement of virtual memory But concept of overlay totally different than virtual memory 1 votes 1 votes `JEET commented Nov 22, 2019 reply Follow Share @shivam Rightly summed up. 0 votes 0 votes Please log in or register to add a comment.
Best answer 28 votes 28 votes Is TRUE. False. Overlaying is used to increase the address space usage when physical memory is limited on systems where virtual memory is absent. But it cannot increase the address space (logical) of a computer. False. Like above is true for physical memory but here it is specified address space which should mean logical address space. Is false. We can write in high level language just that the performance will be bad. Arjun answered Nov 9, 2015 edited Jul 11, 2018 by kenzou Arjun comment Share Follow See all 30 Comments See all 30 30 Comments reply Puja Mishra commented Dec 29, 2016 reply Follow Share c is false ?? how sir ?? 0 votes 0 votes Pavan Kumar Munnam commented Dec 29, 2016 reply Follow Share i think c is true 0 votes 0 votes Sachin Mittal 1 commented Jan 27, 2017 reply Follow Share Sir, in option B: "address space of a computer" means what ? - virtual or physical ? I think it should be Physical. program is longer than logical address space does not make sense. Is it ? Because generally logical address space is quite big compare to program size. 8 votes 8 votes Brij Mohan Gupta commented May 20, 2017 i edited by Brij Mohan Gupta Sep 24, 2020 reply Follow Share @Sachin address space of program means logical Address. Program is larger than Logical Address don't make any sense. 0 votes 0 votes Tuhin Dutta commented Sep 17, 2017 reply Follow Share @Sachin , then option C) should also be true. What is meant by address space of a computer? 0 votes 0 votes Ayush Upadhyaya commented Dec 5, 2017 reply Follow Share @Arjun Sir, I am not convinced by your answer, sir! (1) Nested macro definitions are allowed in assembly language. https://www.csie.ntu.edu.tw/~acpang/course/asm_2004/.../chapt_10_PartIIbw.pdf https://www.ibm.com/support/knowledgecenter/en/SSLTBW_2.1.0/com.ibm.zos.v2r1.asma400/nestmac.htm (2) The overlay is used to execute programs which are larger than the physical memory of the system as this was developed as a shortcoming to fixed partitioning method where the process size was limited by the size of the partition. Reference: http://www.geeksforgeeks.org/operating-system-overlays-memory-management/ Now, here in option it is mentioned "address space" the address space of the computer can be either physical or logical Reference: http://searchstorage.techtarget.com/definition/address-space So, this option might be true. (3) Similar reason, this might also be true. (4)No, we can write ISR in high-level language but the performance will be bad. Reference: https://barrgroup.com/embedded-systems/how-to/interrupt-service-routines So, I think (B) and (C) should be true. Let me know sir, If I am correct. 9 votes 9 votes Dileep kumar M 6 commented Dec 6, 2017 reply Follow Share Here i think address space of computer means secoudary memory so overlaying can't run a program larger than secoundary memoryand similar with virtual memory 0 votes 0 votes Ayush Upadhyaya commented Dec 6, 2017 reply Follow Share Then which option should be correct? 0 votes 0 votes Dileep kumar M 6 commented Dec 7, 2017 reply Follow Share A is answer 0 votes 0 votes Ayush Upadhyaya commented Dec 7, 2017 reply Follow Share But nested macro definitions are allowed 0 votes 0 votes Dileep kumar M 6 commented Dec 7, 2017 reply Follow Share In that case iam not able to figure out which one is true 0 votes 0 votes Ayush Upadhyaya commented Dec 7, 2017 reply Follow Share Then use google, find out and help us :) 1 votes 1 votes rahul sharma 5 commented Dec 11, 2017 reply Follow Share @Ayush Upadhyaya As you yourself say,that address space can be physical or logical.So,in that case this statement will not hold always for making b and c as true/? 0 votes 0 votes rahul sharma 5 commented Dec 11, 2017 reply Follow Share @Ayush. I have seen the link you shared.On slide 17/51 there is a nested macro topic.But they say nested macro (a macro invoked by another macro). But we in context to question are talking about definition of a macro in a macro and not Marco calling other macro 1 votes 1 votes Ayush Upadhyaya commented Dec 11, 2017 reply Follow Share @rahul, what about a system who does not have a MMU.In that case our address space would be physical only right.? 0 votes 0 votes Ayush Upadhyaya commented Dec 11, 2017 reply Follow Share Have you seen the second link rahul?the ibm one? 0 votes 0 votes rahul sharma 5 commented Dec 11, 2017 reply Follow Share No.I will see once i get time.I searched on google and the first document i get has the line:- A macro definition can appear anywhere in an assembly language program before the END directive; however for MASM and TASM the definition of a macro must appear before a call to that macro and a macro definition cannot appear inside another macro definition. It is usual to place all macro definitions at the beginning of a program before the segment definitions. 1 votes 1 votes Puja Mishra commented Dec 24, 2017 reply Follow Share Overlays are made when there is a need of running a program of larger size than the memory allocated to it. A program is broken into overlays say overlay1 and overlay2, now overlay1 is loaded into main memory and overlay2 is still in secondary memory. When overlay1 finishes its execution, it gets overwritten by overlay2 and it gets executed without loading whole program at a time. Swapping in a scheme in which pages from main memory to secondary memory are being swapped in(rolled in) and swapped out(rolled out) as desired during execution of a 1 votes 1 votes pCS commented Dec 29, 2017 reply Follow Share Regarding A) http://plit.de/asem-51/nestdefs.htm says " A macro body may also contain further macro definitions. However, these nested macro definitions aren't valid until the enclosing macro has been expanded! That means, the enclosing macro must have been called, before the nested macros can be called. " 3 votes 3 votes Ayush Upadhyaya commented Dec 29, 2017 reply Follow Share @pCS-so what is your opinion regarding A? Should it be marked true? 0 votes 0 votes pCS commented Dec 29, 2017 reply Follow Share I think yes & regarding what was quoted by rahul sharma 5 "A macro definition can appear anywhere in an assembly language program before the END directive; however for MASM and TASM the definition of a macro must appear before a call to that macro and a macro definition cannot appear inside another macro definition. It is usual to place all macro definitions at the beginning of a program before the segment definitions.", it is specifically for MASM, TASM. 0 votes 0 votes mehul vaidya commented Jun 9, 2018 reply Follow Share @Arjun @Arjuncorrect this answer according to aayush's comment 0 votes 0 votes Arjun commented Jun 9, 2018 reply Follow Share I would have done if it was needed. 5 votes 5 votes zeeshanmohnavi commented Dec 8, 2018 reply Follow Share I went through the answers/comments in this thread and came to a conclusion that: address space of a computer refers to the "logical" address space. This, in fact, confused me to an extent to ask this: what exactly is meant by the logical space, and how does it differ from the physical address space? Note: My understanding of the physical address space is the set of all memory addresses (main memory, to be precise) present in a computer system. 1 votes 1 votes srestha commented Nov 5, 2019 reply Follow Share Overlay and Virtual memory both used to run a program, which is longer than physical address space of a computer. But this is not mentioned in question. So, B) and C) both false. 1 votes 1 votes King Suleiman commented Nov 8, 2019 i edited by King Suleiman Nov 8, 2019 reply Follow Share ma'am then which address space this question is referring to? while running a process , cpu generates logical address which is not real and it will be mapped to physical address in computer. how does physical address space differs from logical address space in a computer? 0 votes 0 votes `JEET commented Nov 22, 2019 reply Follow Share @srestha One of your comment above says: "Overlays are used when virtual memory is absent" and after that, you are talking about physical address space? 0 votes 0 votes `JEET commented Nov 22, 2019 reply Follow Share Can someone sum up everything here? @Bikram Sir can you please help. This question is really confusing everyone. 0 votes 0 votes VIDYADHAR SHELKE 1 commented Nov 24, 2019 reply Follow Share if computer address means either PA or VA then above answer correct ...if anything by default predefined computer address is like PA or VA then it will be wrong ....conclusion i don't by is any default computer address ? 0 votes 0 votes Pranavpurkar commented Sep 2, 2022 reply Follow Share if nested macro definitions are possible than A must be false as per @Ayush Upadhyaya sir’s comment. pls help in this ! 0 votes 0 votes Please log in or register to add a comment.
0 votes 0 votes Both B and C are true B says overlay is used to long program which is correct don’t confuse with address space here please C says virtual memory is used to accomodate long program which is correct sardendu answered Sep 11, 2018 sardendu comment Share Follow See all 0 reply Please log in or register to add a comment.
–2 votes –2 votes option c is correct as virtual memory provides virtual address which can be directly converted to physical address. Mohit Dubey answered Mar 2, 2015 Mohit Dubey comment Share Follow See 1 comment See all 1 1 comment reply vaishali jhalani commented Dec 17, 2016 reply Follow Share I think A and B both are true. 0 votes 0 votes Please log in or register to add a comment.