Saturday, January 25, 2020

Task Scheduling Based On Multilevel Queue Scheduling Computer Science Essay

Task Scheduling Based On Multilevel Queue Scheduling Computer Science Essay Abstract This paper gives the survey on task scheduling. The different scheduling used to schedule task based on priority, time and deadline. To achieve that techniques such as First In First Out, Shortest Job first, Round Robin Scheduling, Multilevel Queue Scheduling are discussed. Among these techniques, the technique named Multilevel Feedback Queue scheduling is proposed as a good scheduling technique along with the future work. Keywords FCFS, Context Switching, Starvation, inflexible, SJF, Multilevel queue. INTRODUCTION Scheduling is a basic concept in computer multiprocessor and multitasking operating systems. Scheduling refers to the way processes are ordered to run on the CPUs, since there are typically many more processes running than there are available CPUs. It also states that when an activity should start or end depending on its duration, predecessor activity, predecessor relationships, resource availability and especially the target completion which is consider as deadline. The  scheduler  is concerned mainly with Throughput, Latency, Turn around, Response Time and Fairness. Throughput describes  that number of processes that complete their execution per time unit. Latency, specifically illustrates about turn around and response time. In Turnaround, total time between submission of a process and its completion is described and the response time  deals with the amount of time it takes from when a request was submitted until the first response is produced. Finally, fairness tells about the equal CPU time to each process (or more generally appropriate times according to each process priority).In practice, these goals often conflict (e.g. throughput versus latency), thus a scheduler will implement a suitable compromise. In  real-time  environments, such as  mobile devices  for  automatic control  in industry (for example  robotics), the scheduler also must ensure that processes can meet  deadlines; this is crucial for keeping the system stable. Scheduled tasks are sent to mobile devices and  managed  through an administrative back end. Types of Operating System Schedulers: Long Term Scheduler: The long term scheduler is otherwise called admission scheduler. This scheduler decides which process or job has to be admitted first to the ready queue. Because while executing a program, which process to be run is authorized or delayed by long term scheduler. The degree of concurrency is maintained and it checks whether high or low amount of processes are to be executed concurrently. It also dictates how the split between CPU intensive and IO intensive is to be handled. It is useful for the real time process to get enough CPU time to finish their tasks in the modern OSs. The GUI interfaces becomes slow if the real time scheduling is not proper. Long-term scheduling is also important in large-scale systems such as batch processing systems, computer clusters, supercomputers and render farms.In these cases, special purpose  job scheduler software is typically used to assist these functions, in addition to any underlying admission scheduling support in the operating system. Long term scheduling obviously controls the degree of multiprogramming in multitasking systems, following certain policies to decide whether the system can honor a new job submission or, if more than one job is submitted, which of them should be selected. The need for some form of compromise between degree of multiprogramming and throughput seems evident, especially when one considers interactive systems. The higher the number of processes, in fact, the smaller the time each of them may control CPU for, if a fair share of responsiveness is to be given to all processes. Moreover we have already seen that a too high number of processes causes waste of CPU time for system housekeeping chores (trashing in virtual memory systems is a particularly nasty example of this). However, the number of active processes should be high enough to keep the CPU busy servicing the payload (i.e. the user processes) as much as possible, by ensuring that on average there always be a sufficient number of p rocesses not waiting for I/O. Short-term Scheduler: The short-term scheduler (also known as the CPU scheduler) decides which of the ready, in-memory processes are to be executed (allocated a CPU) next following a clock  interrupt, an IO interrupt, an operating  system call  or another form of  signal. Thus the short-term scheduler makes scheduling decisions much more frequently than the long-term or mid-term schedulers a scheduling decision will at a minimum have to be made after every time slice, and these are very short. This scheduler can be  preemptive, implying that it is capable of forcibly removing processes from a CPU when it decides to allocate that CPU to another process, or non-preemptive in which case the scheduler is unable to force processes off the CPU. In most cases short-term scheduler is written in assembler because it is critical part of operating system. II.ANALYSIS In this part, we will discuss about different types of scheduler and their usage. Each Technique is compared with different performance metrics such as Throughput, CPU utilization, Turnaround time, waiting time and response time. First Come First Severed (FCFS) This technique is a basic one, and commonly used scheduler. Based on the order the job arrives, the task be scheduled. To maintain this queue will be handled. The entire ready task is put inside the queue, according to the arrival of jobs. To describe this sample source code along with the Gantt Chart. Sample Code: queue_Fifo q; //The processes inside the queue task_Include(procs) // method to include a process into the queue { q.include_Tail(procs); //Inserting the new coming process at the tail end  Ã‚     Ã‚  Ã‚  Ã‚  q.size++; //Reporting } Rescheduling(){ // To remove the process from the queue   P=q.head_Exclude();   Ã‚  Ã‚  Ã‚  Ã‚  Reporting;   Ã‚  Ã‚  Ã‚  Ã‚  return P; }   Example: Consider four tasks P,Q,R and S. Each task requires some amount of time to complete the task. It is shown below. Table 1 Task Schedule Task Time Unit P 9 Q 5 R 10 S 6 Gantt Chart: P Q R S 0 9 14 24 30 Fig 1. FCFS Example In the above example, the incoming task is included in the queue one by one. It executes based on the time units. The drawback of this the task which has to finish first has to wait until its time reach. Another problem is overhead occurs between the processes which leads to Context Switching. Performance Evaluation: Table 2 Performance Metric 1 performance metrics First In First Out Throughout 4/(30+3cs) CPU utilization 30/(30+3cs) Turnaround time (9+14+24+29+6cs)/4=19 Omitting cs Waiting time (0+9+14+24+6cs)/4=11.75 Omitting cs Response Time (0+9+cs+14+2cs+24+3cs)/4=11.75 Omitting cs Shortest Job First (SJF) To overcome the problem of first one we are going for shortest job first technique. In this scheduler, a sorted list is maintained. In the list all the task which has least time unit will be scheduled first. This technique is useful because the task which has earliest time unit got the opportunity to execute. To describe this sample source code along with the Gantt Chart. Sample Code: sort_List SL; //Data Structure for sorted list task_Include (procs, expected_runtime) { // method to include a process into the sorted list. SL.insert(procs, procs.runtime); } //Inserting the newcoming process into the sorted list Rescheduling(){ // To remove the shortest job from the list.   return SL.remove_head();   }   Example: Consider four tasks P,Q,R and S. Each task requires some amount of time to complete the task which is given in table 1. Gantt Chart: Q S P R 0 5 11 20 30 Fig 2. SJF Example In this scheduler, the new incoming shortest job will be included in the list which leads to the problem named Starvation. In Starvation, the job which has longest time to finish the execution will be waiting because all the newly arrived jobs will enter into the list. Therefore, the longest job will starve to get the resource. Performance Evaluation: Table 3 Performance Metric 3 performance metrics First In First Out Throughout 4/(30+3cs) CPU utilization 30/(30+3cs) Turnaround time (5+11+cs+20+2cs+30+3cs)/4=16.5 Omitting cs Waiting time (0+5+cs+11+2cs+24+3cs)/4=10 Omitting cs Response Time (0+5+cs+11+2cs+24+3cs)/4=10 Omitting cs Round Robin Scheduling In time-sharing systems, the Round robin technique is very much successful. The jobs will be preempted. For each task, particular time slot will be given. The job should be finished within that time, otherwise the other jobs will be preempted and the old task should wait until it gets the new slot.This will be achieved using queue Sample Code: queue_Fifo fq; //First in first out queue task_Include(procs) // method to include a task into the queue { q.include_Tail(procs); //Inserting the new coming process at the tail end  Ã‚   }   Rescheduling(y){ // To remove the next process and run it If(y==timer) task_Include(current); set_Timer(time_quanta);   Ã‚  Ã‚  Ã‚  Ã‚  Ã‚   return fq.remove_head(); } Example Here also the same four task will be taken and based on time quanta 3 and 6 the task be scheduled. If Time quanta=3, P Q R S P Q R S P R 0 3 6 9 12 15 16 19 21 23 26 Fig 3. RR Example TQ=3 If time quanta=6, P Q R S P R 0 6 10 16 21 23 26 Fig 4. RR Example TQ=6 Performance Evaluation: Table 3 Performance Metric 3 performance metrics First In First Out Throughout 4/(26+9cs) CPU utilization 26/(26+9cs) Turnaround time (23+16+26+21)/4=21.5 Omitting cs Waiting time (15+12+17+16)/4=15 Omitting cs Response Time (0+3+6+9)/4=4.5 Omitting cs Priority(PRI) In this method a priority is fixed to each and every process. To implement this Shortest job first(SJF) algorithm is used. If two jobs are having the same priority the scheduled will be done based on FCFS queue. In some cases, the jobs be preempted eventhough it has the higher priority. To describe this sample source code along with the Gantt Chart. Sample Code: PRI (L,M,H(RR)) queue_Fifo fq[3]; //The processes inside the queue task_Include(procs, pri) // method to include a process into the queue { fq[pri].include_Tail(procs); //Inserting the new coming process at the tail end  Ã‚   } Rescheduling(y) { // To remove the next process and run it If(y==timer) task_Include(current, current.pri); set_Timer(time_quanta); for pri=H to L if(fq[pri].empty())   Ã‚  Ã‚  Ã‚  Ã‚  Ã‚   return fq[pri].remove_head(); }   Example: Consider four tasks P,Q,R and S. Each task requires some amount of time to complete the task. It is shown below. Gantt Chart: For Time quanta=6 P P R Q R S 0 6 8 14 18 21 26 Fig 4. PRI Example TQ=6 In the above example, the incoming task is included in the queue one by one. It executes based on the priority assigned to each task. The drawback of this the task is once the higher priority job finish its execution the lower priority jobs gets the chance of doing its execution. Performance Evaluation: Table 4 Performance Metric 4 performance metrics First In First Out CPU utilization 26/(26+4cs) Response Time (0+8+14+21+4cs)/4=10.75 Omitting cs Multilevel Queue Scheduling In Multilevel queue scheduling each process is divided into different groups. It is divided into the following processes: SYSTEM PROCESSES INTERACTIVE PROCESSES INTERACTIVE EDITING PROCESSES BATCH PROCESSES STUDENT PROCESSES Fig 5. Multilevel Queue scheduling Process groups. In the above diagram, the foreground queue is called interactive and background queue is called batch. These two plays a major role in scheduling. The jobs are assigned to separate queues. The assigning be done based on memory size, process type and process priority. The vital one is each queue uses its own scheduling policy based on the need of the task. It can either do preemptively or non-preemptively. Possibilities: There are two possibilities to choose the scheduling algorithm: Each queue has absolute priority; once the higher priority job queue becomes empty it wont go for lower priority jobs. Eg. In the Fig.5. The batch processes wont get the chance of execution until the system, interactive and interactive editing processes finish its execution. Each queue gets some CPU time when there is a time slice between queues after that it can be scheduled the processes in the queue. Eg. If 70% of CPU time is given to foreground queue, it uses round robin scheduling. Rest 30% be allotted to background queue which uses FIFO scheduling. The main drawback of this scheduling is, it is not flexible. To overcome this we are going for multilevel feedback scheduling. III.PROPOSED ALGORITHM Comparing with different task scheduling, the proposed algorithm which can be used in task scheduling is multilevel feedback queue scheduling. To overcome the inflexibility of multilevel queue scheduling, the multilevel feedback queue scheduling came into pass. In this, the process can move between various queues. Here separate queues will be used for handling the process, it automatically adjust the priority of the jobs. The process is either I/O bound or CPU bound. Based on the process type, the scheduling algorithm such as round- robin, FCFS be used which maintains the flexibility. It gives preference on short jobs, I/O bound processes and schedule the process according to the nature of the process. It is described based on number of queues, the scheduling policy, a method used to upgrade, degrade or introduce a process and the inter scheduling between the queues. Steps in Multilevel Feedback queue: The new incoming process is added to the queue tail. At one stage, the process comes to the top of the queue and that will be assigned to the CPU. The process leaves the system once it completes its execution. When the process relinquishes control, it leaves the queuing network and once it becomes ready it enters into the queue level. When the process is having quantum time it will be preempted, and enter into the lower level of queue. This will be repeated until the process completes or it reaches the base level queue. Example Consider three queues, Q0- Round robin TQ: 8 milliseconds Q1- Round robin TQ: 16 milliseconds Q2- FCFS TQ=8 TQ=16 FCFS If the new job comes it enters into the queue Q0 and served as FCFS. When it gains CPU, it gets the tine quanta as 8 milliseconds. If the job is not completed within 8 milliseconds, the job moves to the queue Q1. At Q1 job is again served as FCFS and received the time quanta of 16 milliseconds. If it is not complete it will preempt to queue Q2. IV.CONCLUSION AND FUTURE WORK From the different view of task scheduling, multilevel feedback scheduling is considered as the good one in assignment of task. This will be implemented in real time systems for the assignment of task.

