Week 08 – Computer software & Python programming

Lesson Overview

Topic: Computer Software

Activities & Due Dates[Activity 5] Python Programming


Lesson Objectives

Students will be able to

  • Explain how software and hardware interact
  • Explain how software communicates with users and hardware
  • List the types of computer software
  • Explain the functions of operating systems
  • Describe the types of application software

Opening – Update the local time on you Raspberry Pi

•Install ntpdate application

Install ntpdate application

•Restart the software

Restart Raspberry Pi

Content 1 – Software vs Hardware

  • Computer Instructions or data, anything that can be stored electronically is Software.
  • Hardware is one that is tangible. The storage devices (Hard disk, CD’s etc.,), mouse, keyboard CPU and display devices (Monitor) are Hardware.
  • For example: There is a problem in the Software implies – Problem with program or data
  • Computer Software
    • Computer hardware is useless without software.
    • Software is the set of instructions and associated data that direct the computer to do a task.
    • Software can be divided into two categories:
      • System software:  helps the computer to carry out its basic operating tasks.
        • Operating Systems, device drivers
      • Application software helps the user carry out a variety of tasks.
        • Microsoft Office, Games

Content 2 – Types of software

Types of software

Content 3 – System software

  • Manages the fundamental operations of the computer, such as
    • loading programs and data into memory
    • executing programs
    • saving data to disks
    • displaying information on the monitor and
    • transmitting data through a port to a  peripheral device.
  • System software:
    • operating systems
    • Utilities
    • device drivers
    • Compiler
    • Loader
    • linker

Content 4 – Operating System

  • Operating System is a software, which makes a computer to actually work.
  • It is the software the enables all the programs we use.
  • The OS organizes and controls the hardware.
  • OS acts as an interface between the application programs and the machine hardware.
  • Examples: Windows, Linux, Unix and Mac OS, etc.,
The shell of the operating system
  • What does the operating system do for me?
    • Communicate with user, receive and execute commands, show error messages.
    • Manage allocation of memory, processor time and other resources.
    • Collect input from keyboard, mouse, and provide data to running programs.
    • Convey program output to screen, printer, or other output device.
    • Access data from secondary storage.
    • Write data to secondary storage.
    • Maintains security (checks user-name , password, virus infection)
Operating system services

Activity 1 – Find running processes on Windows

•Cmd on search bar or find Command Prompt in Windows Systems Menu

Cmd tasklist

Run a target process. E.g. notepad.exe

Find the process. Using tasklist

Find notepad application

Kill the process through command

Kill application

Content 5 – Why is Booting Required ?

  • Hardware doesn’t know where the operating system resides and how to load it.
  • Need a special program to do this job – Bootstrap loader.
    • E.g. BIOS – Boot Input Output System.
  • Bootstrap loader locates the kernel, loads it into main memory and starts its execution.
  • In some systems, a simple bootstrap loader fetches a more complex boot program from disk, which in turn loads the kernel.
  • BIOS
    • Basic Input/Output System
    • Contains information about the machine’s configuration. 
    • Eg. IDE controller, NIC
    • PC knows which device to boot from via BIOS
    • PC tries to run code from the MBR, ie. 1st 512 bytes, of the disk
    • MBR tells the PC to load the boot loader from certain disk partition
    • The boot loader loads the kernel
BIOS Interaction

Content 6 – Boot procedure

  • On finding a bootable device, the BIOS loads and executes its boot sector. In the case of a hard drive, this is referred to as the master boot record (MBR).
  • The MBR loads a boot sector in the hard drive and executes it.
  • The boot sector is often operating system specific, however in most operating systems its main function is to load and execute a kernel, which continues startup.
  • Then execute the processes written in the boot scripts

Activity 2 – List running process on Raspberry Pi

•A process is an instance of a running program

PS command

•To see every process on the system

ps aux command

•Move to /etc/init.d directory and see the list of files, compare!

process list on init.d

•Why? Because Pi runs …

Activity 3 – Make your Pi to an Office Machine

•Move to .config directory (hidden folder, why?)

Move config directory

•Create folders lxsession/LXDE-pi

create a folder for lxsession

•Create audostartfile, then Ctrl+X, Y to save the file and exit

register office applications on autostart

•Reboot and see

reboot

Closing – Revert your Pi to a regular computer

•Open terminal and rename the autosave to autostart.del

Revert Pi to a computer