Process Management

Multiple programs are usually executed concurrently  as processes (running programs).  A bit of code from each process is executed at a time  on the processor so that all processes are continually executed until system shutdown or they have completed their task and exit.

The operating system  (OS) is programmed to start the execution of programs and manage their execution by putting them into different states.  Note that the programs can be application programs intended for the end user or system programs used for self management (e.g memory management)

Discussion:

  1. Virtual memory / page files used to simulate ram capacities larger than physical ram on the main system. (Falls under memory management).
  2. Blackboard  as Ram chiselled tablet as Secondary storage – How processes react when they must wait


Process States.

Running – The process is currently being executed

Ready  – A previously interrupted process that can be expected to resume.

Waiting/blocked  – a process that has been put to wait by the cpu or is waiting on a slower operation (I/O or request for data)

Process state

Attributions to media used in post

MrDrBob, CC BY-SA 3.0, via Wikimedia Commons

© 2022  Vedesh Kungebeharry. All rights reserved. 

Bootstrap  Process

This is the process of loading and executing the basic instructions to load the operating system to bring the system to a fully functional state  to be used for its intended purpose (initiated either by the user powering on the system or an autonomous system system e.g a network device , typically a router. See wake on lan)  .  For modern day systems, these instructions are usually hardcoded in the EEPROM.

Updates to this post

2023-09-15 – Added wake on LAN, and detailed to the initiation of the device.

© 2022  Vedesh Kungebeharry. All rights reserved. 

Form 5 Spreadsheet feedback groups 3 to 7 (18th Jan 2022)

See the video of feedback for all groups today (Groups 1 and 2 will be completed next class)

Group 1: https://youtu.be/5MTsBwK8x6w?t=329

Group 2: https://youtu.be/5MTsBwK8x6w?t=369

Group 3: https://youtu.be/5MTsBwK8x6w?t=445

Group 4: https://youtu.be/5MTsBwK8x6w?t=1208

Group 5: https://youtu.be/5MTsBwK8x6w?t=1629

Group 6: https://youtu.be/5MTsBwK8x6w?t=2307

Group 7: https://youtu.be/5MTsBwK8x6w?t=2889

Full Class Video:

© 2022  Vedesh Kungebeharry. All rights reserved. 

NCSE ICT – Scratch Programming – Creating interactive sprites

In this example, we create a sprite which asks for you to enter a subject mark and tells you the grade.

Grade ranges are shown below:

A76 to 100
B50 to 75
C40 to 49
DFail

We will be using a variable to store the users input.

Also, we will used some “if” blocks and logical operators to produce the grade.

See the blocks in the project below:

https://scratch.mit.edu/projects/629271195

Exercise

If someone enters an erroneous mark, e.g 1000 , the program dosen’t say anything to the user.

Copy or remix the project and Add blocks to say “you’ve entered an incorrect mark” if the user enters a mark higher than 100 or a mark less than 0.

(Hint: an IF block and an OR logical operator may be useful for solving this problem!)

© 2022  Vedesh Kungebeharry. All rights reserved. 

NCSE ICT – Scratch Programming – Animating Sprites using loops and the Broadcast system

See the examples below on how animation can be achieved by switching costumes using loops:

Sprite Animation 1 – Walk in place

Sprite Animation 2 Glide

Sprite Animation 3 – Walk and glide

Exercise

  1. After looking at the blocks in the project above, create a similar animation using a different sprite.
  2. Describe in your own words how the broadcast and receive blocks work.

© 2022  Vedesh Kungebeharry. All rights reserved.