Friday, January 17, 2020

The Indigo Spell Chapter Nine

AS JILL HAD SAID, Adrian was more than happy to begin our hunt that afternoon. In fact, when I finally got ahold of him, he offered to pick me up when classes ended, in order to maximize our time. I didn't mind this since it meant I'd get to ride in the Mustang. Admittedly, I would've preferred to drive it myself, but I'd take what I could get. â€Å"When are you going to name the car?† I asked him once we were on the road to Los Angeles. â€Å"It's an inanimate object,† he said. â€Å"Names are for people and pets.† I patted the Mustang's dashboard. â€Å"Don't listen to him.† To Adrian, I said, â€Å"They name boats all the time.† â€Å"I don't really understand that either, but maybe I would if my old man ever fronted me the money for a private yacht.† He shot me a quick, amused look before returning his attention to the road. â€Å"How can someone as cold and logical as you be so obsessed with something as frivolous as this?† I wasn't sure which part bothered me the most – being called cold or obsessed. â€Å"I'm just giving the proper respect to a beautiful machine.† â€Å"You named your car after coffee. That's a sign of respect?† â€Å"The highest1respect,† I said. He made a noise that sounded like a cross between a scoff and a laugh. â€Å"Okay, then. You name it. Whatever you want, I'll go along with.† â€Å"Really?† I asked, a bit startled. True, I'd been badgering him about naming the car, but I wasn't sure I wanted to be the one to wield that sort of power. â€Å"It's a big decision.† â€Å"Life or death,† he said, deadpan. â€Å"Better choose carefully.† â€Å"Yeah, but you're the so-called creative one!† â€Å"Then this'll be good practice for you.† I fell silent for a good part of the drive, struck by the gravity of the dilemma that lay before me. What should the name reflect? The car's sunny yellow color? Sleek lines? Powerful engine? The task was overwhelming. Adrian pulled me out of my thoughts when we began nearing the outer Los Angeles suburbs. â€Å"We're not actually going into the city, are we?† â€Å"Huh?† I'd been waging a mental debate between Summer Wind and Gold Dust. â€Å"Oh, no. We're heading north. Take the next exit.† Mrs. Santos had provided me with two neighborhoods known for their Victorian-style houses. I'd researched them extensively online, even going so far as to look at satellite pictures. I'd finally chosen one that most resembled my vision and crossed my fingers I'd have the same luck as I'd had in finding Marcus's apartment. Surely the universe owed me a few favors. Unfortunately, things didn't look too promising when we finally reached the street I'd been given. It was a peaceful residential area, filled with those same distinctive houses, but nothing that quite matched the one I'd seen in my vision. We drove up and down the street as I scanned each side, hoping maybe I'd missed something. â€Å"Ugh,† I said, slouching back into my seat. No luck. The universe had apparently cut me off. â€Å"We'll have to check the other location, but seriously, it didn't look like a match.† â€Å"Well, it can't hurt to – † Adrian suddenly made an abrupt turn onto a side street we'd nearly driven past. I jerked upright as he clipped the curb. â€Å"What are you doing? Think about your tires!† â€Å"Look.† He made another turn, putting us on a parallel street. Most of it was contemporary California housing . . . but one block had more Victorian houses. I gasped. â€Å"There it is!† Adrian came to a stop on the side of the street opposite from the house of my vision. Everything was there, from the wrapping porch to the hydrangea bush. And now, in the full light of day, I could make out the sign in the front yard: OLD WORLD BED-AND-BREAKFAST. Smaller print identified it as a historic site. â€Å"Well, there we go.† Adrian was clearly very pleased with his find, despite the risk to the car's tires. â€Å"Maybe Jackie's sister is staying here.† â€Å"Odd choice to run nefarious magical activities out of,† I remarked. â€Å"I don't know. Seeing as there aren't any ancient castles in the neighborhood, then why not a bed-and-breakfast?† I took a deep breath. â€Å"Okay, then. Let's go make some inquiries. You sure you can muddle the minds of those who see me?† â€Å"Easy,† he said. â€Å"Easier still if you were wearing your wig.† â€Å"Oh, shoot. I forgot.† I ducked down and retrieved a shoulder-length brown wig that Ms. Terwilliger had supplied me with. Even with Adrian's magic, we wanted to take extra precautions. While it would be good if people were visited by an unmemorable blonde, it'd be better still if they were visited by an unmemorable brunette. I tugged the wig on, hoping no one had seen my transformation. I lifted my head. â€Å"Does it look okay?† Adrian's face showed approval. â€Å"It's cute. You look even brainier, which I didn't think was possible.† We left the car, and I wondered if I wanted to look brainier. A lot of people already thought I was boring. Blond hair might be the only exciting thing I had going for me. Then I thought for a minute about my recent experience scaling a fire escape, breaking and entering, and getting into a fistfight with a fugitive. Not to mention that I was now hunting a powerful evil witch alongside a vampire who could control people's minds. Okay, maybe I wasn't so boring after all. We stepped inside to find a cute little lobby with an ornate desk and a sitting area with wicker furniture. Stuffed rabbits dressed in ball gowns adorned the shelves, and the walls actually had oil paintings of Queen Victoria. The owners apparently took their theme very literally, though I wasn't sure how the rabbits fit in. A girl my age sat at the desk and glanced up in surprise from a magazine. She had short platinum hair and hipster glasses. Tons of necklaces hung around her neck in a gaudy display that went against my minimalist sensibilities. Hot pink plastic beads, a sparkly green star, a gold and diamond locket, a dog tag . . . it was mind-boggling. Even worse, she was chewing gum loudly. â€Å"Hi,† she said. â€Å"Can I help you?† We'd had a whole routine planned, but Adrian immediately went off script. He slung his arm around me. â€Å"Yeah, we're looking for a weekend getaway, and a friend of ours swears this is top-of-the-line romance.† He pulled me closer. â€Å"Our anniversary's coming up. We've been dating for one year, but man, it hardly seems like it.† â€Å"That's for sure,† I said, trying to keep my jaw from dropping. I forced what I hoped was a happy smile. The girl glanced back and forth between us, her expression softening. â€Å"That's so sweet. Congratulations.† â€Å"Can we check the place out?† Adrian asked. â€Å"I mean, if there are any vacant rooms?† â€Å"Sure,† she said, standing up. She spit her gum into a trash can and walked over to us. â€Å"I'm Alicia. My aunt and uncle are the owners.† â€Å"Taylor,† I said, shaking her hand. â€Å"Jet,† said Adrian. I nearly groaned. For inexplicable reasons, â€Å"Jet Steele† was a pseudonym Adrian really liked using. In our rehearsal today, he was supposed to be called Brian. Alicia glanced back and forth between us, a small frown on her face that soon smoothed out. I had to guess it was Adrian's compulsion, confusing her perceptions of us a bit. â€Å"Follow me. We have a few vacant rooms you can see.† With one last puzzled look at us, she turned and headed toward a stairway. â€Å"Isn't this great, sweetie?† Adrian asked loudly as we walked up the creaking stairs. â€Å"I know how much you like rabbits. Didn't you have one when you were little? What was his name, Hopper?† â€Å"Yeah,† I said, resisting the urge to punch him on the arm. Hopper? Really? â€Å"Best rabbit ever.† â€Å"Oh, neat,† said Alicia. â€Å"Then I'll take you to the Bunny Suite first.† The Bunny Suite had more of those well-dressed stuffed rabbits as part of the decor. The quilt covering the king-size bed also had a border of alternating hearts and rabbits stitched in. Several books sat on the mantel above the wood-burning fireplace, including The Tale of Peter Rabbit and Rabbit, Run. Until that moment, I hadn't realized just how absurdly far a theme could be taken. â€Å"Wow,† said Adrian. He sat down on the bed and tested its bounciness, giving it a nod of approval. â€Å"This is amazing. What do you think, buttercup?† â€Å"I have no words,† I said honestly. He patted the spot beside him. â€Å"Want to try it out?† I answered with a look and felt relieved when he stood up. Adrian and beds stirred up too many conflicting feelings in me. After that, Alicia showed us the Morning Glory Suite, the Velvet Suite, and the London Suite, all of which competed to outdo the others in tackiness. Nonetheless, despite the absurdity of Adrian's ruse, the tour had given me the opportunity to take note of the other labeled doors in the hallway. We followed Alicia back downstairs. â€Å"We don't get to see the Sapphire Suite or the Prince Albert Suite?† I asked. Alicia shook her head. â€Å"Sorry. Those are occupied. I can give you a brochure with some pictures, if you want.† Adrian had his arm around me again. â€Å"Angel cake, wasn't the Prince Albert Suite where Veronica stayed? She's not still here, is she?† â€Å"I'm not sure,† I said. This, at least, was similar to what we'd rehearsed. I glanced over at Alicia. â€Å"You probably can't tell us that, huh? If our friend Veronica's here? She's really pretty, has long dark hair.† â€Å"Oh, yeah,† said Alicia, brightening. â€Å"Of course I remember her. She was in the Velvet Suite, actually, and just checked out yesterday.† I resisted the urge to kick the desk. So close. We'd missed her by a day. Yes, the universe was definitely done giving me breaks. I wouldn't be able to cast the scrying spell until the next full moon, which was a month away. â€Å"Oh, well,† said Adrian, still with that easy smile. â€Å"We'll see her for Christmas anyway. Thanks for your help.† â€Å"Do you want to book a room?† Alicia asked hopefully. â€Å"We'll get back to you on that,† I said. I actually wouldn't have put it past Adrian to book one and then claim it was part of our cover. â€Å"We're checking out a few places. A one-year anniversary isn't something you want to make a hasty decision on.† â€Å"But,† said Adrian, giving her a wink, â€Å"I've got a good feeling about the Bunny Suite.† Alicia walked us out, her eyes widening when she saw the Mustang. â€Å"Wow, nice car.† â€Å"It's an amazing car,† I said. â€Å"That's our baby – well, until we have real ones. Don't you think it needs a name?† asked Adrian. â€Å"I keep trying to convince Taylor.† Once again, I had to fight the urge to punch him. â€Å"Oh, definitely,† said Alicia. â€Å"That kind of car . . . it's like royalty.† â€Å"See?† Adrian shot me a triumphant look. â€Å"And Alicia's an expert on royalty. Didn't you see all those paintings?† â€Å"Thanks for your help,† I told her, steering him forward. â€Å"We'll be in touch.† We got in the car, and after waving goodbye to Alicia, Adrian drove away. I stared blankly ahead. â€Å"Much like with the Bunny Suite, I have no words to describe what just happened. I mean, really? Our anniversary? Jet?† â€Å"I look more like a Jet than a Brian,† he argued. â€Å"Besides, that was a much better story than the one about how we wanted to pay a surprise birthday visit to our ‘friend' Veronica.† â€Å"I don't know about that. But it did give us the information we needed. Which isn't good.† Adrian grew serious. â€Å"Are you sure? Maybe Veronica left the area altogether. Maybe you and the other girls are out of danger.† â€Å"That would be good, I guess . . . except, it just means some other poor girl somewhere else would suffer instead, and we wouldn't have any way to stop it.† From my purse, I pulled out Ms. Terwilliger's list of magic-using girls. â€Å"One of these addresses is in Pasadena. We can at least swing through on our way back and warn her.† The girl we sought was named Wendy Stone. She was a student at Cal Tech, which seemed like an odd vocation for a wannabe witch. Of course, Ms. Terwilliger had said these were girls who weren't actively studying the magical path. They simply possessed magical ability, and I supposed the fact that they had no mentors suggested that they might actually be resistant to their inborn abilities – kind of like me. Wendy lived in an apartment near campus that was easy to find. It was a no-nonsense, primarily student residence, but it seemed like a luxury palace after Marcus's building. As we passed busy students carrying backpacks and talking about classes, I felt a pang of longing that I hadn't experienced in a while. Inheriting the Alchemist mantle meant I couldn't go to college. College was a dream I'd held on to for a long time, though enrolling at Amberwood had helped ease some of my longing. Now, in this buzz of academia, a surge of jealousy sprang up in me. What would it be like to have this kind of life? To have your days solely devoted to the pursuit of knowledge, with no intrigue or life-threatening situations? Even Adrian, with his part-time art classes, was able to have some sort of collegiate experience. â€Å"Don't be so down,† he said when we reached Wendy's floor. â€Å"You might get to college someday.† I looked over at him in wonder. â€Å"How did you know that's what I was thinking?† â€Å"Because I know you,† he said simply, no mockery in his eyes. â€Å"Your aura got sad, and I figured being on a college campus had something to do with it.† I couldn't meet his gaze and turned away. â€Å"I don't like that.† â€Å"What, that someone actually knows what's important in your life?† Yes, that was exactly it. But why did it bother me? Because it was Adrian, I realized. Why was it that a vampire understood me so well? Why not one of my friends? Why not one of my human friends? â€Å"You can be Jet if you want,† I said brusquely, trying to get us back on track and cover up my troubled feelings. After all, this wasn't Sydney's Therapy Hour. â€Å"But we are not posing as a couple again.† â€Å"Are you sure?† he said. His tone was lighter now, turning him back into the Adrian I knew. â€Å"Because I've got a lot more terms of endearment to use. Honey pie. Sugarplum. Bread pudding.† â€Å"Why are they all high-calorie foods?† I asked. I didn't want to encourage him, but the question slipped out before I could stop it. â€Å"And bread pudding isn't really that romantic.† We had reached Wendy's door. â€Å"Do you want me to call you celery stick instead?† he asked. â€Å"It just doesn't inspire the same warm and fuzzy feelings.† â€Å"I want you to call me Sydney.† I knocked on the door. â€Å"Er, Taylor.† A girl with freckles and frizzy red hair answered. Her eyes narrowed warily. â€Å"Yes?† â€Å"We're looking for Wendy Stone,† I said. She scowled. â€Å"Are you from the registrar's office? Because I told them the check's on its way.† â€Å"No.† I lowered my voice and made sure there were no witnesses. â€Å"My name's Taylor. We're here to talk to you about, um, magic.† The transformation was sudden and startling. She went from suspicious and cautious to shocked and outraged. â€Å"No. No. I've told you guys a hundred times I don't want to be involved! I can't believe you'd actually show up at my door to try to convert me to your little coven freak show.† She tried to shut the door, but Adrian managed to stick his foot in and block it. Very manly. â€Å"Wait,† he said. â€Å"That's not what this is about. Your life might be in danger.† Wendy turned incredulous. â€Å"So you guys are threatening me now?† â€Å"No, nothing like that. Please,† I pleaded. â€Å"Just let us talk to you for five minutes inside. Then we'll leave and never bother you again.† Wendy hesitated and then finally gave a nod of resignation. â€Å"Fine. But I'm getting my pepper spray.† Her apartment was neat and tidy, save for a pile of papers and engineering books scattered on the floor. We'd apparently interrupted her homework, which brought back my wistfulness. She made good on her promise to get the pepper spray and then stood before us with crossed arms. â€Å"Talk,† she ordered. I showed her the picture of Veronica. â€Å"Have you ever seen this woman?† â€Å"Nope.† â€Å"Good.† Or was it? Did that mean Veronica might have Wendy tagged as a future hit and was waiting to pounce? â€Å"She's dangerous. I'm not exactly sure how to put it. . . .† â€Å"She finds girls with magic and sucks away their souls,† supplied Adrian helpfully. Wendy did a double take. â€Å"I'm sorry, what did you say?† â€Å"That's not exactly the case,† I said. â€Å"But it's close enough. She seeks out girls with power and takes it for herself.† â€Å"But I don't use magic,† Wendy countered. â€Å"Like I told you, I don't want anything to do with it. There's a witch who lives in Anaheim who's always telling me how much potential I have and how I should be her apprentice. I keep telling her no, and I've never even tried any spells. This soul-sucking lady has no reason to come after me.† Ms. Terwilliger had warned me some of the girls might say this. In fact, she'd said most would have this argument. â€Å"It doesn't matter,† I said. â€Å"That won't stop her.† Wendy looked terrified now, and I didn't blame her. My reaction had been similar. It was frustrating to know the very thing you were trying to get away from might come after you. â€Å"Then what should I do?† she asked. â€Å"Well, avoid her if you can. If she comes to see you . . . I mean, don't let her in. Don't be alone with her.† That was slightly lame advice, and we all knew it. â€Å"If you do see her, I'd tell that witch in Anaheim. In fact . . . I know you don't want to, but if I were you, I'd get in touch with that witch now and try to get her help. Maybe even learn a few defensive spells. I understand you don't want to – believe me, I really do – but it could save your life. Also . . . † I held out the agate charm. â€Å"You should take this and wear it at all times.† Wendy eyed the charm as though it were a poisonous snake. â€Å"Is this some trick to get me to learn magic after all? You come here with this whole act about how if I don't learn, I could get my soul sucked away?† Again, I had to give her points. I would think exactly the same thing. â€Å"We're telling the truth,† I insisted. â€Å"There's no proof I can offer – well, wait. Give me your email address, and I'll send you this article about another girl it happened to.† Wendy looked like she was on the verge of using the pepper spray. â€Å"I think I would've heard if some girl had her soul magically sucked away.† â€Å"It wasn't really obvious to those who don't know about the magical world. Let me send it to you, and then you can make your own decisions. It's the best I can offer.† She reluctantly agreed and wrote down her email address. Adrian stepped forward to take it from her, but he must have moved too quickly because she suddenly thrust the can of pepper spray in his direction. â€Å"Stay back!† she exclaimed. At the exact same moment, I sprang in front of him, terrified he was about to get a face full of pepper spray. I cast the first spell I could think of, a simple one that created a flashy – but harmless – show of colored light. A shielding spell would've been much more useful, but I hadn't practiced any yet. That would have to be rectified, in case our future errands involved more pepper spray. â€Å"You back off,† I warned. As I'd hoped, the brilliant display was terrifying to someone anti-magic like Wendy. She retreated to the far side of her apartment and thankfully didn't use the spray. â€Å"G-get out,† she stammered, eyes full of fear. â€Å"Please take precautions,† I said. I set the charm on the floor. â€Å"And please wear this. I'll email you the article.† â€Å"Get out,† she repeated, making no move toward the charm. As Adrian and I walked out of her building and into the sun, I sighed loudly. I was dismayed enough that I didn't even have the chance to feel down about being at a college. â€Å"That didn't go so well,† I said. He thought about it, then grinned. â€Å"I don't know, Sage. You threw yourself in the line of pepper spray for me. You must like me just a little bit.† â€Å"I – I figured it'd be a shame to ruin your pretty face,† I stammered. In truth, I hadn't been thinking of anything that specific. All I'd known was that Adrian was in danger. Protecting him had been instinctual. â€Å"Still, that spell was kind of badass.† I managed a small smile. â€Å"It was harmless, and that's the thing. Wendy didn't know any better. The reason Veronica goes after these girls is that they don't have any magical protection – and that's exactly why they probably can't stop her. I don't think pepper spray will help, but maybe the article will convince her. Oh, shoot. I'll have to make a fake email address for Taylor.† â€Å"No worries,† said Adrian. â€Å"I already have a Jet Steele one you can use.† This actually made me laugh. â€Å"Of course you do. For all the online dating you do, right?† Adrian didn't comment one way or the other, which bothered me more than it should have. I'd meant it as a joke . . . but was there truth to it? If rumors – and some of my own observations – were true, Adrian had experience with a lot of women. A lot. Thinking of him with others upset me, far more than it should have. How many other girls had he kissed with that same intensity? How many had been in his bed? How many had felt his hands upon their bodies? He couldn't have loved them all. Some – probably most – had been conquests, girls whose faces he forgot the next morning. For all I knew, I was just the ultimate conquest for him, a test for his skills. You probably couldn't find a greater challenge than a human with hang-ups about vampires. And yet, thinking back on all the things said and unsaid between us, I was pretty sure that wasn't true. No matter how crazy this romantic entanglement was, he loved me – or thought he did. I was no superficial conquest. It'd probably be better if I was, though. Without an emotional connection, he'd eventually give up and easily find comfort in someone else's arms. This would probably be a good time for me to suggest he do that anyway. But I stayed silent.

