todays 703 paper
mcqs new thy recent papers men se just 3 thy .10
mcqs new thy recent papers men se just 3 thy .10
Q.Briefly explain major security issues. 10
Answer:
• Isolation
Separate processes execute in separate memory space
Process can only manipulate allocated pages
• Authentication
Who can access the system. Involves proving identities to the system
• Access control
When can process create or access a file?
Create or read/write to socket?
Make a specific system call?
• Protection problem
Ensure that each object is accessed correctly and only by those processes that are allowed to do so
• Comparison between different operating systems
Compare protection models: which model supports least privilege most effectively?
Which system best enforces its protection model?
Answer:
• Isolation
Separate processes execute in separate memory space
Process can only manipulate allocated pages
• Authentication
Who can access the system. Involves proving identities to the system
• Access control
When can process create or access a file?
Create or read/write to socket?
Make a specific system call?
• Protection problem
Ensure that each object is accessed correctly and only by those processes that are allowed to do so
• Comparison between different operating systems
Compare protection models: which model supports least privilege most effectively?
Which system best enforces its protection model?
Q. When a program enters into an infinite loop and never returns control back to CPU. Explain how timer interrupts help to terminate this condition?
Answer: An infinite loop (also known as an endless loop or unproductive loop) is a sequence of instructions in a computer program which loops endlessly, either due to the loop having no terminating condition, having one that can never be met, or one that causes the loop to start over. In older operating systems with cooperative multitasking, infinite loops normally caused the entire system to become unresponsive. With the now-prevalent preemptive multitasking model, infinite loops usually cause the program to consume all available processor time, but can usually be terminated by the user. Busy wait loops are also sometimes called "infinite loops". One possible cause of a computer "freezing" is an infinite loop; others include thrashing, deadlock, and access violations.
So long as the system is responsive, infinite loops can often be interrupted by sending a signal to the process (such as SIGINT in Unix), or an interrupt to the processor, causing the current process to be aborted. This can be done in a task manager, in a terminal with the Control-C command, or by using the kill command or system call. However, this does not always work, as the process may not be responding to signals or the processor may be in an uninterruptible state, such as in the Cyrix coma bug (caused by overlapping uninterruptible instructions in an instruction pipeline). In some cases other signals such as SIGKILL can work, as they do not require the process to be responsive, while in other cases the loop cannot be terminated short of system shutdown.
Answer: An infinite loop (also known as an endless loop or unproductive loop) is a sequence of instructions in a computer program which loops endlessly, either due to the loop having no terminating condition, having one that can never be met, or one that causes the loop to start over. In older operating systems with cooperative multitasking, infinite loops normally caused the entire system to become unresponsive. With the now-prevalent preemptive multitasking model, infinite loops usually cause the program to consume all available processor time, but can usually be terminated by the user. Busy wait loops are also sometimes called "infinite loops". One possible cause of a computer "freezing" is an infinite loop; others include thrashing, deadlock, and access violations.
So long as the system is responsive, infinite loops can often be interrupted by sending a signal to the process (such as SIGINT in Unix), or an interrupt to the processor, causing the current process to be aborted. This can be done in a task manager, in a terminal with the Control-C command, or by using the kill command or system call. However, this does not always work, as the process may not be responding to signals or the processor may be in an uninterruptible state, such as in the Cyrix coma bug (caused by overlapping uninterruptible instructions in an instruction pipeline). In some cases other signals such as SIGKILL can work, as they do not require the process to be responsive, while in other cases the loop cannot be terminated short of system shutdown.
Q.Differentiate static permission inheritance and dynamic permission inheritance.5
Q.how we can overcome fragmentation ?5
Q. if a file is saved and than removes .. files remove but still link are active . now if you save a new file with the same name at same path what problem occur and how we can avoid this problem. 5.
Q.(a) How many bytes are contained within the physical memory?
(b) How large is the virtual address?
(c) What is the physical address that corresponds to virtual address 0x312?
(d) What is the physical address that corresponds to virtual address 0x1E9?
Solution
(a) Number of bytes in physical memory is equal to 2 ^(7 + 7) = 16K bytes. This is because 12 bits are required to address physical memory location out of which 3 bits are to refer frame no. within page table + 2 bits to locate page from segment and remaining 7 bits for offset with frame.
(b) The size of virtual memory is 2 ^ 20 ( 20 = 2 for segment index, + 3 for page table index + 3 for frame index in page table + 7 for frame number and 5 for offset within frame).
(c) 312 (Hex) = 001100010010 = 00(segment) in table number 3 (refer to the data in question at entry 0 in segment table then find page 3, in page 3 find 110 (6th entry) which is 78; that is 120 th frame then the offset with the frame is given by the last 7 bits 0010010.
(b) How large is the virtual address?
(c) What is the physical address that corresponds to virtual address 0x312?
(d) What is the physical address that corresponds to virtual address 0x1E9?
Solution
(a) Number of bytes in physical memory is equal to 2 ^(7 + 7) = 16K bytes. This is because 12 bits are required to address physical memory location out of which 3 bits are to refer frame no. within page table + 2 bits to locate page from segment and remaining 7 bits for offset with frame.
(b) The size of virtual memory is 2 ^ 20 ( 20 = 2 for segment index, + 3 for page table index + 3 for frame index in page table + 7 for frame number and 5 for offset within frame).
(c) 312 (Hex) = 001100010010 = 00(segment) in table number 3 (refer to the data in question at entry 0 in segment table then find page 3, in page 3 find 110 (6th entry) which is 78; that is 120 th frame then the offset with the frame is given by the last 7 bits 0010010.
Q.Describe the functionality of each line. (Marks 10)….
/*Parents code*/
Ssize-tread(int fd,void*buf,size-tcount)
1-close(pipe fd[1]);
2-n=strln(teststring);
3-nr=read(pipefd[0],buf,nA);
4-rc=write(1,buf,nr);
5-wait(&status);
6-printf(“Good work child!\n”);
7-return(0);
}
/*Parents code*/
Ssize-tread(int fd,void*buf,size-tcount)
1-close(pipe fd[1]);
2-n=strln(teststring);
3-nr=read(pipefd[0],buf,nA);
4-rc=write(1,buf,nr);
5-wait(&status);
6-printf(“Good work child!\n”);
7-return(0);
}
Ans . read() reads count bytes in buf from fd; then it closes the fd file descriptor on pipe ; strlen() returns length of teststring ; same as read did before; then write writes to buf ; wait() blocks the caller and terminates the child; print goodluck n return zero....
No comments:
Post a Comment