Pages

Thursday, December 1, 2022

Algorithms Designs & Data Structures. Which one suits your needs?

 

    Welcome back! Now that you have installed the latest version of Java Eclipse IDE console onto your PC, let us look at what is next. If you want to become the next high demanded programmer in the programming industry, you must utterly understand what a JavaScript is and for what is it used. 97% of websites around the world uses JavaScript and if you plan to specialize in front-end, back-end, or full-stack development to create dynamic and interactive web content like applications, gaming software, and browsers like the popular Google, Mozilla (Firefox) and Microsoft Edge.

    Now that you got a brief incite of JavaScript, the next is getting into the topic and understanding of how to apply algorithmic design & data structure techniques in developing structure program in Java programming language. Algorithm design are mathematical methods that are implemented into defines instructions that is used to be executed in a specific order to get the desired output. Algorithm instructions consist of search, sort, insert, upgrade, and delete if needed be. In other words, it tells software and hardware what to do. Now that’s where A data structure comes into play. It is a specialized format for organizing, processing, retrieving, and storing data. Data Structure is a way of collecting and organizing data in such a way that we can perform operations on these data in an effective way. Data Structures is about rendering data elements in terms of some relationship, for better organization and storage (Studytonight.com).

Are some algorithms and data structure designs better than others?

    The answer to that depends on the speed and size (storage capacity) of components inside a computer and peripherals attached (via port, wireless, or Bluetooth connections). A good algorithm is correct, but a great algorithm is both correct and efficient. The most efficient algorithm is one that takes the least amount of execution time and memory usage possible while still yielding a correct answer (Fox, Pamela).

Why one design would be used before another method would be used?

    There are several diverse types of data structures. Some of the popular types are Array, Binary Tree, Linear, Stack, and Linked List to name a few but each requires a certain amount of space for each data item it stores, a certain amount of time to perform a single essential operation, and a certain amount of programming effort to perform to the end user specified desires. Careful research, analyzing and most importantly the cost and benefits for each project/task is needed in order to determine which design is a better fit rather than just shooting from the hip of popularity.

    If I were to apply algorithmic design and data structure techniques in a developing structured program, I would first conduct the before mentioned research and analytic approach along with a suitable programming language/IDE that will be able to properly execute the algorithm instructions that I desire. Choosing the right design technique for the algorithm is also essential to process the program with efficiency. Selecting a proper design technique for algorithms is a complex but important task. The following is some of the main algorithm design techniques: Brute-force or exhaustive search, Randomized Algorithm, Divide and Conquer, Greedy Algorithms, Backtracking, Dynamic Programming Branch and Bound Algorithm. Each task has its own unique process that may be resolved from different approaches, you just need to find the right one that suits the need. 

Reference:

Studytonight.com Introduction to Data Structures and Algorithms. https://www.studytonight.com/data-structures/introduction-to-data-structures

 Fox, Pamela. Measuring an algorithm's efficiency. https://www.khanacademy.org/computing/ap-computer-science-principles/algorithms-101/evaluating-algorithms/a/measuring-an-algorithms-efficiency

 WLU Laurier (2019). Algorithm design techniques How is algorithm design applied? Online | 100% Online. Flexible, career-ready degrees. https://online.wlu.ca/news/2019/02/12/how-algorithm-design-applied

 

Thursday, November 3, 2022

Helpful guidance for latest Java and Eclipse IDE install

     Hello, my newly fellow Java programming IDE installers. Thinking of installing the best Java IDE application to learn some coding or perhaps you need it for a course you're taking? Well, look no further than from the Geeky Script himself. In his YouTube (click here) video, you will see firsthand approach on where to download Java JDK from, and step by step instructions with guidance on installing the latest version of Eclipse IDE 2022-09  application. The Eclipse application is compatible on three major operating system (OS); Mac, Linux, and Microsoft Windows. Aside from quick install, it is super easy to use and offers built-in features with tutorials on "how to" if you come across any dilemmas. You can start and complete your Hello World My Name Is project for that new course in a matter of minutes. If needed, the link below is accessible from any browser for you to get started. Have a great coding day.