Thursday, January 9, 2020

Transition Metal Colors in Aqueous Solution

The transition metals form colored ions, complexes, and compounds in aqueous solution. The characteristic colors are helpful when performing a qualitative analysis to identify the composition of a sample. The colors also reflect interesting chemistry that occurs in transition metals. Transition Metals and Colored Complexes A transition metal is one that forms stable ions that have incompletely filled d orbitals. By this definition, technically not all of the d block elements of the periodic table are transition metals. For example, zinc and scandium arent transition metals by this definition because Zn2 has a full d level, while Sc3 has no d electrons. A typical transition metal has more than one possible oxidation state because it has a partially filled d orbital. When transition metals bond to one more neutral or negatively charged nonmetal species (ligands), they form what are called transition metal complexes. Another way to look at a complex ion is as a chemical species with a metal ion at the center and other ions or molecules surrounding it. The ligand attaches to the central ion by dative covalent or coordinate bond. Examples of common ligands include water, chloride ions, and ammonia. Energy Gap When a complex forms, the shape of the d orbital changes because some are nearer the ligand than others: Some d orbitals move into a higher energy state than before, while others move to a lower energy state. This forms an energy gap. Electrons can absorb a photon of light and move from a lower energy state into a higher state. The wavelength of the photon that is absorbed depends on the size of the energy gap. (This is why splitting of s and p orbitals, while it occurs, does not produce colored complexes. Those gaps would absorb ultraviolet light and not affect the color in the visible spectrum.) Unabsorbed wavelengths of light pass through a complex. Some light is also reflected back from a molecule. The combination of absorption, reflection, and transmission results in the apparent colors of the complexes. Transition Metals May Have More Than One Color Different elements may produce different colors from each other. Also, different charges of one transition metal can result in different colors. Another factor is the chemical composition of the ligand. The same charge on a metal ion may produce a different color depending on the ligand it binds. Color of Transition Metal Ions in Aqueous Solution The colors of a transition metal ion depend on its conditions in a chemical solution, but some colors are good to know (especially if youre taking AP Chemistry): Transition Metal Ion Color Co2+ pink Cu2+ blue-green Fe2+ olive green Ni2+ bright green Fe3+ brown to yellow CrO42- orange Cr2O72- yellow Ti3+ purple Cr3+ violet Mn2+ pale pink Zn2+ colorless A related phenomenon is the emission spectra of transition metal salts, used to identify them  in  the  flame test.

