Stampede

Stampede

Thursday, November 18, 2021

 

"Measure twice, cut once" is an old saying in carpentry. The expression also applies in IT regarding many disciplines, including Algorithmic choices upon data structures and adult beverages.

A data structure is a concept that forms an underlying rule set to understanding it; it organizes, retrieves, and stores data to be used more efficiently (Lysecky et al., 2015). A data structure is typically independent of hardware, operating systems, applications… even computer languages. Data structures such as arrays, stacks, queues, and trees are examples of various data structures.

Each data structure's underlying design has an additional advantage. The static design lends itself to a rule set to leverage the data stored within the data structure. This begotten ruleset is an algorithm. An algorithm allows for sorting, searching, insertion, deletion, and merging data within these data structures.  Returning to the adult beverage analogy, a cocktail shaker set is the data structure. Its design lends itself to manipulating alcohol through stirring, shaking, coiling, mixing various other liquids (data) into the desired output (cocktail).

Which data structure to utilize for a specific use case is dependent on its efficiency. In computer systems, space and time are easily measurable and are targeted by designers as jiggers and speed wells are by bartenders. Space complexity is the amount of memory used by the algorithm, including the input values, to execute it entirely and produce the result. Time complexity refers to a function describing the number of instructions required from the computer to finish the task. The combination of time complexity measurement and space complexity lends itself to an established baseline for comparing and contrasting options. The correct algorithm of a data structure lends itself to the desired result. Similarly, the bartender will usually consult a reference table to determine what tools in what sequence must be selected to manipulate various liquids into the desired result.

Do you like your Martini dry? Shaken or Stirred?



Friday, October 22, 2021

CPT307 Week 1 Interactive Assignment 2

 CPT307

Week 1 Interactive Assignment 2

Java in 3 minutes

Definition

Java is an object-oriented, platform independent, high-level language that is interpreted by a Java Virtual Machine (JVM) and gains efficiency through use of just-in-time (JIT) compilers. 

Core Principles

 Since Java is an object-oriented language, it is influenced by the four principles of all object-oriented languages. These principles are:

Encapsulation:
The hiding of data implementation by restricting access. 
Abstraction:
The development of classes, objects, and types in terms of their interfaces and functionality.
Inheritance:
The concept of creating a base class that has attributes shared by all objects. It becomes the parent of subclasses that further delineate objects by shared attributes.
Polymorphism:
The model of multiple methods having the same name. Two types of polymorphism exist in Java at the high level.
Run-time (overridding) determined by the assigned dynamic type of object.
Compile-time (overloading) determied by the complier.

     4 major principles of Object-Oriented Programming | Raymond Lewallen (codebetter.com)


Java Design 

When we write Java code, java compiler (javac) converts it to byte code. Javac is included in Java Development Kit (JDK). The byte code is then converted to machine-specific instructions via Java Virtual Machine (JVM). Machine-specific instructions are then run on the computer by Java Runtime Environment (JRE). JVM = Execution of a Java program. Because Java is a platform-independent language, it needs a virtual machine environment (interpreter) to run, which is provided by JVM. So, JVM is used to run Java code. Whenever we run a Java program either using JRE or JDK, it goes to JVM to be executed. JRE = JVM + Library Classes. JRE provides environment to run Java programs on our machines. JDK = JRE + Development Tools. JDK is used to develop and run Java code. It is used by developers.

    Check out: 

https://hakaneroztekin.medium.com/java-in-a-nutshell-a-quick-review-guide-of-important-topics-of-java-962cbf62b761#:~:text=Properties%20of%20Java%201%20Object%20oriented%3A%20Java%20is,fly%20to%20native%20machine%20instructions.%20More%20items...%20


Install

Be aware that Java and its components are version sensitive. Once installed, updates should be applied.

The link below will help with the install on various operating systems.

How do I install Java ?



Sunday, October 17, 2021

 This post is for the final assignment of CPT 304 Operating Systems Theory & Design.

Describe features of contemporary operating systems and their structures.

The operating system is built upon the model of components which are well delineated to meet the goals of the operating system. As such, different implementation models such as "batch, time sharing, single user, multiuser,distributed, real time, or general purpose" It follows that diffrent types of operating systems exist. For instance, a mainframe operating system z/OS, z/VSE, z/VM, z/TPF have their roots in the original System/360. The System/360 is a "pure"  OS, in it has very little application functionality built in. In contrast the AS/400 is a mid-system and its operating system with hooks into packaged software.  While it ran batch like a mainframe, it also leveraged user time sharing more effectively. Both before mentioned operating systems left the user interface to extended systems such as 3270 terminal emulator and 5250 respectively.  The mini-system or Personal computer came with an operating system that could accomplish batch jobs but was mainly designed around real-time user interaction, as such its user interfaces are a key component of the operating system. Today we have smart phones and the Internet of Things (IoT) that are smaller and run the scope of do-all device to just a specific task. Overall a kernel and its functions usually host memory management, process management, kernel-based protection, user-based security, storage management, file management and overarching components such as error detection, accounting and device management.

Discuss how operating systems enable processes to share and exchange information.

The Operating system enables the sharing and the exchange of information through memory sharing management and IPC (interprocess communication).  The exchange is "direct or indirect" (Silberschatz, 2014) . Shared memory in Posix and Message Passing in Windows are examples. The sharing of data is very critical for personal computers as it allows the kernel to support multiple users and utilities and applications to build upon other applications data.When computers over the network operate in pairs for a certain application, remote procedure calls or RPCs are often used to excahnge data over the network of from client app to server application installed on the same host.

Explain how main memory and virtual memory can solve memory management issues.

 The sharing of data is very critical for personal computers especially as it allows the kernel to support multiple users and utilities and applications to build upon other applications data. Virtual memory permits the mapping of logical address space to a smaller physical address space facilitating multiprogramming. It frees the programmer from the constraints of memory when developing applications. It permits “the sharing of system libraries and memory”artifacts (Silberschatz, 2014)  such as application data and program variables. Memory management functions solves physical problems with logical solutions, permits faster devlopment speed-to-market and application interoperability.

Explain how files, mass storage, and I/O are handled in a modern computer system.

Files, mass storage and I/O are functions of the operating systems file management component. "File management is one of the most visible components of an operating system." (Silberschatz, 2014) The file management system organizes operating system files and user data files for the computer's design parameters. It determines, to a large extent, the user's intuitive interaction with his data. It provides mass storage for backups for recovery, mirroring for high availability, striping for performance and replication for localized disaster recovery.  It manages I/O through buses such as ISA, EISA, SCSI, iSCSI, etc. It leverages broader platform technologies such as RAID arrays, NAS, SAN and even Cloud storage.

Outline the mechanisms necessary to control the access of programs or users to the resources defined by a computer system.

The Protection and Security components provide the necessary control. The protection system is focused on the internal processes withing an operating system, mainly its kernel. The protection system defines the rules that a user interaction, an application call and a kernel operation interoperate yet remain independent and isolated. 

The security system is mainly concerned with the external environment to the kernal such as applications, users, networks and other external resources such as USB drives. This system seeks to ensure the confidentaility, intergrity and Availability of the computer, its resources and data.

Recommend how you will use these concepts about operating systems theory in future courses and/or future jobs.

The fundamental understanding is the sub-system/function nature of an operating system and the defense-in-depth of the Security management function. Most functions exist across operating system and computer types yet their methodology of providing those services differ based on the design goal or purpose of the computer system, be it a mainframe, PC or IoT device.

By breaking down a computer operating system into core cross-platform components and drawing out the methods of interoperability between the components, such as IPC and shared management, one can troubleshoot the operating system more efficiently.