“How to install Eclipse IDE 2022-09 on Windows 10/11 with JDK [2022 Update] Eclipse - JAVA 19”.

Link:

 https://www.youtube.com/watch?v=h7dR_9cnY8

Java JDK 19 installation guide video

How to Install Eclipse IDE in Windows 10? Step by Step Complete Guide

Monday, October 31, 2022

The Summary Blog Post


OS Theory Concept Map


 

 

 

 

 

 

OS Theory Concept Map

Week 5- Final Paper

 

 

William Warren-Kidd

The University of Arizona Global Campus

CPT 301 Computer Organization & Architecture

Instructor Cemal Tepe

October 31, 2022

 

 


 

Section 1:

 

When categorizing, describe and provide examples of the major functions of an operating system we must first the role of the operating system (OS). There is a wide array of things that links hardware and software to process efficiently within a computer. From the input instructions given by a user that is translated into computer language, to the memory, hardware and process that carries out those instructions. An OS primary functions are as followed: user interface, file management system, accounting, resource allocation, I/O operations, program execution, error detection, communication management, protection, and security. A user interface (UI) is a part of an OS that allows interaction between a user and the computer. UI can be a command line, batch line, and graphical user interface (Silberschatz,Galvin, & Gagne, 2014). A file management system is used for file maintenance (or management) operations. It is a type of software that manages data files in a computer system. A file management system has limited capabilities and is designed to manage individual or group files, such as special office documents and records (Techopedia 2020). Accounting function keeps track of how much a user uses. Resource allocation comes into play when multiple users are sharing multiple jobs resources that are executing simultaneously. Input-output (I/O) systems transfer information between computer main memory and the outside world (El-Ghazawi, T., Frieder, G. 2003). Program execution refers to the system ability to load and terminate a program into memory. Error detection allows the system to constantly detect and fix errors that arise whether from a program or hardware device. Communications may be implemented via shared memory, in which two or more processes read and write toa shared section of memory, or message passing, in which packets of information in predefined formats are moved between processes by the operating system (Silberschatz,Galvin, & Gagne, 2014). Finally, we have protection and security in which are considered today the most vital part of an OS. Not having the right or enough protection and security can lead to your data being vulnerable and captive to viral attacks.

Figure 1:

 

Section 2:

 

When an operating system brackets sections of a code and is in an execution mode running on the Central Processing Unit (CPU), it is knowns a being in process. A process also includes the process stack, which contains temporary data (such as function parameters, return addresses, and local variables), and a data section, which contains global variables (Silberschatz,Galvin, & Gagne, 2014).

As a process executes it changes it state thus being in a process state and it can be in either of the following category of states: “New” state which is a process being created like launching an application for the first time. The “Running” state which is instructions are being executed is when you are currently using the before mentioned application. The “Waiting” state is the process awaiting completion or receiving signal. An example would be using an instant messing application like Cisco Webex team and waiting for the recipient to reply. The “Ready” state is when the process is assigns a new instruction to the CPU like for instance opening an additional chat with another individual in that Webex app. Finally, the “Terminated” state finishes the total execution of the process or closing the application when completed.

When a process state is in memory it is known as a process control block (PCB). Each block of memory contains information about the process state, program counter, stack pointer, status of opened files, scheduling algorithms, etc. All these information is required and must be saved when the process is switched from one state to another. When the process makes a transition from one state to another, the operating system must update information in the process’s PCB (Geeksforgeeks.org 2020).

            A single process needs all the resources required for execution in a single-threaded architecture, including program counters, registers, memory, files, source code, a "stack which contains the execution history" (Tutorials Point, 2018). Although programming is easier in a single threaded motivation it in turn takes a heavy load on a system, using up several resources thus a disadvantage is that it takes a while. For a multi-threaded motivation and models the benefits outdo its counterpart single-threaded such as responsiveness, resource sharing, economy, and scalability. On a system with a single computing core, concurrency merely means that the execution of the threads will be interleaved over time, because the processing core can execute only one thread at a time. On a system with multiple cores, however, concurrency means that the threads can run in parallel, because the system can assign a separate thread to each core (Silberschatz,Galvin, & Gagne, 2014). When it comes to a single thread model, it requires communication with an OS in which it can only execute one request on thread at a time in a servlet service but will come to a stand still if a process is blocked. However, a multi thread model does not need to communicate with an OS and carries a subcategory of threads within such as: Many-to-One Model, One-to-One Model, and Many-to-Many Model. In addition, it runs more efficiently, and overall uses fewer resources as possible.