Wednesday, January 1, 2020

The Opening of DH Lawrences Short Story Odour of...

The Opening of DH Lawrences Short Story Odour of Chrysanthemums In the opening of the short story, Odour of Chrysanthemums, DH Lawrence talks about how industry is dominating nature. He tells us how mankind cannot stand in industrys way and that it is like a monster we created, which we cannot defeat. The mood Lawrence tries to create in the opening is gloomy and lifeless which suggests that the story will be sad and tragic. The words he uses to achieve this are mostly negative. The title is rather unusual. Lawrence does not use words that are usually associated with the smell of flowers, like fragrance or scented. Instead, he chooses the word odour to indicate the smell of†¦show more content†¦It suggests that industry cannot be stopped. The woman stood insignificantly because industry does not let mankind stand in its way. The woman is not named because it can be anyone. She is a representative of mankind. The story is set in a mining village and industry dominates the landscape. This is evident in Lawrences description of the pit-bank which loomed up beyond the pond, suggesting a threatening gloomy presence. Mining is not an easy job. After one long days work, the miners drag themselves home, like shadows, suggesting that they are silent, lifeless and exhausted. The word shadow is used to describe the miners, who have just been working in the mines, because they are covered in black coal dust, which suggests that mining is not a very clean job. Nature is slowly fading with the presence of industry. This is shown in the description of the gorse, which flickered indistinctly, suggesting that the shimmer of the plantthat it normally has, becomes hard to see. Industry is so noisy that it covers the beautiful sounds of nature, as Lawrence said, withered oak leaves dropped noiselessly. This line is used when the train just passed, so it suggests that the train is so noisy that the sound of the dropping leaves becomes hard to hear. Nature is not at her best and with the threat of industry she struggles to grow. For example, twiggy apple