Question

In: Computer Science

Explain how an operating system protects main memory in a computer system. Discuss three responsibilities that...

  1. Explain how an operating system protects main memory in a computer system.
  2. Discuss three responsibilities that an operating system has for file management in a computer system.
  3. Clearly distinguish between interrupt and trap. Give examples to illustrate your answer.
  4. Describe time-sharing systems and give an example to illustrate your answer.
  5. Discuss the 4 categories in which work concerning information security and protection relating to Operating Systems are grouped.

Solutions

Expert Solution

Q1.Explain how an operating system protects main memory in a computer system.

Ans. Operating systems protect memory to prevent a process from accessing memory that has not been allocated to it. This prevents a bug or malware within a process from affecting other processes, or the operating system itself. Protection may encompass all accesses to a specified area of memory, write accesses, or attempts to execute the contents of the area. An attempt to access unauthorized memory results in a hardware fault, e.g., a segmentation fault, storage violation exception, generally causing abnormal termination of the offending process. Memory protection for computer security includes additional techniques such as address space layout randomization and executable space protection. It is a way to control memory access rights on a computer.

There are two methods to handle memory protection. The first method is known as unprotected and uses voluntarily enforced software control routines to manage rules for task interaction. The second method is known as protected and uses hardware and software to enforce rules for task interaction. In a protected system the hardware protects areas of memory by generating an abort when access permission is violated and software responds to handle the abort routines and manage control to memory-based resources.

Q2.Discuss three responsibilities that an operating system has for file management in a computer system.

Ans. Operating System acts as a communication bridge (interface) between the user and computer hardware. The purpose of an operating system is to provide a platform on which a user can execute programs in a convenient and efficient manner. Here, I am going to mention 3 file managemnet functions that are controlled by operating system.

One of the most basic responsibilities are File Creation and deletion. File creation is very important because data can't be stored in an efficient manner unless arranged in some form of file structure.File deletion is also important because permanent storage would quickly fill up if files were not deleted and the space occupied by them reallocated to new files.

Operating systems need to be able to map files and folders to their physical location on permanent storage in order to be able to store and retrieve them. This will be recorded in some form of disk directory which varies according to the file system or systems that the operating system uses. The operating system will include a mechanism to locate the separate file segments where it has divided a file.

I think Backup is the most awesome OS functions in file management.Files represent a considerable investment in time, intellectual effort and often money as well, thus their loss can have a severe impact. Computer's permanent storage devices generally contain a number of mechanical devices which can fail, and the storage media itself may degrade. A function of operating systems is to obviate the risk of data loss by backing files up on additional secure and stable media in a redundant system.

Q3. Clearly distinguish between interrupt and trap. Give examples to illustrate your answer.