A classic problem in an OS that refers to the segment of code or the program which tries to access or modify the value of the variables in a shared resource is a critical-section problem. The critical section problem is used to design a protocol followed by a group of processes, so that when one process has entered its critical section, no other process is allowed to execute in its critical section (Monum, A.2022). To answer the question what software solution can be used to resolve a critical-section problem, then it must possess three requirements’ knowns as Mutual Exclusion, a Progress, and the last requirement is bounded waiting. The Peterson’s Solution is used to resolve a critical-section problem because it preserves all three requirements and holds two shared variables.

·         Mutual Exclusion is assured as only one process can access the critical section at any time.

·         Progress is also assured, as a process outside the critical section does not block other processes from entering the critical section.

·         Bounded Waiting is preserved as every process gets a fair chance.

 


 Figure 2:

Section 3:

For a computer to perform efficiently and exceptionally well, there needs to be and effective memory management in place. Many modern computers enable multi-programming, the capacity to run many programs concurrently, through concurrent and/or parallel processing to improve performance and maximize CPU consumption (Silberschatz, Galvin, & Gagne, 2014). Also, it is the operating systems (OS) obligation to ensure that memory gets managed correctly in the sense that processes that request memory are given it and that processes memory is protected from other processes. To increase performance and optimize CPU utilization, many modern computers facilitate multi-programming, the ability to execute multiple programs simultaneously, through concurrent and parallel processing (Silberschatz, Galvin, & Gagne, 2014). As professor Tepe stated: some objectives of memory management in an operating system are reloadability, OS manages memory and processes will be moved around in memory, memory management must convert logical addresses into a physical address, first address is stored as virtual address zero, static relocation, and dynamic relocation.

Difference between Logical Address and Physical Address in Operating System

No

Logical Address

Physical Address

1

Logical address is rendered by CPU.

Physical address is like a location that is present in the main memory.

2

It is a collection of all logical addresses rendered by the CPU.

It is a collection of all physical addresses mapped to the connected logical addresses.

3

Logical address of the program is visible to the users.

We cannot view the physical address of the program.

4

Logical address is generated by the CPU.

Physical address is computed by MMU.

5

We can easily utilize the logical address to access the physical address.

We can use the physical address indirectly.

Figure 3:




 Figure 4:

Section 4:

The file management system is a logical storage unit that holds a collection of related information and another important part of an OS. Hardware components such as hard drives, flash drives, optical drives (CD/DVD) and magnetic tapes. For most users, the file system is the most visible aspect of an OS. It provides the mechanism for on-line storage of and access to both data and programs of the operating system and all the users of the computer system. The file system consists of two distinct parts: a collection of files, each storing related data, and a directory structure, which organizes and provides information about all the files in the system (Silberschatz, Galvin, & Gagne, 2014).

