Document Details

HotAllegory8549

Uploaded by HotAllegory8549

2024

Mr. A. Gatt

Tags

operating systems system software user interface computer science

Summary

These notes from Mr. A. Gatt cover the fundamentals of operating systems. Topics include the software types, general-purpose OS, user interfaces, process and file management, and other system utilities. These notes are intended to help students understand computer systems.

Full Transcript

Do you remember the below? A computer system that you use daily contains both system software and application software. The two software types are application software and system software. 1) Application Software (definition) – Software t h a t i s made to carry out a specific task or num...

Do you remember the below? A computer system that you use daily contains both system software and application software. The two software types are application software and system software. 1) Application Software (definition) – Software t h a t i s made to carry out a specific task or number of related tasks. Application software includes: a. Word processing software programs such as Microsoft Office Word 2013 b. Spreadsheet Software programs such as Microsoft Office Excel 2013 2) System Software (definition) – Software that is made to allow the computer hardware to work together and allows the user to install and run application software. Examples include: A. Microsoft Windows 11 D. Macintosh OS 15.1 Sequoia E. Linux Mint 22 F. IOS v 18 G. Google Android 15 (Vanilla Ice cream) Page 1 of 21 Mr. A. Gatt - Operating Systems notes (2024-2025) Computer systems are useless without an Operating System (OS). So, a laptop, a smartphone or a desktop without an OS is USELESS, as it is like having a car without an engine. An OS is software that is responsible for the following: 1) Provides a User Interface 2) File Management 3) Process Management 4) Memory Management 5) Input & Output (device) Management A general-purpose OS is software that allows a computer to run many different applications at the same time and they can be used on different hardware setups. Examples here include Windows, macOS and Linux operating systems. A game, a web browser, a word processor and a spreadsheet and more can be executed at the same point in time. A general-purpose OS such as Windows can run on different hardware configurations such as desktop computer and servers. An embedded OS is system software that controls a specific device or machine. Unlike the operating system on your computer or phone, which can run several apps(applications), an embedded OS is designed to manage one task or a group of related tasks. Page 2 of 21 Mr. A. Gatt - Operating Systems notes (2024-2025) For example: The software in a microwave that lets you set the timer and heating level. The system inside a washing machine that controls the wash cycles. The program running on a smart thermostat that adjusts the temperature automatically. Anti-lock Braking System (ABS): An embedded system controls the ABS to prevent the wheels from locking up during sudden braking, helping you maintain control of the car. Infotainment System: Embedded devices power the touchscreen displays, navigation systems, music, and Bluetooth connectivity, making your driving experience more enjoyable. Advanced Driver Assistance Systems (ADAS): Features like lane departure warnings and automatic emergency braking rely on embedded systems to monitor the road and assist the driver. General Purpose Operating System Embedded Operating System Designed to manage a wide range of Tailor made for specific functions Tasks within larger systems. Require powerful hardware (more Require less powerful hardware (less memory, a multi-core CPU and more Memory (RAM), a single core CPU and storage capacity) to support less storage capacity) compared with multi-tasking. General purpose operating systems. Page 3 of 21 Mr. A. Gatt - Operating Systems notes (2024-2025) Not so efficient in hardware use when Very efficient in hardware use when compared with embedded operating compared with general purpose systems. operating systems. Supports many programming languages Designed for specialised devices often allowing for flexible programming prioritising low power consumption. development. Used in desktop computers, laptops, Prioritise and real-time processing. servers. Prioritise unique hardware setups / Configurations. A single task operating system can only execute one task at one point in time. Old operating systems worked in this way however operating systems nowadays (see historical OS evolution) are multi-tasking as they are even more complex. A multitasking operating system on the other hand can execute or run multiple processes / tasks at one point in time. What is the difference between a single and a multi-tasking OS? A single task Operating System, such as Microsoft Disk Operating System (MS- DOS) is an OS that can run only one program at one point in time, unlike a multi- tasking OS such as Windows 10 that can run many programs at the same point in time. Page 4 of 21 Mr. A. Gatt - Operating Systems notes (2024-2025) An Operating System manages the computer’s / devices resources which are CPU, memory, storage, and I/O devices. a. CPU management / Process Management → The operating system ensures that each program (or process) in a multiprogramming environment receives an acceptable share of CPU processing time. b. Memory Management / RAM management → The OS oversees allocating (giving) and (removing) de-allocating memory to programs in a multi- programming environment. c. Storage management / Management of Files → This is done by making use of a file system that is used by the user and the computer itself to create files and folders and stores them on a storage device. Using a file system a user can organise like files into folders. As an example, all python programming can be stored in a folder called python programming. Page 5 of 21 Mr. A. Gatt - Operating Systems notes (2024-2025) d. I/O Devices management - Hardware devices can run at the best of their capabilities, and this is done by installing dedicated programs called device drivers. A device driver is a dedicated program that allows an Operating system and a SPECIFIC hardware component (such as the CPU) to communicate. 2) An operating system such as Windows 11 establishes / provides a user-interface. 1) Provides a User Interface The user interface is needed so the user can open files and folders, programs and make use of the computer. 2) File Management Needed so a user can install programs and create files and folders. By means of file management, a user can save any progress made while using a program. Page 6 of 21 Mr. A. Gatt - Operating Systems notes (2024-2025) 3) Process Management The operating system makes sure that enough CPU time (see time slices) is fairly and efficiently given to all the processes that need the CPU’s attention. What is the difference between a process and a program? Do note that a Program is several lines of code that solves a specific task. A program is static as it is many lines of code and data that are found on a secondary storage device. A process is a program that is found in the computer’s memory so it can be executed by the CPU. A process is created by the Operating System to execute a program using Computer resources like CPU and memory. 4) Memory Management The operating system makes sure that enough memory is allocated (given) to each process. When the program is closed the memory is de-allocated from the process/es that used it, and it is given back to the system to be used by other processes. 5) Input & Output (device) Management The OS accurately manages the flow of data to and from external peripherals such as keyboards, mice, and monitors. Thus, user commands are accurately interpreted by the system. - A user-interface (UI) is a group of elements such as menus, icons and buttons that allow a user to communicate with a computer. As the Operating system can manage the system’s resources as seen above, application software can be installed and run only after the OS is installed. Page 7 of 21 Mr. A. Gatt - Operating Systems notes (2024-2025) 1) Command Line Interface (CLI) 2) Graphical User Interface (GUI) 3) Natural User Interface (NUI) Command Line Interface is a text-based interface that allows users to interact with a computer system by typing specific commands. 1. A user must type commands in a console or terminal and so it requires knowledge of commands and their syntax. 2. CLI’s are used for system administration, programming, and managing servers. 3. CLI’s use much less resources compared to graphical user interfaces. Example ➔ Windows command prompt. A Graphical User Interface is a visual interface that allows users to interact with a system through graphical elements such as windows, buttons, icons, and menus. 1. A GUI is user-friendly and easy to navigate. 2. A GUI supports the use of a mouse, touchpad, or touchscreen. 3. A GUI requires more system resources than CLI. 4. A GUI is intuitive for non-technical users. GUI Examples ➔ Windows OS, macOS, web browsers A Natural User Interface (NUI) enables users to interact with a system through intuitive, natural actions like gestures, voice commands, touch, and body movements. Page 8 of 21 Mr. A. Gatt - Operating Systems notes (2024-2025) 1. Designed to feel natural and imitate real-world interactions. 2. A NUI uses technologies like speech recognition, gesture detection, and motion sensing. 3. A NUI needs advanced computer hardware and software capabilities. 4. A NUI enhances accessibility for users with disabilities. NUI Examples → Touchscreens on smartphones, voice-controlled digital assistants like Alexa or Siri, and motion-based gaming systems like Microsoft Kinect Aspect Command Line Graphical User Natural User Interface (CLI) Interface (GUI) Interface (NUI) User o A user needs to o Intuitive and o Feels natural and Experience know commands easy to use. immersive. and their syntax. o Accessible for o Minimal learning o Ideal for beginners and curve for users. Vs advanced users general users. o Excellent for users and developers o Supports with special needs. multitasking with visual feedback. Page 9 of 21 Mr. A. Gatt - Operating Systems notes (2024-2025) Limitations o Ideal for complex o May limit o Not ideal for in tasks. advanced, low- technical tasks. Functionality o Limited to level control o Requires textual o Can be slower for specialized hardware input/output. complex tasks (e.g., microphones, o Not suitable for compared to CLI. sensors). visual tasks (e.g., o May struggle with editing images) strange commands or gestures. System Requires minimal Requires more - Demands Resources CPU power and resources (e.g. significant hardware Needed memory. RAM, CPU, and a resources such as GPU). sensors, and - Demands a cameras. graphical user - Requires powerful environment. processing for AI and recognition. In the next section of this topic, you shall learn about some of the different components of the operating system that are found in MATSEC o-level syllabus. A software mechanism that specifies the way an operating system manages, organises, and accesses files and folders on storage devices. A few number filing systems are available: 1. FAT32 2. NTFS 3. APFD 4. EXT4 The following notes in “” are purely for your understanding of the topic and will NOT be examined. Page 10 of 21 Mr. A. Gatt - Operating Systems notes (2024-2025) “But what is a file system in practice and why is it used? A user can choose a file system when setting up a storage device (such as a hard disk drive or an SSD) or when partitioning it. Figure 1- Showing 5 partitions. The choice of file system depends on the operating system that is being used and any technical needs that the user requires. Here are some considerations: 1. Operating System Compatibility: Windows: a. Available file systems NTFS (New Technology File System) and exFAT (extended File Allocation table). NTFS is the default file system and offers better security and features like compression and encryption. b. exFAT is used when cross-platform compatibility / software compatibility is a priority. macOS: a. APFS (Apple File System) is recommended for modern macOS systems. APFS offers file encryption and compression. Linux: a. EXT4 (fourth extended file system) is often used due to its stability and performance. 2. Use Case Requirements / For what do I need it? System Performance and Stability: If these are priorities, EXT4 on Linux might be preferred. *Other considerations need to be analysed* Page 11 of 21 Mr. A. Gatt - Operating Systems notes (2024-2025) Security and Encryption: NTFS or APFS might be chosen for their encryption capabilities. Cross-Platform Compatibility: FAT32 or exFAT are suitable for sharing files across different operating systems.” CPU process scheduling is a critical function of an operating system. CPU process scheduling manages the allocation of CPU time in time slices between multiple processes that are competing for CPU execution. Round Robin Scheduling – In a specific order, each process in a multi-programming environment is given a fixed amount of time, or a time slice to be executed and each process receives an equal share of CPU time. Priority Scheduling – The operating system can execute processes based on a set priority and so tasks with a higher priority are executed before tasks with a lower priority. Page 12 of 21 Mr. A. Gatt - Operating Systems notes (2024-2025) Round Robin vs Priority Scheduling Feature Round Robin Priority Scheduling Order of Execution In a specific order, based Priority based on time slices Shows Preemption? Always pre-emptive Can be both pre-emptive meaning a CPU can and non-preemptive interrupt a process after a time slice expires Time allocation fairness Each process is given the Does not ensure fairness same time-slice, so in processes. fairness is achieved. Applications / Use cases Suitable for time-sharing Ideal for systems with Systems i.e. in a multi- critical tasks. programming environment or via a multi-user environment. File and folder creation and naming can be done both by the user and the operating system. Due to the filing system many details of a particular file are stored, some of which include: File Name - Groups files according to file name. Grouping can be done both in ascending order of file name and in descending order of file name. Date Modified – Specifies the date when the file was edited last. File Type – Groups files by category, for example presentation files (.ppt and.pptx files), word processed files (.doc or.docx files), spreadsheet files, executable files (.exe) and more. File Size – Groups files according to size. Grouping can be done both in ascending order of size and in descending order of size. Date Created – Files are sorted in order of creation. Page 13 of 21 Mr. A. Gatt - Operating Systems notes (2024-2025) Rapid data access - By means of a file system a user can insert similar files into folders. File organisation is increased in this way. For example, music files can be stored in a folder and images of a vacation can be stored in their own specific folder. Data organisation - By means of a filing system files can be found rapidly by a user as each file CAN grouped into its own folder thus increasing performance. Compatibility with applications – File systems provide a standard method for applications to read and write data. Scalability - File systems can easily scale with a growing amount of data that is found across multiple storage devices. Virtual memory is an important memory management technique used by operating systems to create an illusion to the system of a larger main memory / RAM than what is physically available in the system. Memory Extension - Virtual Memory allows applications to use more memory than is physically installed by using a portion of the hard disk space as an extension of RAM (Random Access Memory). So larger applications can be opened or more applications can be opened. A device driver is a hardware specific program that allows a hardware device to run at its peak performance. This peak performance of the device is achieved as the device driver allows a specific hardware component, such as a CPU or a motherboard to communicate seamlessly with the operating system. Page 14 of 21 Mr. A. Gatt - Operating Systems notes (2024-2025) The Central Processing Unit processes data much faster than all the other devices. Thus, the CPU can send data to devices in a much faster way than each of these devices can process it. If a CPU just sends this data to a specific device, much of it will be lost as devices cannot store all the data that the CPU sends. Buffers Devices, CPU (found in such as a RAM) printer A buffer is a small portion of RAM (given in Megabytes) that acts as a store for data that will be sent to the device it belongs to when the device is ready. 1) Hard disks and 2) Printers are two devices which make use of buffers. Page 15 of 21 Mr. A. Gatt - Operating Systems notes (2024-2025) To compensate for the vast speed differences between the CPU and slower devices such as a printer, such devices make use of a temporary storage space found in RAM that is specifically dedicated to the device. Buffers are used to compensate for speed differences between the extremely fast CPU and the slower devices as the use of buffers allows the CPU to give data to each device and each device can use/process the data at its own rate/speed. System Utilities – Programs which perform maintenance routines to keep the computer in good working order. System utilities are installed with the operating system, or they can be bought as separate software packages. Example → Windows Defender is Microsoft is the anti-virus package on Microsoft windows, however Kaspersky, Avast, Avira and McAffee are third party antivirus / anti-malware packages that can be purchased and installed. Your syllabus includes the following system utilities: 1. Anti-virus / Anti-malware package. 2. Backup / Restore utility. 3. Disk Management (Clean Up and Defragmenter) 4. File compression 5. Formatting 6. Program installer. The following section includes a description of the different system utilities mentioned on page 18. Page 16 of 21 Mr. A. Gatt - Operating Systems notes (2024-2025) 1. Anti-virus programs / anti-malware package – Detect, quarantines and removes viruses that are known by the anti-virus program. Similarly, anti-malware programs remove known viruses however the package also removes other malicious software including spyware and ransomware. a. Both anti-virus and anti-malware packages can offer real-time (continuous) protection by constantly scanning a device for new threats. Extra material for your own understanding in between “” “What is spyware? Spyware is one of the most common threats to internet users. Once installed, it monitors internet activity, tracks login credentials and spies on sensitive information. The primary goal of spyware is usually to obtain credit card numbers, banking information and passwords. (obtained from www.techtarget.com) What is ransomware? Ransomware is a type of malware that locks access to your own device, usually by encryption and keeps it that way until demands are met. The motivation is typically monetary. Payment is usually demanded in virtual currency, like bitcoin, to protect the cybercriminals' identity (www.techtarget.com) ” 2. Backup utility A backup utility is a program that takes a copy of the selected files and folders to protect against permanent data loss due to hardware failures. 3. Restore Utility A restore utility is a program designed to return a computer system to a previous working state. This utility is used to revert a system to a previous state if problems happen to the computer after software installation or software updates. Page 17 of 21 Mr. A. Gatt - Operating Systems notes (2024-2025) RollBack RX ™ is an example of a third-party tool that allows recovery from computer system crashes and malware attacks. 4. Disk Management a. Cleanup → Used to increase storage device space by removing unnecessary files to improve system performance and file efficiency. i. Temporary files such as the internet browsing history, and other files are identified and deleted. ii. The user is prompted to delete other files that are not needed or are rarely accessed. Such files include the contents of the recycle bin. b. Disk defragmenter → The process of reorganising the data on a hard disk drive (HDD) so that data file fragments are stored together in contiguous (after each other) blocks. i. Do note that that as files get written, over-written and deleted on a partition on a hard disk, files will get fragmented. Page 18 of 21 Mr. A. Gatt - Operating Systems notes (2024-2025) 5. File Compression – A program that is used to reduce the size of one or more files. The compressed files use less storage capacity thus it they are transmitted more rapidly over a network. Note the file size difference. 6. Formatting utility – A formatting utility is software used to prepare a storage device, such as a hard disk drive, solid-state drive, or a pendrive, for use by creating a file system on it. a. Formatting utilities allow the user to divide a disk into multiple partitions, each having its own file system. b. Formatting utilities tend to erase all date on a partition. i. The above may be requested if the fil-system is faulty. Page 19 of 21 Mr. A. Gatt - Operating Systems notes (2024-2025) Formatting is normally a solution when: A new hard disk or SSD is connected to a computer. The file system becomes corrupted. To ensure all malware removal from spreading to other computers on a network. All data is however erased because of formatting. To change file systems for performance reasons → Example changing from FAT 32 to NTFS. 7. Program Installer utility – An operating system program used to facilitate installation of application software on a computer system. a. Program installers guide users through a series of steps making it easier to install software. i. Such programs oversee tasks such as accepting the end-user licence agreement and allowing the user to choose the installation location. The Operating System bit size, the CPU word-length and application software bit-size must all be compatible with each other and IDEALLY have the same bit size. If the bit size is different compatibility issues may result. Basically a 32-bit CPU, meaning a CPU that can process 32 bits of data at one go / in one clock cycle (this will be explained in the topic CPU), is compatible with a 32-bit Operating system, meaning an operating system that can handle 32 bits of data at one Page 20 of 21 Mr. A. Gatt - Operating Systems notes (2024-2025) go. Also, on a 32-bit operating system 32-bit versions of application software can be run and not 64-bit versions. Similarly, a 64-bit size OS should ideally be used by a 64-bit size CPU and application software should also be 64-bit. Very Important → A 32-bit application program can run on a 64-bit operating system that is in turn supported by a 64-bit CPU. A 32-bit CPU is supported by a 64-bit OS, but not vice versa. So, the lower levels (see diagram above) must be of the same bit-size or larger. Example a 64-bit size operating system can only be supported by a 64-bit CPU as the CPU forms part of the hardware level. DO NOTE that for the best performance, the bit size at all levels should be the same. In summary, while a 32-bit OS can run on a 64-bit CPU, using a 64-bit OS would allow you to take full advantage of the CPU's capabilities. Page 21 of 21 Mr. A. Gatt - Operating Systems notes (2024-2025)