CPT 304: Operating Systems Theory Concept Map Summary Blog Post

CPT 304: Operating Systems Theory Concept Map Summary Blog Post


    During the time we spent in CPT 304 we reviewed a substantial amount of information spanning many aspects of Operating systems and their design. In order to start to understand operating systems we must first understand what operating systems do and what their purpose is. The three main purposes of an operating system are that it provides an environment for a computer user to execute programs on computer hardware in a convenient and efficient manner; it allocates the separate resources of the computer as needed to solve the problem given. The allocation should be as fair and efficient as possible; control Program that serves the function of supervision of the execution of user programs to prevent errors and improper use of the computer as well as manage the operation and control of I/O devices. 

Examples of Operating System Components are: 
  • Accounting
  • Error Detection
  • Protection Security
  • I/O Operations
  • Communications
  • Program Execution
  • Resource Allocation
  • File Systems 
  • User Interface.
As a process executes, it changes state, The state is referred to the Process State and could be one of the following: 
  • New: The process is being created
  • Running: Instructions are being executed
  • Waiting: the process is waiting for some event 
  • Ready: The process is waiting to be assigned to a processor
  • Terminated: The process has finished
Control Block is a data structure in the operating system kernel containing the information needed to manage a particular process. The PCB is "the manifestation of a process in an operating system".

The role of the PCBs is central in process management: they are accessed and/or modified by most OS utilities, including those involved with scheduling, memory and I/O resource access and performance monitoring. It can be said that the set of the PCBs defines the current state of the operating system. Data structuring for processes is often done in terms of PCBs.

A thread is a basic unit of CPU utilization; if a process is single-threaded that means it can only perform one task at a time whereas a multi threaded process can perform more than one task at a time. 
The critical section problem refers to the problem of how to ensure that at most one process is executing its critical section at a given time. One way to solve for that is Peterson's solution. Peterson's solution is restricted to two processes that alternate execution between their critical sections such as demonstrated below. 

When processes run they require memory to complete operation and terminate. A way that a process uses memory is it searches for available memory partitions called “holes”. An operating system can order the process queue according to a scheduling algorithm where memory is allocated to processes until, the memory requirements of the next process cannot be satisfied. If no available partition of memory is large enough for the process; the operating system can then wait until a large enough partition is available, or it can skip to the next process queue to see whether the smaller memory requirements of some other process can be met (Silberschatz, 2014). Memory blocks available comprise of a set of “holes” (memory partitions) of various sizes scattered throughout memory. When a process arrives and needs memory, the system searches the set for a hole that is large enough for this process if the hole is too large, it is split into two parts. One part is allocated to the arriving process; the other is returned to the set of holes. When a process terminates, it releases it’s a block of memory, which is then placed in the set of holes. If the new hole is adjacent to other holes, these adjacent holes are merged to form one larger hole. The system may need to check whether there are processes waiting for memory and whether this newly freed and recombined memory could satisfy the demands of any of the waiting process. This procedure is called the dynamic allocation problem, which is the process of how to satisfy a request of size n from a list of free holes. 



A file system is the most visible aspect of an operating system. It provides the mechanism for online storage and access to both data and programs of the operating system and all users of the computer system (Silberschatz, Galvin & Gagne, 2014). A file system consists of two parts, the collection of files and the directory structure. The directory structure is what organizes and provides information about the files in the system. Operations such as searching for a file, creating a file, deleting a file, listing a directory, renaming a file, and traversing the file system are a few things you can perform. There are different types of directories used to store files. 

Single-level directories are considered the simplest directory structure where all files are stored within the same directory; however, while it provides an easy to understand and support directory, this type of directory has limitations. If two or more users all use the same directory the directory will fill up with files quickly and users will also have to make sure to use their own unique file names as they cannot have multiple files that are named the same. 

A two-level directory structure has its own user file directory (UFD) for each user.  If there are other users, they will not be able to read, write, or delete a different user's files and when searching for files it will only search files within the user's own UFD. The disadvantages of a two-level directory however is that it makes user files completely independent which can have detrimental effects if users need to cooperate on a project or share a file as a two-level directory will not allow a user to access the files of another user.


One of the other main jobs of an operating system is I/O or input/output; the OS’s role is to manage and control I/O operations and I/O devices (Silberschatz, Galvin & Gagne, 2014). Examples of I/O devices are devices such as a mouse, keyboard, hard disk, monitor; many would have to use a type of device controller or driver that will allow the hardware to communicate to the computer with a software intermediary. 

In the principles of protection; protection refers to a mechanism for controlling the access of programs, processes, or users to the resources defined by a computer system. This mechanism must provide a means for specifying the controls to be imposed, together with a means of enforcement. One such mechanism would be an access matrix. An access matrix is an abstract model of protection where the rows represent domains, and the columns represent objects. Each entry in the matrix consists of a set of access rights. 

Protection is an internal problem; however security is considered both the computer system and the environment (people, buildings, businesses valuable objects, and threats) within which the system is used. Most methods of preventing or detecting security incidents include intrusion detection systems, antivirus software, auditing and logging of system events, monitoring of systems software changes, system-call monitoring, and firewalls. 

In Language-based protection; as systems have developed, protection systems have become more powerful, and also more specific and specialized. To refine protection further requires putting protection capabilities in the hands of individual programmers so that they can implement protection policies at the application level. This would allow them to protect resources that are known to the specific application but not to the more general operating system. The general goal is to provide three functions: Distribute capabilities safely and efficiently; specify the type of operations a process may execute on a resource and specify the order in which operations are performed on the resource. 

In Domain protection; a protection domain specifies the resources that a process may access; each domain defines a set of objects and the types of operations that may be invoked by each object. An access right is the ability to execute an operation on an object, a domain is defined as a set of object, pairs; some may be disjointed while others overlap.



Silberschatz, A., Galvin, P. B., & Gagne, G. (2014). Operating system concepts essentials (2nd ed.). Retrieved from https://redshelf.com/

Comments

Popular posts from this blog

CPT 307 Week 5 : Newbie to Newbie Blog Part One

Week 1 Interactive Assignment- Installing and setting up Java CPT 307