A file is a logical unit, and it helps in separating data and places it in the smallest allocation of logical secondary storage, and files can store several types of data including numeric, character, and binary. A file management system's tracking component is key to the creation and management of this system, where documents containing various stages of processing are shared and interchanged on an ongoing basis. It consists of a straightforward interface where stored files are displayed. It allows the user to browse, move, and sort them according to different criteria such as date of last modification, date of creation, file type/format, size, etc. (Techopedia, 2020).

            File system consist of multiple concepts. From the course text ( Operating system concepts essentials (2nd ed.). the list that falls under the file concept is as followed:

·         File Attributes- Name, Identifier, Type, Location, Size, Protection, Time, Date, and user identification.

·         File Operations- Creating a file, writing a file, reading a file, Repositioning within a file, deleting a file, and truncating a file.

·         File pointer- the system must track the last read–write location as a current-file-position pointer.

·         File-open count- tracks the number of opens, closes, and reaches zero on the last close.

·         Disk location of the file- the system must track the last read–write location as a current-file-position pointer.

·         Access rights- The information needed to locate the file on disk is kept in memory so that the system does not have to read it from disk foreach operation.

Today’s modern OS stores their data in the cloud and no longer physically on a PC. In the past and in some cases today, internal storage on a computer is referred to hard disk and memory. On disk, the file system may contain information about how to boot an operating system stored there, the total number of blocks, the number and location of free blocks, the directory structure, and individual files (Silberschatz, Galvin, & Gagne, 2014). In-memory keeps data that is stored in the Random Access Memory (RAM) on a computer. It is faster to retrieve data from in-memory as supposed to on-disk due to lesser usage or CPU instructions however, the disadvantage to in-memory is that it is more volatile and subject to data loss if the computer loses power or bluescreen.

Under the file system implantation structure there sits five common schemes that defines the logical structure of aa directory. The root directory also known as is the single-level directory is the simplest has one structured directory and users are restricted from creating any subdirectories. The disadvantage to this directory is a user cannot duplicate the same file name that is already on the system. The second scheme is a two-level directory structure which allows users to create directories within the root directory thus allowing each user to keep their data separately within their own director. The benefit of this structure gives access to use the same name for files, only under different directories. Next, we have the third scheme that is the most common directory, a tree structured directory structure. Under this structure each directory has a parent directory separate from the root directory. Users have access to fetch shared files from one another, but a disadvantage is each user will have to go through two or more directories to obtain the shared data. The number four scheme an acyclic-graph directory structure which allows directories to share subdirectories and files. Similar file or subdirectory may be in two different directories. The acyclic graph is a natural generalization of the tree-structured directory scheme (Silberschatz, Galvin, & Gagne, 2014). A benefit of and acyclic graph is that it offers more flexibility than a common directory. And the last scheme is known as the general graph directory. In this type of directory, within a directory we can create cycle of the directory where we can derive the various directory with the help of more than one parent directory (Tutorialandexamples.com, 2020).

           

            There are several types of input and output (I/O) devices that is used as a communication link that is connected to computers. Not having the right software and or driver to work the device came be very catastrophic. Input devices ranging from keyboard, mouse, Dictaphones, webcam, microphones, printers, and various scanners. Output devices such as monitor display, projectors, speaker/headphones, printers, and the old school plotters also uses I/O connections that is built onto system boards. A controller is used to operate some of the common built-in like system bus, PCI bus, expansion buss, SCSI, and PCI express slot. Much of these hardware devices communicate through external hard-wired connection like USB ports, RCA, RJ45 and serial ports. But there is always some form of conflict between hardware and software whether the device is too old, or the software is outdated nor compatible. Never-the-less that is where drivers for respected OS version comes into play and hopefully resolves the issue. So, while it may seem difficult to integrate new devices with an older system, device drivers help resolve this issue by providing a standardized interface between devices and the I/O subsystem, and system calls provide an interface between applications and the operating system (Silberschatz, Galvin, & Gagne, 2014). Since 1994 communication through advance technology grew in the wireless and Bluetooth industry, freeing up unwanted wires/cabling that drew clutter. As great as a wireless connection sound, the communication speed between wired and wireless is not even just yet. The external device will send information that is stored in a memory unit this information is transferred. The CPU will process the information. Data transfer that happens between the CPU and I/O devices can happen in several diverse ways. The Programmed I/O, Interrupt- initiated I/O and Direct memory access (DMA). "In this case, the device-control registers are mapped into the address space of the processor. The CPU executes I/O requests using the standard data-transfer instructions to read and write the device-control registers at their mapped locations in physical memory (Silberschatz, Galvin, & Gagne, 2014).

Figure 4:

Section 5:

            Let’s face it, computer hijacking through viral attack such as ransomware, trojans or the often-used spyware attack is on an incredibly high increase over the past decade. The latest technology used to protect OS has been a blessing and sometimes a curse due to hackers’ manipulation of the software. The operating system provides a mechanism for deploying

both of these kinds of protection. In other words, the operating system solves the protection

problem—that each object (such as a file) is accessed correctly, and only by processes (or users)

with specific access rights to that object (Silberschatz, Galvin, & Gagne, 2014). Protection of a computers data has doubled through built-in OS security and third-party software application. Regardless there are goals and principles to protect modern PC. The goal of an OS it to protect, prevent, and restrict any unauthorized external violators from to gain access to system data information. The role of protection in a computer system is to provide a mechanism for the enforcement of the policies governing resource use. These policies can be established in a variety of ways. Some are fixed in the design of the system, while others are formulated by the management of a system. Still the individual users define others to protect their own files and programs. A protection system must have the flexibility to enforce a variety of policies (Silberschatz, Galvin, & Gagne, 2014). There are two enactment of principle that is set into place on a domain level. First the principle of least privileges gives users, programs, and system a certain amount of access that will allow a task to be completed. Second from of domain protection that is to the before mention least privilege is the principle of need-to-know privilege which limits any damage a compromised process can do in a system. Language-based protection offers the following advantages: Specification of protection in a programming language allows the high-level description of policies for the allocation and use of resources. Language implementation can provide software for protection enforcement when automatic hardware supported checking is unavailable. Interpret protection specifications to generate calls on whatever protection system is provided by the hardware and the operating system (Chandra, S., 2006). The security model and protection state of a computing system is the access matrix. It uses specific access rights for each process running on a domain and for each object on that domain. The access matrix is a general model of protection that provides a mechanism for protection without imposing a particular protection policy on the system or its users (Silberschatz, Galvin, & Gagne, 2014). There are four methods to implement access matrix and goes as followed:

  • Global Table- It is the most basic access matrix implementation.
  • Access Lists for Objects- Each column in the access matrix can be implemented as an access list for one object.
  • Capability Lists for Domains- is a list of objects together with the operations allowed on those objects.
  • Lock-Key Mechanism- A process executing in domain can access an object only if that domain has a key that matches one of the locks of the object.

The security and protection used to protect programs, systems and networks from threats has evolved significantly. Cyber security experts are the most demanded in the IT field today to combat cybercriminal both foreign and domestic. Corporations and institution however still rely on their own expert staff to protect valued data from harm. By applying everyday maintenance and perform system check list like viral scanning can go a long way. The most common techniques used to protect operating systems include the use of antivirus software and other endpoint protection measures, regular OS patch updates, a firewall for monitoring network traffic, and enforcement of secure access through least privileges and user controls (Hysolate.com).

 





Figure 5:

 

Reference:

 

 

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

Techopedia (2020). File Management System. https://www.techopedia.com/definition/1832/file-management-system#:~:text=A%20file%20management%20system%20is,special%20office%20documents%20and%20records.

 

El-Ghazawi, T., Frieder, G. (2003). Input-output operations. https://dl.acm.org/doi/abs/10.5555/1074100.1074484#:~:text=Input%2Doutput%20(I%2FO,sequence%20of%20I%2FO%20operations.

 

Geeksforgeeks.org 2020. Process Table and Process Control Block (PCB). https://www.geeksforgeeks.org/process-table-and-process-control-block-pcb/

 

Tutorials Point, (2018). Single-threaded and Multi-threaded Processes. Single-threaded and Multi-threaded Processes. https://www.tutorialspoint.com/single-threaded-and-multi-threaded-processes

 

Monum, A., (2022). What is the critical section problem in operating systems?. https://www.educative.io/answers/what-is-the-critical-section-problem-in-operating-systems

 

Techopedia, (2020). File Management System. What Does File Management System Mean? https://www.techopedia.com/definition/1832/file-management-system#:~:text=A%20file%20management%20system%20is,special%20office%20documents%20and%20records.

 

 

Tutorialandexamples.com, 2020. Directory Structure in Operating System. https://www.tutorialandexample.com/directory-structure-in-operating-system

 

Chandra, S., (2006). Language-Based Protection. https://surendar.chandrabrown.org/teach/spr06/cse30341/Lectures/Lecture31.pdf

 

Hysolate.com. Understanding OS Security: Threats and Security Controls. https://www.hysolate.com/learn/sandboxing/understanding-os-security-threats-and-security-controls/#:~:text=The%20most%20common%20techniques%20used,least%20privileges%20and%20user%20controls.

 

Saturday, June 4, 2022

Tech Topic Connection


I chose the topic of network security based upon the path of my career thus far and the steps that I have taken both at home and work to prevent viral attacks from taking place under my watch. Reading through the course textbook zyBooks: Fundamentals of Information Technology & Literacy home, helped me gain more understanding about rules/guidelines and how to apply better network security concepts from the simple things I forgot and completely overlooked. “These rules can be customized by the user. In addition, some network routers have hardware-based firewalls that block connections that do not initiate within the network (Vahid, F., 2019).” Today, network security is one of the most important topics that for every business organization and home PC. Not having the right protection software i.e., antivirus, phishing and spam blockers can lead to devastation with no recovery in sight. Technology must continuously evolve to keep up with the changing and new demands needed in the workforce. Computers science and technology of past cannot exist in today’s world in which cyber criminals looks to gain and take command of vital information from organizations and/or wealthy individuals.

Computer operating systems over the years too had no other option but to evolve due constant failed security patches as well used to combat hacking of software application failures. The most common computer operating system Microsoft Windows is currently at its latest Windows 11 OS while MAC is not far behind with its MACOS 12 Monterey. With the new OS, computer manufactures like Apple, HP, Lenovo and Dell looks for better implementation of secured hardware from processor and chip set from leading developers such as Intel and AMD. With a faster performance from an array of chips along with Solid State Drive (SSD) and increasing gigabyte of ram, the software application used in as a defense against network intrusion can quickly asset and quarantine a threat.

Programming languages like Python is replacing the old fashion way of configuring network devices used to aid network security. The use of Command Line Interface (CLI) is fading away and with placing languages like Python thus giving developers better control over multiple devices. Other languages like JavaScript, PHP and SQL can be used to get steps ahead, fend of intruders while maintaining and retrieving vital data.

The common goal of protecting data against cybersecurity threats is often shared by both network security and application software. The network security software industry and companies who specialize in the field has seen a vast growth of old and new customers flocking their sites to purchase, build and event upgrade their current system protection to prevent vital data from reaching the hands of those who look to exploit them for money or the latest crave bitcoin. Some experts say because everyone makes mistakes, it is important to find the right network security software to protect their data. “Security and risks in reputation, especially for businesses with sensitive data which have been a concern after regulations of self-isolation pushed people to work at home and organizations had to adapt their business models to accommodate a remarkable increase of network activities. Many hackers have consistently redirected their activities from attacking business toward activities that could reach consumers or employees at their homes through platforms, e.g., Netflix or Zoom (Wang, L., Alexander, C., 2021).”

Network security relates to database and database management because information stored in a database is very valuable and at many time, a very sensitive commodity to an organization and if any loss or corruption to data, daily operation would be immediately affected. A poor network security structure can create a “Weak defense system can also be divided by vulnerability, inaccurate identification. The external attacks are the main source of database security threats, and they cause the most serious damage. Further, there are many secondary categories, including spam, malicious traffic, SQL injection, illegal access, malware, DDoS attacks, bypass and physical attacks (Wang, Y., Xi, J., Cheng, T., 2021).”


 

Reference:

Vahid, F., & Lysecky, S., (2019). Computing technology for all. https://learn.zybooks.com/zybook/TEC101:_Fundamentals_of_Information_Technology_&_Literacy_(TED2219A)/chapter/6/section/8

Wang, L., Alexander, C., (2021). Cyber security during the COVID-19 pandemic. AIMS Electronics and Electrical Engineering, 5(2): 146–157. DOI: 10.3934/electreng.2021008. https://www.aimspress.com/aimspress-data/electreng/2021/2/PDF/electroneng-05-02-008.pdf

Wang, Y., Xi, J., Cheng, T., (2021). The Overview of Database Security Threats’ Solutions: Traditional and Machine Learning. https://www.scirp.org/journal/paperinformation.aspx?paperid=106429