Ans. A trap is an exception in a user process. It's caused by division by zero or invalid memory access. It's also the usual way to invoke a kernel routine (a system call) because those run with a higher priority than user code. Handling is synchronous (so the user code is suspended and continues afterwards). In a sense they are "active" - most of the time, the code expects the trap to happen and relies on this fact. An interrupt is something generated by the hardware (devices like the hard disk, graphics card, I/O ports, etc). These are asynchronous (i.e. they don't happen at predictable places in the user code) or "passive" since the interrupt handler has to wait for them to happen eventually.

Let's say you write a program in which you declare a variable having divide by zero value then it is treated as a trap.Whenever you run this program it will throw same error at the same time.System call is a special version of trap in which a program asks os for its required service. In case of interrupt like an i/o error,the cpu is interrupted at random time and off course it is not the fault of our programmers.It is the hardware that brings them up.

Q4.Describe time-sharing systems and give an example to illustrate your answer.

Ans.Time-sharing is a technique which enables many people, located at various terminals, to use a particular computer system at the same time. Time-sharing or multitasking is a logical extension of multiprogramming. Processor's time which is shared among multiple users simultaneously is termed as time-sharing.The time sharing system provides the direct access to a large number of users where CPU time is divided among all the users on scheduled basis. The OS allocates a set of time to each user. When this time is expired, it passes control to the next user on the system. The time allowed is extremely small and the users are given the impression that they each have their own CPU and they are the sole owner of the CPU. The Multics & Unix operating systems are time sharing Operating Systems. Although, The term ‘Time Sharing’ is no longer commonly used, it has been replaced by ‘Multitasking System’.

Q5.Discuss the 4 categories in which work concerning information security and protection relating to Operating Systems are grouped.

Ans.The security systems covers the safety of their system resources (saved data, memory, disks, etc) across malignant alteration, illegal access, and disparity or inconsistency. The security gives a mechanism (authentication and encryption) to analyze the user to permit for using the system.protection deals with the access to the system resources. It determines that what files can be accessed or permeated by a special user. The protection of the system should confirm the approval of the process and users. Due to this, these licensed users and processes will care for the central processing unit, memory and alternative sources. The protection mechanism ought to provide a path for specifying the controls to be obligatory, beside how of implementing them. The main goal of protection is to prevent unauthorized access to a program; improve the reliability by detecting latent errors. In other words, the security requirements are different in which they are supposed to operate. Some of the common goals of security are Secrecy, Privacy, Authenticity, Integrity

  • Hardware is mainly vulnerable to interruption, either by theft or by vandalism. Physical security measures are used to prevent these attacks.
  • Software is also vulnerable to interruption, as it is very easy to delete. Backups are used to limit the damage caused by deletion. Modification or fabrication through alteration (e.g. by viruses) is a major problem, as it can be hard to spot quickly. Software is also vulnerable to interception through unauthorized copying. This problem is still largely unsolved.
  • Data is vulnerable in many ways. Interruption can occur through the simple destruction of data files. Interception can occur through unauthorized reading of data files, or more perniciously through unauthorized analysis and aggregation of data. Modification and fabrication are also obvious problems with potentially huge consequences.
  • Communications are vulnerable to all types of threats. Passive attacks take the form of eaves dropping and fail into two categories i.e. reading the contents of a message, or more subtly, analyzing patterns of to infer the nature of even secure messages. Passive attacks are hard to detect, so the emphasis is usually on prevention.

Related Solutions

Discuss how working memory is a limited capacity system. Discuss the three components of working memory...
Discuss how working memory is a limited capacity system. Discuss the three components of working memory (phonological loop, visuospatial sketch pad, and the central executive List examples of everyday tasks that may create overload problems.
What are the three main components of an operating system? And why?
What are the three main components of an operating system? And why?
In a computer system with multiple types of memory (such as RAM and ROM), how does...
In a computer system with multiple types of memory (such as RAM and ROM), how does the computer identify where memory is stored?
Explain Homeostasis as it applies to the Nervous System and how it acts to protects us...
Explain Homeostasis as it applies to the Nervous System and how it acts to protects us and keeps us safe especially the Reflex Arc.
Computer Architecture Theme: External Memory Very briefly discuss flash memory?
Computer Architecture Theme: External Memory Very briefly discuss flash memory?
Explain why an operating system can be viewed as a resource allocator. Direct memory access is...
Explain why an operating system can be viewed as a resource allocator. Direct memory access is used for high-speed I/O devices in order to avoid increasing the CPU’s execution load. a) How does the CPU interface with the device to coordinate the transfer? b) How does the CPU know when the memory operations are complete? c) The CPU is allowed to execute other programs while the DMA controller is transferring data. Does this process interfere with the execution of the...
what are the three main stages of memory, as well as the main processes that occur...
what are the three main stages of memory, as well as the main processes that occur within each stage. There are a number of different types of memory. how are they define and what are examples of them. What types of retrieval exist? What factors/strategies might improve the odds of successful retrieval? How can memory go wrong? What research has been done that supports the fact that these memory errors exist?
The operating system provides an interface between application programs and the computer hardware. Discuss the process...
The operating system provides an interface between application programs and the computer hardware. Discuss the process of the execution of any application program on the hardware using all managers of the operating system.
The operating system provides an interface between application programs and the computer hardware. Discuss the process...
The operating system provides an interface between application programs and the computer hardware. Discuss the process of the execution of any application program on the hardware using all managers of the operating system.
The operating system provides an interface between application programs and the computer hardware. Discuss the process...
The operating system provides an interface between application programs and the computer hardware. Discuss the process of the execution of any application program on the hardware using all managers of the operating system.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT